dataesr/scientific-paragraphs-categorization huggingface dataset:
The outlier test + clustering approach, which includes quantile and beta, identifies individual CpGs that are outliers and collapses them into epimutations. quantile and beta differ in the distribution used to define the outliers: (I) quantile relies on the quantile distribution  [7] ; while (II) beta fits the values from the reference population onto a beta distribution. Finally, each method reports the significance of the epimutation using a different measure: manova and mlm assess the significance using a p-value, iForest uses an outlier score, mahdist the chi-square distribution and quantile the extreme quantile value. We defined default significant thresholds, which can be modified by the users (Additional File 1: Supplementary Table  S1 ). The epimutacions package includes two configurations to detect epimutations (Figure  1 ): (i) a case-control configuration, using the epimutations function, which compares one sample at a time against a reference panel; and (ii) a oneagainst-others configuration, using the epimuta-tions_one_leave_out function, which compares each sample against all the remaining samples.
a reference panel, such as in a general population cohort or a cohort where all samples are cases. In contrast, the one-against-others configuration detects epimutations for all samples in the datasets. The package also includes two functions to visualize and annotate the identified epimutations, plot_epimutations and annotate_epimutations, respectively. plot_epimutations shows, for a given epimutation region: (i) the DNA methylation values of all the samples; (ii) gene annotation from TxDb. Hsapiens. UCSC. hg19. knownGene Bioconductor package  [13] ; and (iii) CpG island and H3K4me3, H3K27me3 and H3K27ac chromatin marks from seven ENCODE cell lines  [14, 15]. annotate_epimutations uses Illumina annotation to include GENCODE names of genes overlapping the epimutation, and the location of the epimutation CpGs relative to the gene or the CpG island.
In addition, annotate_epimutations relies on the biomaRt Bioconductor package  [16, 17]  to map genes to OMIM identifiers and to identify ENSEMBL regulatory regions overlapping the epimutations. The package vignette contains examples of both functions. Along with the epimutacions package, we provide epimutacionsData, a Bioconductor experiment package to illustrate how to use epimutacions in real settings (https://bioconduc tor. org/packages/release/data/experiment/html/ epimutacionsData. html). epimutacionsData contains two example datasets: (i) a reference panel, GEO GSE127824  [18] , which contains 22 control samples; and (ii) a case-control dataset, which contains 48 control samples from GEO GSE104812  [19]  and 3 case samples from GEO GSE97362  [20]. epimutacionsData also contains a list of candidate epimutation regions for the Illumina Infinium HumanMethylation450 array (450K array).
The list uses a standard nomenclature to enable the comparison of the epimutations detected in different studies. To create the list, we considered that all CpGs in the array were outliers and clustered them using bumphunter  [5]. Epimutations can be found in a total of 40,480 regions, considering the irregular distribution of the probes in the 450K array and our definition of epimutation (at least 3 CpGs closer than 1Kb). We have also developed a shiny app, epimutacionsShiny (https://github. com/isglobalbrge/epimutacionsShiny). That contains all the functionalities of epimutacions and enables using the package with a more user-friendly interface.
Simulations We generated synthetic datasets where we included epimutations using ramr package  [8]. The underlying DNA methylation distribution for each CpG was derived from GSE84727 dataset (see below). The main simulation dataset consisted on 100 samples, with 10 unique epimutations per sample with a mean methylation difference of 0. 4 and a minimum size of 3 CpGs. For assessing the impact of the epimutations' effect size, we generated a dataset with the same parameters than in the previous simulation, but setting the effect size to 0. 2. We assessed the impact of sample size by subsetting from 20 to 90 samples from the main simulation dataset. Finally, we generated small datasets to assess the effect of epimutations recurrency. In each simulation, we randomly selected 1,000 candidate epimutations regions and, on these regions, we introduced 100 epimutations with an effect size of 0.
4 and varying levels of recurrence (from 2% to 10% of the samples). These small datasets also contained 100 samples in total. For running epimutacions using the case-control configuration, we set as cases those samples with the epimutation and controls the rest. The synthetic datasets are deposited in Zenodo (https://zenodo. org/ record/7839977#. ZD5YuHZBwuU). We run epimutacions methods using the default values to evaluate their performance (Additional File 1: Supplementary Table  S1 ). Optimal parameters for ramr methods were explored based on the synthetic datasets with unique epimutations. For ramr-IQR, we explored IQR cut-off values between 1. 3 and 7, while for ramr-beta and ramrwbeta we explored q-value cut-offs between 0. 05 and 1e-7. Optimal parameters were an IQR of 3 for ramr-IQR, a q-value cut-off of 1e-3 for ramrbeta and a q-value cut-off of 1e-6 for ramr-wbeta (Additional File 1: Supplementary Figure  S1 ).
False negatives were defined as an introduced epimutation in a sample not overlapping any epimutation called in that sample. Additionally, we compared the performance of four DMR (Differentially Methylated Regions) to detect epimutations: ProbeLasso  [21] , DMRcate  [22] , Bumphunter  [5]  and Limma + comb-p  [23]. In the four cases, one sample was compared against the others. ProbeLasso was run using the champ. DMR function from ChAMP Bioconductor package  [24, 25] , with minDMRsep = 1000, meanLassoRadius = 1000 and minProbes = 3. DMRcate was run with DMRcate Bioconductor package, with lambda = 1000 and min. cpgs = 3. Bumphunter was run using the champ. DMR function from ChAMP Bioconductor package with cut-off = 0. 1, minProbes = 3, maxGap = 1000, nullMethod = 'bootstrap,' B = 100 and minProbes = 3.
Real dataset In order to compare the performance of the methods implemented in epimutacions and ramr packages, we applied both packages to GSE84727  [26, 27] , a public whole-blood DNA methylation dataset from GEO. GSE84727 was a case-control cohort with 847 individuals, 414 schizophrenia cases, and 433 controls. We downloaded the beta values of GSE84727 from GEO which were preprocessed using methylumi package. We compared the epimutations detected in the GSE84727 dataset by the different epimutations methods: (I) the six methods implemented in our epimutacions R package; (II) the three methods (rmar-iqr, rmar-beta and rmar-wbeta) implemented in ramr Bioconductor package  [8] ; and (III) quantile-perl, the original implementation in perl of quantile  [4]. We compared the methods at two levels: (I) by checking the number of epimutations detected per individual; and (II) by checking the overlap among individuals.
INMA study To assess the effect of preprocessing in epimutacions' detection we used the DNA methylation data from cord blood and child blood (mean age 4 years) DNA methylation data from children of the INfancia y Medio Ambiente (INMA) Sabadell subcohort. INMA project is a population-based birth cohort in Spain, where all children are from European ancestry  [28]. Cord blood samples were used to assess the effect of pre-processing on epimutations detections, while cord blood and child blood samples were used to characterize epimutations in a healthy paediatric cohort (see next section).
Comparison of laboratories methods DNA methylation data was produced using the Illumina 450K in two laboratories as part of two projects (Lab 1: cord blood and 4-year blood; and Lab 2: only cord blood samples). Preprocessing was initially run using two strategies: combined and independent. In the combined strategy, all idat files were preprocessed as if they came from a single lab. In the independent preprocessing, the idat files of each laboratory were processed independently and merged once the beta values were obtained. In both cases, samples were normalized using meffil package  [29] , following the default pipeline. Briefly, we filtered samples with low quality based on bead number, a call rate <90%, sex mismatch between sex inferred from DNA methylation and sex reported by the family, outlier control probes values, dye bias, methylatedunmethylated ratio and X-Y ratio.
Comparison of normalization methods We normalized the DNA methylation data from Lab 1 using six algorithms implemented in minfi Bioconductor package  [31]  (raw normalization, functional normalization  [32] , Illumina normalization, quantile normalization  [33] , noob  [34]  and SWAN normalization  [35] ) and BMIQ  [36]  with noob  [37]  from wateRmelon R package  [38]. In all cases, we removed the probes and samples previously identified in the QC performed with meffil. We run the methods using the default parameters defined in minfi v1. 36. Then, we compared the epimutations detected after the different normalization approaches in the 14 samples selected in Lab 1 (4 samples with replicates in the same batch, 10 with replicates in the other batch) (Figure  2 ).
INMA study: DNA methylation and gene expression data Samples from INMA study were also used to characterize epimutations in a healthy paediatric cohort. As described in the previous section, samples from the two laboratories were preprocessed independently and the beta values were merged. In addition to probes and samples removed due to quality (described in the previous section), we also removed technical replicates (either from different or the same batch) and only one was included. We corrected laboratory effect using ComBat  [39]. After preprocessing, cord blood and children blood samples were considered as two independent datasets. We also evaluated the correlation between DNA methylation levels in epimutations and expression of nearby genes. Gene expression data and preprocessing was previously described  [40].
The obtention of biological samples was previously described  [43]. Here, we selected data of 860 children of European ancestry defined by questionnaire. HELIX was pre-processed with the MethylAid Bioconductor package  [44]  using default values. We filtered low-quality samples using the overall quality control and detection p-values (call rate < 0. 98). We discarded one sample because did not pass any of the two criteria. After flagging probes with low call rate, we checked the sample call rates. We removed one sample with a call rate <98%. We applied functional normalization, which includes Noob background subtraction and dye-bias correction  [34]. Finally, measurements with a detection p-value >2e-16 were set to missing. We also evaluated the correlation between epimutations and nearby gene expression in HELIX.
Gene expression, including coding and noncoding transcripts, was assessed with the Affymetrix HTA v2 at the University of Santiago de Compostela (USC), Spain, following Affymetrix protocol. Data was normalized with the GCCN (SST-RMA) algorithm at the gene level. Annotation of transcript clusters (TCs) was done with the ExpressionConsole software using the HTA-2. 0 Transcript Cluster Annotations Release na36 annotation file from Affymetrix. After normalization, several quality control checks were performed and four samples with discordant sex and two with low call rates were excluded  [45]. Control probes were excluded. Probes with a DABG (Detected Above Background) p-value <0. 05 were considered to have an expression level different from the background, and they were defined as detected. Probes with a call rate <1% were excluded from the analysis.
Datasets We used the GEO GSE87650 superseries  [49]  to evaluate the effect of cell-type in epimutations. GSE87650 superseries contains a dataset of DNA methylation (GSE87640) and another of gene expression (GSE86434) for the same 63 samples. GSE87640, the DNA methylation dataset, contains individuals with samples from different cell types (whole blood, CD4, CD8 and monocytes), totalling 232 samples. GSE87640 was generated with the Illumina 450K DNA methylation array. We downloaded the beta values from GEO, which were preprocessed using lumi, methylumi and minfi Bioconductor packages  [49]. We run a PCA on the general matrix and discarded samples grouped with a discordant cell type cluster. We applied the same criteria for discarding probes than in the previous datasets. Measurements with a detection p-value >2e-16 were also set to missing.
Epimutations' detection Samples were grouped by cell type and considered as independent datasets. We also regressed out top principal components, to remove technical effects from the data, as described for the paediatric cohorts (see previous section). Principal components were computed independently for each cell type dataset and was 2 for all cases. After principal components were regressed out, we run epimutacions using the oneagainst-others configuration and the quantile method. Epimutations' replicability was defined as finding the same epimutation in the same individual in different cell types. Replicability was assessed using the same approach than for technical replicates (see Outlier signal section).
Dataset We applied epimutacions to a cohort of autism patients to exemplify how to use it in practice. We used the GSE83424 dataset  [50] , which contains 63 DNA methylation samples from whole blood, comprising 10 controls and 53 individuals with autism. Normalized beta values were downloaded from GEO, and we applied the same criteria for discarding probes than in the previous datasets. Finally, measurements with a detection p-value >2e-16 were set to missing.
Comparison of methods to detect epimutations In our package epimutacions, we have implemented two previously described methods (quantile and manova) and four new methods (beta, mlm, iForest and mahdist) to detect epimutations. We evaluated their performance on synthetic datasets where epimutations were randomly introduced (see Methods), and compared their results with the methods from the ramr package and four methods to detect DMRs (Differentially Methylation Regions): ProbeLasso, DMRcate, Bumphunter and Limma + comb-p. First, we introduced unique epimutations, i. e. , each epimutation was only present in a sample, with different DNA methylation differences. All methods from epimutacions and ramr but iForest had an almost perfect TPR for epimutations with large effect sizes (Additional File 1: Supplementary Figure  S2 ), while mlm, manova, mahdist, ramrbeta and ramr-wbeta had also a very high TPR for medium effect size epimutations.
In general, the FDR of all methods was below 5%. All methods to detect DMRs had a lower performance than methods designed to detect epimutations (Additional File 1: Supplementary Figure  S3 ). Regarding effect size, all methods but iForest presented the same performance with a sample size as small as 20 samples (Additional File 1: Supplementary Figure  S4 ). Second, we further evaluated the performance of epimutations' methods for recurrent epimutations, i. e. , epimutations present in multiple samples. The case-control configuration performed much better than the one-against-others configuration (Additional File 1: Supplementary Figure  S5 ), having the best performance independent of the frequency of the recurrent epimutation. ramr-IQR and ramr-wbeta were not affected by the epimutation frequency, while rmar-beta performance was penalized for epimutations with a frequency higher than 8% in the dataset.
Finally, we evaluated the time and the memory usage of the methods to detect epimutations. epimutacions methods had comparable times to ramr methods for the case-control configuration, while they were slower when using the one-againstothers approach (Additional File 1: Supplementary Figure  S6 ). Memory consumption was higher for epimutacions methods, especially for the one-against-others configuration (Additional File 1: Supplementary Figure  S7 ). We run epimutacions (using one-against-others configuration) and ramr methods in the 847 whole blood samples of a case-control cohort of adults with schizophrenia (GSE84727 dataset). epimutations' methods have diverse levels of sensitivity, ranging from quantile (the most restrictive), which detected one epimutation in few samples, to manova, mlm and iForest (the most liberal), which detected a high number of epimutations in most samples (Figure  3a ).
The three methods only found a subset of the epimutations in all the normalizations (Additional File 1: Supplementary Figure  8A ). Nonetheless, epimutations detected in one normalization had extreme methylation values in the others (Additional File 1: Supplementary Figure  8B  and Supplementary Figure  9 ). Epimutations detected in technical replicates from the same batch showed a similar pattern. While only a subset of the epimutations were called in both replicates, all the epimutations presented extreme methylation values in both replicates (Figure  4a , Additional File 1: Supplementary Figure  10 ). This pattern was present in all the normalization algorithms (Additional File 1: Supplementary Figures  11 12 ). Evaluation of method to detect epimutations. We ran the methods of epimutacions and ramr packages in GSE84727 dataset.
We compared the overlap epimutations per method and the identified epimutations per individual. a: Sensitivity of epimutacions methods. Each column contains the proportion of individuals in GSE84727 with a given number of epimutations detected. b: Overlap of the epimutations detected by the different epimutacions methods. c: Sensitivity of rmar methods, compared with beta, mlm, and quantile. These three epimutacions methods were selected because they represented three different sensitivity levels. d: Overlap of the epimutations detected by the rmar methods, beta, mlm, and quantile. Processing samples in different labs had a greater effect on epimutation detection. In our dataset, samples were grouped by the lab they were processed, either when we processed samples from each lab independently or when we normalized all samples together (Additional File 1: Supplementary Figure  13 ).
23e-5). We aimed to achieve four goals with this dataset: (I) estimate the epimutation burden in a healthy population; (II) identify the factors that can determine it; (III) explore the features of the epimutations detected in a healthy population; and Both replicates: epimutations detected in both replicates. One replicate and outlier signal: epimutations detected in one replicate, while in the other replicates these CpGs are in the most extreme 5%. b: Replicability of epimutations in technical replicates processed in different batches. Each point correspond to a combination of individual, epimutations' method and preprocessing (raw or residuals). Y-axis represents, for each individual, the proportion of epimutations detected under each replicability state. Both replicates: epimutations detected in both replicates (violet).
Regarding the magnitude, epimutations detected by quantile had a magnitude 0. 1 points higher (p-value <2e-16) than epimutations detected with beta or mlm, independent of the timepoint or the epimutation direction (Additional File 1: Supplementary Figure  24 ). Second, a small proportion of epimutations overlapped with imprinted regions, ranging from 1. 6% in mlm to 4. 7% in quantile (Additional File 1: Supplementary Table  S3 ). Third, despite most epimutations were detected in only one individual (Additional File 3), more sensitive methods were more likely to detect the same epimutation in different individuals (50% epimutations shared in mlm vs 20% in quantile). More than 40% of the epimutations detected in our dataset were not previously reported in four children's cohorts  [4]  (Additional File 1: Supplementary Figure  25 ).
Nonetheless, in these four children's cohorts, the percentage of epimutations found only in one cohort was higher (83. 7%)  [4]. Comparing the frequency of the epimutations in our cohort with those reported in the four children's cohorts, most epimutations had exceptionally low frequencies in both datasets, and no clear correlation was observed (Additional File 1: Supplementary Figure  26 ). Fourth, to explore the persistence of epimutations across time, we used the 110 INMA individuals with samples in the three time points and defined as persistent those epimutations identified in all three time points (Additional File 5). More than half of the epimutations were found in just one time point, irrespective of the method applied (Additional File 1: Supplementary Figure  27 ). After considering having outlier DNA methylation measurements, 79.
Cell-type specificity of epimutations We explored the effect of cell type on epimutation detection on the GSE87640 dataset, which contains the DNA methylation of the same 63 individuals in whole blood and three cell types. We considered each cell type as an independent dataset and ran epimutacions using the one-against-others approach and the quantile method, selected based on the previous results. We identified 89 regions as epimutations in whole blood or in at least one cell type, with 39 unique individuals having at least one epimutation. Only 15/89 epimutations (16. 9%) were identified in whole blood and the three cell types, while 39/89 epimutations (43. 8%) were only identified in a cell type (i. e. , cell-type specific epimutations) (Figure  5c ). When regions with outlier values were also considered, 62/89 epimutations (69.
Application to a clinical setting: Epimutations detection in a cohort of autism patients We applied epimutacions to whole-blood DNA methylation of case-control of 53 individuals with autism and 10 controls (the GSE83424 dataset) to exemplify how epimutations detection could be incorporated into a clinical setting. We used quantile and compared the results of applying the case-control or the one-against-others approaches. Using the case-control approach, we detected 83 epimutations in 42/53 cases (79. 2%) (Additional File 7). Ten epimutations were recurrent, i. e. , found in at least three samples (frequency >5%) (Additional File 8). Four epimutations were found in genes associated with autism: two recurrent epimutations in BRSK2 gene and NUP20L promoter and two epimutations in ZCCHC9 and PHACTR1 (Figure  6a-d ).
Discussion We have developed epimutacions, a Bioconductor package to detect, annotate and visualize epimutations using Illumina DNA methylation microarray data, which is available in Bioconductor. We demonstrated that the six methods available in epimutacions package can reliably detect epimutations in DNA methylation data. All methods but iForest had a TPR close to 100% and independent of the sample size, while iForest required a bigger sample size (>60 control samples) for a satisfactory performance. mahdist, beta and quantile had better control of false positive and their FPR was <5%. The epimutations detected by manova, mlm, iForest, beta and quantile overlapped, which means that the methods are quite reliable when doing the analysis. However, manova, mlm and iForest detected a higher number of epimutations than beta and quantile, respectively.
Thus, we can choose manova, mlm and iForest when prioritizing detecting all possible epimutations, or quantile and beta if we aim to be more restrictive. mahdist detected many epimutations not detected by any other methods, so we discourage its use. We compared the performance of epimutacions and ramr  [8]  packages. While the alternative Bioconductor package ramr used GRanges objects as the main input source with DNA methylation values added as metadata, epimutations used GenomicRatioSet, a Bioconductor package designed to manage DNA methylation data, which is easy to obtain from common DNA methylation preprocessing pipelines. Although ramr methods presented a high performance, case-control configuration in epimutacions outperformed ramr methods when recurrent epimutations are present in the case samples, making epimutacions more suitable for a clinical application.