dataesr/scientific-paragraphs-categorization huggingface dataset:
In order to alleviate clinicians' burden and generate trustworthy medical reports, the need for automatic tumor segmentation, together with the computation of standardized measurements, has become apparent. In the field of brain tumor segmentation, the majority of studies have focused on gliomas under the impulsion of the BraTS challenge and its publicly available dataset  [20, 21]. The latest iteration of the dataset from 2020 contains 494 patients with a combination of HGGs (High-Grade Gliomas) and LGGs (Low-Grade Gliomas), with four MRI sequences available each (i. e. , T1, T1Gd, T2, FLAIR). All data were delineated manually, with a differentiation among Gd-enhancing tumor, peritumoral edema, and the necrotic and nonenhancing tumor core. Over the last five years, tremendous progress has been made on segmentation from advances in artificial intelligence and deep learning.
Initial works were performed in 2D due to the lack of hardware resources, and each axial image (slice) from a 3D MRI volume was to be processed sequentially  [22]. In order to benefit from more global information, later approaches evolved towards slabwise/patchwise strategies over 3D neural network architectures  [23]. Alternatively, approaches leveraging a downsampled version of the full 3D MRI volume or ensemble designs combining both strategies were also suggested to further boost segmentation performance  [24]. As part of the bestperforming approaches for glioma segmentation, over the BraTS challenge dataset, we can find nnU-Net  [25]  and H 2 NF-Net  [26]. The former uses a 3D U-Net backbone architecture and operates in a 3D patchwise fashion, determining the best preprocessing steps from a careful analysis of the input dataset characteristics.
If deemed necessary, a cascade design is enabled whereby the first model is trained on the downsampled inputs before training the patchwise model. The latter is a hybrid high-resolution and nonlocal feature network, also able to train both single or cascaded models. A parallel multiscale fusion module provides the foundation to maintain strong feature representation and aggregate multiscale contextual information. Overall, segmentation performance around an 80% Dice score for the contrast-enhancing tumor core was reached. Regarding other brain tumor types, such as meningioma, the segmentation topic has been less investigated with a few studies performed using in-house datasets and less advanced architectures  [6, [27] [28] [29]. In a recent work, competitive segmentation and detection performances were achieved with the AGU-Net architecture  [30].
In our previous study, the need and potential advantages in clinical practice for automated segmentation and standardized reporting were addressed  [32]. In this study, the focus is brought towards tumor core segmentation (i. e. , contrast-enhancing tumor and necrotic tumor core) in gadolinium-enhanced T1-weighted MRI volumes for tumor feature computation and standard reporting for high-grade gliomas. The contributions are: (i) the training of robust segmentation models using two state-of-the-art convolutional neural network architectures and different data preprocessing schemes, (ii) extensive validation studies both across hospitals and using the BraTS challenge dataset as external benchmark, and (iii) open-access models, the inference code, and a stand-alone software.
Data A dataset comprised of a total of 1887 T1-weighted MRI volumes was put together, which has been further split into two subsets. The first subset, called GS1, contains 1594 unique T1-weighted MRI volumes collected from 13 hospitals [32]. The second subset, called GS2, corresponds to the 2020 edition of the BraTS challenge dataset  [20]. Some examples from both subsets, with the manual segmentations outlined in red, are provided in Figure  1. All tumors were manually segmented in 3D using the assistance of external tools, such as a region-growing algorithm  [33]  or a grow-cut algorithm  [34] , followed by manual adjustment. The different trained annotators were supervised by neuroradiologists and neurosurgeons. In general, a tumor was defined as gadolinium-enhancing tissue on T1weighted scans, including nonenhancing enclosed necrosis or cysts.
Subset 2 (GS2) In the BraTS challenge dataset edition from 2020, a total of 293 patients with glioblastoma are featured in the training set. Only the T1-weighted MRI volumes and corresponding annotations were kept to constitute our second subset. Unfortunately, it is important to note that the original raw MRI volumes were not provided by the BraTS challenge, but rather volumes having undergone a series of preprocessing transformations such as brain masking (cf. the rightmost examples in the last row of Figure  1 ).
Segmentation In order to produce competitive pixelwise segmentation models, the following convolutional neural network architectures were selected: nnU-Net  [25]  and AGU-Net  [30]. The nnU-Net framework obtained the best results on high-grade glioma segmentation over the BraTS challenge dataset. Overall, the framework was built to provide a standardized baseline for medical image segmentation, using a 3D U-Net architecture with residual connections automatically optimized for the specific input dataset. The latter architecture has been shown to be competitive and able to generalize well in the task of meningioma segmentation, over a dataset of 600 patients. Solely leveraging T1-weighed MRI volumes as the input, the architecture is made of only one stage directly leveraging the whole 3D MRI volume at a lower resolution than the original.
Specifications for nnU-Net Since the nnU-Net framework was used, most of the following parameters were automatically inferred from the characteristics of the dataset: Preprocessing 1. Light (P1): (i) cropping tightly around the patient's head, (ii) z-score intensity normalization (zero mean, unit variance), and (iii) resampling to a spacing of 0. 98 × 0. 99 × 1. 0 mm 3 using spline interpolation of order 3; 2. Heavy (P2): (i) brain segmentation and brain-masking, (ii) cropping tightly around the patient's brain, (iii) z-score intensity normalization (zero mean, unit variance), and (iv) resampling to a spacing of 0. 98 × 0. 99 × 1. 0 mm 3 using spline interpolation of order 3. The brain segmentation and masking step was performed using the HD-BET approach  [38]. Every pixel of the original MRI volume not belonging to the brain class had its intensity set to zero.
Architecture Design From the framework analysis of our dataset, the suggested best-performing architecture was the 3D full-resolution U-Net. This architecture was used for all experiments without using a cross-validation-based ensemble. The network used five levels, downsampling using strided convolution layers, and upsampling using transposed convolution layers. Kernel sizes of 3 × 3 × 3 voxels for all five levels and filter sizes of  [32, 64, 128, 256, 320]  were used. The loss function was a combination of the Dice score and cross-entropy. The stride values for the convolution layers were as follows, based on the preprocessing performed: strides for P1:  [2, 2, 2]. The input patch sizes were 160 × 128 × 112 voxels for P1 and 128 × 128 × 128 voxels for P2. [2, 2, 1], [2, 2, 2], [2, 2, 2], [2, 2, 2], [2, 2, 2], strides for P2: [2, 2, 2], [2, 2, 2], [2, 2, 2], [2, 2, 2],.
Specifications for AGU-Net Preprocessing 1. Light (P1): (i) resampling to an isotropic spacing of 1 mm 3 using spline interpolation of order 1 from NiBabel (https://github. com/nipy/nibabel, accessed on 16 September 2021), (ii) cropping tightly around the patient's head, (iii) volume resizing to match the architecture's input size, and (iv) normalizing intensities to the range [0, 1]; 2. Heavy (P2): (i) resampling to an isotropic spacing of 1 mm 3 using spline interpolation of order 1, (ii) brain segmentation and brain-masking, (iii) volume resizing to match the architecture's input size, and (iv) zero-mean normalization of intensities. The brain segmentation and masking step was performed using a modified 3D U-Net architecture trained on 100 T1-weighted MRI volumes with slabs of size 256 × 192 × 32 voxels.
Proposed Software and Standardized Reporting The developed software, GSI-RADS, enables the user to run the tumor segmentation and automatic feature computation as described above. In the first version, only models trained with the AGU-Net architecture are supported, and future versions will also handle nnU-Net models. The software is freely available at https://github. com/SINTEFMedtek/ GSI-RADS, accessed on 16 September 2021. The software, coming with a minimalistic Graphical User Interface (GUI), was developed using Python 3. 6, PySide2 v5. 15. 2, and only uses the Central Processing Unit (CPU) for the various computations. The compatibility for use with Windows (≥10), macOS (≥high-sierra), and Ubuntu Linux (≥18. 04) was tested, and a separate executable was created for each operating system.
As a consequence, the patientwise recall could only reach 61% for the smallest glioblastomas, while nearing 98% for the rest of the tumors and comparable to the corresponding nnU-Net patientwise recall of 99%. Visual comparisons are provided in Figure  4  between the two architectures for six patients, one per row. Detailed segmentation performances for each hospital featured in the GS1 dataset, using both architectures, are reported in Table  3. Across each hospital, the same global trend can be witnessed with nnU-Net providing higher Dice and recall scores while AGU-Net reached a higher precision, F1-score, and HD95. The performances were also stable across the different hospitals, only with a noticeable drop in the Dice score for the St. Olavs hospital (STO). This deviation can be explained by the number of patients featured, the largest of the thirteen hospitals by a huge margin, hence greatly reducing the amount of samples used for training the corresponding model and, as such, its ability to generalize.
Preprocessing Impact For both architectures, the segmentation performances when using the different preprocessing schemes, and over both data subsets, are reported in Table  5. Interestingly, an overall performance improvement was noticeable when using the second preprocessing scheme, for both architectures and over both data subsets. The brain-masking operation increased the field-of-view over the brain and discarded irrelevant regions inside the MRI volume where glioblastomas cannot exist. The operation was extremely beneficial for the nnU-Net architecture, as it reduced the amount of potential confusing locations, hence enabling an impressive boost in precision. The patientwise precision was lifted up to 98%, from 82%, when using the first preprocessing scheme over GS1. The operation was similarly beneficial for the AGU-Net architecture since a virtual resolution increase resulted from discarding the regions outside the brain.
Discussion In this study, an in-depth analysis and assessment of glioblastoma segmentation performances was carried out using two state-of-the-art architectures: nnU-Net and AGU-Net. The main finding to consider is the high quality of glioblastoma pixelwise segmentation and detection performances from the sole use of a gadolinium-enhanced T1-weighted MRI volume. Both presented architectures exhibited a proper ability to generalize, as shown by the cross-hospital study and external validity study over the BraTS challenge dataset. In addition, a fine-tuning of the preprocessing scheme was identified as key to further improvement, and in the case of glioblastomas, a brain-masking operation appeared to be extremely relevant. Stemming from their inherent design characteristics, both the nnU-Net and AGU-Net architectures exhibited a complementary behavior.
Preprocessing schemes being a collection of operations intending to condition and normalize the data in order to facilitate the training task, any combination of operations is possible. Given the training time duration, the focus was brought towards two preprocessing schemes only, facing technical and feasibility limitations for investigating more. A simple, fast-to-compute, and computationally efficient scheme was first designed with the minimum amount of operations (P1). An MRI volume could be processed in <15 s, and baseline results could be obtained, from setting up such a scheme. Then, in order to generate optimal segmentations over the BraTS challenge dataset (GS2), the second preprocessing scheme was mandatory (P2). The brain-masking operation was a core component of the second scheme and represented the main reason for the boost in segmentation performances over both subsets.
Moreover, an aim of this study was to provide easily applicable solutions, designed for wide-spread adoption. As such, less complex and computationally intensive workflows are to be favored. From the extensive validation studies performed in this study, the ability to generalize from the trained models of both architectures was demonstrated. Similar segmentation and detection performances were obtained for the different models trained over the 13 hospitals, tallying close to 1600 patients. The same models were shown to be equally robust when applied to the BraTS challenge dataset, further confirming the external validity. Interestingly, a drop in performances was identified for glioblastomas with a total volume below 3 mL, far below average. Given the small amount of voxels representing the tumor, the Dice metric was in this case extremely sensitive to slight variations in segmentation quality.
In this study, the automatic segmentation performance was further improved, and the models' robustness across 14 different MRI data sources was showcased. The standard reports for glioblastoma surgery generated by our developed GSI-RADS software showed the potential for practical implication. Already now, such reports could serve educational or training purposes for neurosurgical trainees and could speed up the learning curve. Furthermore, the segmentation models could be employed by other institutions or research groups in order to generate annotated datasets in a less time-consuming way. To facilitate the spreading of the standard methods, the GSI-RADS software is freely available online together with the best segmentation models. The clinical relevance and potential advantages in practice of this work were covered in-depth in our previous study  [32].
Lastly, reliable tumor segmentation should not be exclusive to pre-operative MRI volumes. Segmentation over time and at different stages of the disease is extremely valuable to provide standardized reports of postsurgical evaluation and treatment response assessment. Regarding tumor feature extraction, further work is for example required on the quantification of different aspects of multifocality, as well as infiltration and disconnection of white matter pathways. A comparison between extracted features and patient outcomes bears potential, but would likely require a larger dataset to be conclusive. Finally, an extension of the GSI-RADS software to other pathologies, such as low-grade nonenhancing glioma, meningioma, and brain metastasis, is to be considered.
Data Availability Statement: The manual segmentation data can be found as publicly archived dataset (https://doi. org/10. 17026/dans-xam-j5aw, accessed on 16 September 2021). The open-access software, trained models, and source code can be found as a public archive (https://github. com/ SINTEFMedtek/GSI-RADS, accessed on 16 September 2021).
Similarly, 13 wild Asiatic mouflons (O. orientalis) were collected either from captive or recently hunted animals, and from frozen samples available at the Iranian Department of Environment. These worldwide sheep (n 20) and Asiatic mouflons (n 13) were previously used in  Alberto et al. (2018)  and their whole genome sequence data were included here for comparisons and for increasing power when identifying selection signatures in Moroccan sheep (see section 2. 3 and section 2. 4 in the Methods).
Data Processing As described by  Benjelloun et al. (2021 ), Alberto et al. , 2018 and Benjelloun et al. (2019) , Illumina reads were aligned to the sheep reference genome (OAR v3. 1, GenBank assembly GCA_000317765. 1  (Jiang et al. , 2014) , and variant discovery was performed using three different algorithms: Samtools Mpileup  (Li et al. , 2009) , GATK  UnifiedGenotyper (McKenna et al. , 2010)  and Freebayes  (Garrison and Marth, 2012). Variants were called using a larger dataset than that used in this study (i. e. , 160 sheep). Then two successive rounds of filtering variant sites were run. Filtering stage 1 merged together calls from the three algorithms, whilst filtering out the lowest-confidence calls. A variant site passed if it was called by at least two different calling algorithms with variant phred-scaled quality>30.
Sites were filtered out if VQSLOD < cutoff value. The cutoff value was set for each population by the following: Minimum VQSLOD {the median value of VQSLOD for training set variants}-3 * {the median absolute deviation VQSLOD of training set variants}. Measures of the transition/transversion ratio of SNPs suggest that this chosen cutoff criterion gives the best balance between selectivity and sensitivity. Genotypes were improved and phased by Beagle 4 (Browning and Browning, 2013), and then filtered out where the genotype probability calculated by Beagle was <0. 95. The resulting dataset was constituted of 47,622,950 variants.
Genetic Diversity and Demography We used vcftools  (Danecek et al. , 2011)  to estimate the heterozygosity (Ho), inbreeding coefficient (F) using polymorphic diploid bi-allelic SNPs and nucleotide diversity (π) for all diploid SNPs without missingness. We also calculated the F ST index  (Weir and Cockerham, 1984)  using the same program (VCFtools) for each variant and their average over the whole genome between each two of the five Moroccan breeds, and between the 87 Moroccan individuals and the 22 sheep representing 12 cosmopolitan breeds. In order to determine the demographic history of the studied breeds, we used the approximate Bayesian computation (ABC) approach implemented in PopSizeABC  (Boitard et al. , 2016a)  to estimate the effective population size (Ne) through time from 130 K years to the present.
PopSizeABC determines how Ne changes through time, by estimating empirical summary statistics from our VCF files and matching them to the simulated summary statistics obtained from simulated genomic data. The simulations explore a large set of Ne possible values for each of 21 pre-defined time windows, together with several values of the per generation per bp recombination rate (r), while assuming a fixed and predefined per generation per site mutation rate (μ). In order to compare the demographic history Moroccan sheep with the main worldwide breeds/populations, we included, in the analysis, genomic data of the worldwide sheep and Asiatic mouflons. The latters represent the closest wild descents of the species from which the current domestic sheep (O. aries) diverged since their domestication.
The worldwide breeds were subjected to the improvement of their production performances by intensive selection  (Alberto et al. , 2018). We estimated the recombination rate by using a uniform prior interval from 8e -9 to 13e -9 with an approximation of r 10. 65e -9 , and then empirical data for each population. The minor allele count threshold (mac) for the Allele Frequency Spectrum (AFS) and Identity By State (IBS) statistics computation was set for each population to about 5% × N (where N is the number of samples) and the minor allele count threshold for LD statistics computation (mac_ld) was set to about 20% × N as recommended by  Boitard et al. , (2016a). The number of simulated datasets was nb_rep 10,000, the number of independent segments in each dataset was nb_seg 50 and the size of each segment in bp was L 2,000,000, which overall gives a total of 1 Terabp of simulated data.
Selection Signatures To identify selective sweeps, we have defined an integrated framework based on two complementary approaches as proposed in  Boitard et al. , (2016b). The first one (freqHMM) detects selection occurring within a single population while the second (FLK & hapFLK) is for detecting selection events differentiating populations. A-A genome scan using the freqHMM program  (Boitard et al. , 2012)  allowed identifying independently the putative regions under selection within each of the five studied breeds. This method is based on contrasting the local and genome-wide distributions of allele frequencies using data from a single population by assuming each SNP to have a hidden state which can take three different values: 1) "3 Selection"; attributed to SNPs that are located in a selective sweep, 2) "intermediate", for SNPs not selected but located close to a selective sweep and 3) "1 neutral", for SNPs that are far from any selective sweep.
It aims at identifying ancient selection signatures that arose from new variants (hard sweeps) as described by  Boitard et al. (2012). Ancestral alleles at each marker were defined using the homozygotes of the reference goat genome (CHIR_1. 0; Dong et al. , 2013)  for the corresponding loci, by assuming that these are the ancestral alleles that mutated in Ovis to produce SNPs. Those ancestral alleles were added to the input VCF files using an in-house shell script. Afterwards, five different datasets representing whole genome variants with a total of polymorphic 31,442,046 SNPs (for which ancestral alleles were identified) of each of the five breeds were extracted using vcftools  (Danecek et al. , 2011)  and data related to each chromosome was put in a separate file for each breed. Then, we calculated the number of derived and ancestral alleles for each SNP using vcftools.
Parameter K of freqHMM was calibrated for each breed by simulating data using ms  (Hudson, 2002)  under neutrality, accounting for the demographic history previously estimated for the breed by PopSizeABC, and running freqHMM on these neutral data, as previously described in  Boitard et al. , (2016b). The value of K obtained by this approach was then used to run the freqHMM analysis on the empirical data for each one of the five breeds. B-The second approach to detect selective sweeps was a combination of the FLK  (Bonhomme et al. , 2010)  and hapFLK  (Fariello et al. , 2013)  methods implemented in the hapFLK (1. 4 version) program (https://forge-dga. jouy. inra. fr/projects/hapflk/ files). It was used to detect selection signatures by differentiating haplotypes among hierarchically structured populations, as described by  Fariello et al.
(2013). This has been done using all the genomic autosomes with no missingness allowed. FLK is a test for inbreeding coefficient heterogeneity that uses phylogenetically estimated relationships between populations. The allele frequencies are rescaled using a population kinship matrix which is estimated from the genomic data, measuring the amount of genetic drift expected under neutral evolution. HapFLK uses the differences in the frequencies of allele haplotypes between populations and the hierarchical structure of subpopulations. The shared variants between the five Moroccan breeds and the 19 Ovis Orientalis (included as outgroup) were combined using the option "-T CombineVariants" of GATK  (McKenna et al. , 2010). The resulting dataset consisting of 31,721,507 polymorphic SNPs was used for FLK analysis to calculate Reynolds distances and the resulting Kinship Matrix.