dataesr/scientific-paragraphs-categorization huggingface dataset:
Overall, more sensitive experimental approaches should be considered when replicating previously detected epimutations. Batch effect was the factor with the strongest effect on epimutation detection. Our dataset had a strong batch effect due to having samples processed in two projects executed at various times, by different labs and people. In this setting, using samples from a different batch as a reference panel inflates the epimutations detected. To correct the batch effect, or other systematic biases in the data, we suggest regressing out the top principal components of methylation before running the analysis. A similar approach is proposed in OUTRIDER, a Bioconductor package to detect gene expression outliers  [55]. This approach removed the batch effect and corrected for technical covariates while preserving the biological signal for epimutations.
Nonetheless, if the differences between cases and controls are large, this approach might remove epimutations shared by many cases. We report biological factors that affect epimutation burden, being the most relevant factor sex. Although boys did not have a different epimutation burden than girls, systematic differences in DNA methylation between boys and girls  [51, 56]  led to the detection of artificial epimutations. Despite age was described to increase epimutation burden  [4] , the association between age and epimutation burden was not clear in our dataset. Previous studies compared children with elderlies, so larger age differences might be required to see an effect in epimutation burden. Finally, parental smoking did not modify epimutation burden. Considering parental smoking as a proxy of common environmental exposures, due to its persistent impact on DNA methylation  [57] , the effect of common environmental exposures on epimutation burden seems minor.
First, epimutations can be prioritized based on their effect on gene expression, as epimutations with clinical impact are expected to significantly alter gene expression  [7, 50, 61]. In contrast, most epimutations in healthy population did not have a relevant effect on nearby gene expression, either in whole blood or in specific cell types, as previously described  [4]. Second, epimutations present in the general healthy population are expected to have a low or null effect on disease. Thus, recurrent epimutations, i. e. , epimutations found in different healthy datasets, are likely to be benign. Despite epimutations' recurrence in healthy population is quite low, either in our paediatric cohort or in the literature  [4] , a database of epimutation variation in healthy individuals at different ages (mainly in blood DNA, but also in other tissues) would improve the application of epimutations to clinical practice.
Similar initiatives for genetic variants, such as gnomAD  [62]  or DGV  [63] , boosted the application of genetics in the clinical context. In addition, a catalogue with clinical interpretation (from benign to pathogenic) of epimutations found in the different diseases, similar to clinVar  [64]  will also be needed. In our package, we propose a nomenclature for epimutations, which might serve as a basis for such databases. Finally, we exemplified how to use epimutacions by applying it to an autism cohort. epimutacions enabled to detect epimutations using two approaches: casecontrol and one-against-others. On one hand, the case-control approach is useful in a clinical setting, where the aim is to find epimutations causative of the disease, an approach already used in previous works  [6, 7, 50, 52].
The case-control approach can be used to identify candidate epimutations specific to one individual and to identify recurrent epimutations in the cases. Thus, the case-control approach identified two novel recurrent epimutations in BRSK2 and NUP20L genes. BRSK2 was associated with autism in SFARI Gene database  [65] , while epigenetic aberrations in NUP20L promoter were only found in autism samples  [66]. On the other, the one-against-others approach was not able to detect recurrent epimutations and only detected epimutations specific of an individual. Thus, while the one-against-others approach can still be useful in an epidemiology setting, where a reference population cannot be defined, this approach might miss epimutations present in more than one individual. Consequently, we strongly recommend including control samples when using epimutations in a clinical context.
This work has some limitations. First, we evaluated the effect of technical variables in only one cohort, which contained few technical replicates. Second, all the datasets analysed were generated with the Illumina Infinium HumanMethylation450 methylation array while current studies are using Illumina Infinium MethylationEPIC. Nonetheless, both arrays follow the same technology and have comparable measures for shared probes  [67] , so conclusions are expected to hold on to the new array. The work also has some strengths. We characterized how the most common technical and biological factors can affect epimutation detection, providing guidelines for study design. The use of a longitudinal cohort allowed us to study the persistence of epimutations and their lifetime origin. Finally, the batch effect in our cohort represents a worst-case scenario.
Acknowledgments The authors would like to thank the team who collaborated on the initial design of the package on the European BioHackathon 2020: Lordstrong Akano,  James Baye ,  Alejandro Caceres ,  Pavlo Hrab ,  Raquel Manzano  and  Margherita Mutarelli. The authors also want to thank the organization of European BioHackathon 2020 for its support. The authors acknowledge the contribution of all the HELIX children and their families.
Availability of data and materials Release version of epimutacions is available in Bioconductor: https://bioconductor. org/packages/release/bioc/html/epimuta cions. html. The devel version of epimutacions is available in GitHub: https://github. com/isglobal-brge/epimutacions epimutacionsData, a package with data for testing epimutacions is also available in Bioconductor: https://bioconductor. org/packages/release/data/experi ment/html/epimutacionsData. html The shiny app, epimutacionsShiny, is available in G i t H u b : h t t p s : / / g i t h u b. c o m / i s g l o b a l -b r g e /epimutacionsShiny.
Background Batch effects are the product of technical biases, such as variations in the experimental design or even atmospheric conditions  [1, 2]. They particularly reveal themselves when merging different datasets, which have likely been built under different conditions. If not corrected, these batch effects may lead to incorrect biological insight, since the variability can be wrongly interpreted as the product of a biological process. Multiple methods exist that address this problem. They include approaches related to frequentist statistics, such as simple normalization  [3, 4]  or principal component.
analysis  [5] ; and machine learning, such as support-vector machines  [6]. One of their main flaws is, however, their incapacity to handle low sample sizes or more than two batches at the same time  [7]. ComBat, originally implemented in the R library sva  [8] , is based on the mathematical framework defined in  [9]. This tool leverages a parametric and non-parametric empirical Bayes approach for correcting the batch effect in microarray datasets that works for small sample sizes or in the presence of outliers. This approach is based on the fact that microarray expression data are generally distributed according to a log-normal distribution  [10]. Note that the parametric method requires strong assumptions but is largely faster than the non-parametric approach. ComBat-Seq, also implemented in the R library sva, is based on a similar mathematical framework, where normal distributions are replaced by negative binomial distributions, to better reflect the statistical behavior of RNA-Seq raw counts data  [11].
We recall the details of the mathematical models of ComBat and ComBat-Seq in Table  1. We introduce in this article pyComBat, a new Python tool implementing ComBat (function pycombat_norm) and ComBat-Seq (function pycombat_seq), following the same mathematical frameworks. Note that the term "pyComBat" implicitly refers to the function pycombat_norm (resp. pycombat_seq) when compared to ComBat (resp. ComBat-Seq). In comparison to both the R implementation and the existing Python implementation of ComBat in the single-cell analysis library Scanpy  [12] , we show that pyComBat yields similar results for adjusting for batch effects in microarray data, but is generally faster, in particular for the usually slow, but more loose, non-parametric method. Similarly, in comparison to the R implementation, we show that pyComBat yields identical results for adjusting for batch effects in RNA-Seq data, and is generally faster.
Implementation of pyComBat pyComBat is a Python 3 implementation of ComBat and ComBat-Seq. It mostly uses generic libraries like Pandas  [13]  or NumPy  [14]  to mimic ComBat and ComBat-Seq, following the exact same mathematical framework. Two important features are not directly related to the performance of the software but are of utmost importance. First, pyComBat is available as an open-source software under a GPL-3. 0 license, which means anyone can use, modify, distribute and share it. Opening pyComBat to the bioinformatics Python community is the best way for maintaining and improving it, while increasing its robustness. Second, the reliability Table  1  Details of the mathematical models of ComBat and ComBat-Seq y gij denotes the expression value for gene g in sample j from batch i , α g denotes a gene-wise baseline expression level, X j is a vector of covariates for sample j , β g is the vector of corresponding regression coefficients for gene g , γ gi is the additive (impacting the mean) batch effect and φ gi is the multiplicative (impacting the variance) batch effect.
ComBat model ComBat-Seq model y gij ∼ Normal(µ gi ; φ gi ) y gij ∼ NegativeBinomial(µ gij ; φ gi ) µ gi = α g + X j β g + γ gi logµ gij = α g + X j β g + γ gi Var(y gij ) = φ gi Var(y gij ) = µ gij + φ gi µ 2 gij of pyComBat has been thoroughly checked, using a bench of unit tests (code coverage measured at 88% with Python module "coverage") serving both as functional tests (to ensure the proper functioning of each submodule) and as non-regression tests (to ease maintenance).
Datasets used and preprocessing For software validation, we created two microarray and two RNA-Seq meta-datasets from public data: one on Ovarian Cancer (6 microarray datasets), one on Multiple Myeloma (4 microarray datasets), one on Breast Cancer (originally used for the validation of ComBat-Seq  [11] , 2 RNA-Seq datasets) and one on Colon Cancer (2 RNA-Seq datasets) All meta-datasets are described in more detail in Table  2. Microarray data were normalized with the rma function from the affy R package (v. 1. 68. 0)  [15]  which applies a log2 transformation and ensures the normal distribution of normalized data, while the raw counts were directly acquired for RNA-Seq data as suggested in the ComBat-seq documentation  [11]. We then compared • ComBat, Scanpy's implementation of ComBat and pyComBat on the microarray datasets on one hand, • ComBat-Seq and pyComBat on the RNA-Seq datasets.
Dataset Reference(s) Ovarian Cancer (microarray) GSE18520 [22] GSE66957 GSE69428 [23] GSE9891 [24] GSE26712  [25, 26]  GSE38666  [27, 28]  Multiple Myeloma (microarray) GSE5900 [29-31] GSE66291  [32, 33]  GSE68891 GSE122231  [34, 35]  Breast cancer (RNA-Seq) GSE83083 [36] GSE59765  [37]  Colon cancer (RNA-Seq) phs000892. v6. p1  [38]  phs000178. v11. p8  [39].
Batch effect correction As an implementation of the ComBat and ComBat-Seq algorithms, pyComBat is expected to have similar, if not identical, power in terms of batch effects correction. This is confirmed in Fig. 1A , which shows the distribution of relative differences between the outputs of ComBat and pyComBat, on the Ovarian Cancer dataset (mean = -1. 06 × 10 -7 , 95% CI = [-1. 28 × 10 -3 , 1. 32 × 10 -4 ]). As expected, the differences are distributed closely around zero with a relative squared error of 1. 7 × 10 -7 , suggesting that the variability relative to the use of ComBat or pyComBat is negligible compared to the intrinsic variability of the data. The slight variability can be explained by the difference between optimization routines in R and Python (Numpy): while small differences in the fitted distribution parameters have little to no impact for the vast majority of data points, they may be amplified by data adjustment for data points located far away in the distribution tails.
Additionally, both ComBat-Seq and pyComBat produce the exact same output on the Breast Cancer and Colon Cancer datasets. Despite the aforementioned differences in optimization routines between R and Python, the slight variations in the fitted distribution parameters are leveled out by rounding to integers during data adjustment as both tools output adjusted integer counts. Given the long-tailed nature of the negative binomial distribution, one would expect that even slight variations in parameter values can impact data points far in the distribution tail, a phenomenon completely absent in our experiments. To sum up, it is highly unlikely to obtain such similar results unless pyComBat implements the same algorithms as ComBat and ComBat-Seq.
Computation time Computation time is evaluated by running pyComBat (resp. Scanpy's implementation of ComBat and ComBat itself ) respectively 100 times on both microarray datasets presented in Section "Results: comparing pyComBat with ComBat and ComBat-Seq", with the parametric approach. As Scanpy doesn't handle the non-parametric approach, only ComBat and pycombat_norm have been tested with it, on the Ovarian Cancer dataset. As for pycombat_seq and ComBat-Seq, they have been run respectively 50 times on the Breast Cancer dataset and 20 times on the Colon Cancer dataset. The reduced number of runs on RNA-Seq datasets is due to the longer, and less variable, computation times. Owing to Python (Numpy) efficiency in handling matrix operations and matrix manipulations as well as thorough optimization of our code, pyComBat is as fast or even faster than ComBat.
The parametric version of the pyComBat performs 4-5 times as fast as ComBat, and around 1. 5 times as fast as the Scanpy implementation of ComBat, in terms of computation time (Fig. 1B, C ), on both datasets. Similar results are observed with the non-parametric version (Fig. 1D ), which is inherently more time consuming, but also less dependent on the distribution of the data. In this case, pyComBat is also approximately 4-5 times faster than ComBat, going from more than an hour to around 15 min. Finally, pyComBat appears to be 4-5 times faster than ComBat-Seq on both RNA-Seq datasets (Fig. 2A, B ).
Downstream analysis The main goal of batch effect correction in transcriptomic is to produce unbiased and more powerful downstream analysis. We show here that the slight differences in corrected gene expression between ComBat and pyComBat have little to no impact on the output of differential gene expression analysis. Such an analysis is not needed on our RNA-Seq datasets, as ComBat-Seq and pyComBat output the exact same adjusted count matrix. We have applied differential gene expression analysis on the Ovarian Cancer dataset, to compare groups based on sample types: Primary tumors against Normal tissues. Both ComBat and pyComBat corrected data have been analyzed using the Limma R package (v3. 56. 2)  [16] , comparing 62 Normal tissue and 615 Primary tumor samples. As shown in Fig. 3 , the differences in batch effects corrections have a small impact on the log-FoldChange differences (mean = -1.
Discussion and conclusion We present pyComBat, a new Python implementation of ComBat and ComBat-Seq, the most commonly used software for batch effects correction on high-throughput molecular data. Our implementation offers the same correcting power, with shorter computation time for the parametric method compared to other implementations, and significantly shorter time for the time-consuming non-parametric version compared to the original R implementations. This reduced computing time opens perspectives for a more generic use of the non-parametric approach to a larger range of datasets. As ComBat and pyComBat (pycombat_norm) assume the normal distribution of the input data, data processing should comply with this assumption. Microarray raw data Fig. 3  Differences of logFoldChange between ComBat and pyComBat corrected data for the Ovarian microarray dataset, for a differential expression analysis between primary tumor and normal tissue samples using Limma generally follow a log-normal distribution, and R's rma function applies a log-transformation after the normalization step, which ensures the normal distribution of the input data.
We believe that this interdisciplinary capabilities, along with its general-purpose abilities, gives Python a substantial edge over R, targeted at statistical applications, to grow as the language of choice for bioinformatic tools. By contributing to a single-language unified ecosystem, we hope to eliminate the need to interface several languages (typically R and Python), a common source of technical difficulties and of computational inefficiency. Workflow languages (such as Snakemake  [17]  or Nextflow  [18] ) and interoperability libraries (such as rpy2  [19] ) still need to translate and copy data from one language to the other. This is a source of inefficiency and of limitations-depending on the supported data formatsespecially when the analysis goes back and forth between languages. We thus advocate the necessity to port reference tools from R to Python.
Sign of this trend, state-of-the-art tools have been directly developed in Python (e. g. lifelines  [20] , a library dedicated to survival analysis, scanpy  [12]  (a library dedicated to the analysis of single-cell omic data) or quickly ported in Python from R (e. g. harmony  [21] , an R library for integrating single cell data, DESeq2, an R library for differential expression analysis). Furthermore, porting a tool from one language to another provides an opportunity window to improve both functionality and performance. For instance, pyComBat improves over ComBat-Seq by supporting reference batches. The recent advent of large language models (LLMs) with coding capabilities, such as Starcoder, GPT4 or GitHub Copilot, represent a great opportunity to accelerate this porting process. Yet, human intervention remains necessary: • to ensure the correctness of the ported code.
Beyond hallucinations, LLMs remain statistic-based prediction models, and may thus introduce errors in the implementation, at the risk of changing the mathematical logic; • to take full advantage of the performance and functionality improvement opportunity window. For instance, ComBat-Seq code is a mix of R and C++, and porting it to Python required adapting the C++ code to interface with Python instead of R. Note however that the work on pyComBat was undertaken before the wide diffusion of LLM-based coding tools. We have attached importance to making the software open source, coupled with comprehensive documentation. We built a robust set of test cases, in an effort to encourage larger participation from the community. We believe that this will be benefiting the Python bioinformatics community and opening the way towards the translation of other widely used software from R to Python.
Availability of data and materials The datasets analyzed during the current study are available in the GEO  and dbGAP repositories:-https:// www. ncbi. nlm. nih. gov/ geo/ query/ acc. cgi? acc= GSE18 520-https:// www. ncbi. nlm. nih. gov/ geo/ query/ acc. cgi? acc= GSE66 957-https:// www. ncbi. nlm. nih. gov/ geo/ query/ acc. cgi? acc= GSE69 428-https:// www. ncbi. nlm. nih. gov/ geo/ query/ acc. cgi? acc= GSE98 91-https:// www. ncbi. nlm. nih. gov/ geo/ query/ acc. cgi? acc= GSE26 712-https:// www. ncbi. nlm. nih. gov/ geo/ query/ acc. cgi? acc= GSE38 666-https:// www. ncbi. nlm. nih. gov/ geo/ query/ acc. cgi? acc= GSE59 00-https:// www. ncbi. nlm. nih. gov/ geo/ query/ acc. cgi? acc= GSE66 291-https:// www. ncbi. nlm. nih. gov/ geo/ query/ acc. cgi? acc= GSE68 891-https:// www. ncbi. nlm.
nih. gov/ geo/ query/ acc. cgi? acc= GSE12 2231-https:// www. ncbi. nlm. nih. gov/ geo/ query/ acc. cgi? acc= GSE83 083-https:// www. ncbi. nlm. nih. gov/ geo/ query/ acc. cgi? acc= GSE59 765-https:// www. ncbi. nlm. nih. gov/ proje cts/ gap/ cgi-bin/ study. cgi? study_ id= phs00 0892. v6. p1-https:// www. ncbi. nlm. nih. gov/ proje cts/ gap/ cgi-bin/ study. cgi? study_ id= phs00 0178. v11. p8.
Real-time assessment of flooding risk associated with the collision between two ships, requires a fast estimation of damage dimensions and associated survivability. The state-of-the-art frameworks for risk assessment on passenger ships do not consider a direct evaluation of damages through crash simulations but refer to probabilistic considerations, modelling damage characteristics according to statutory marginal distributions of damage breaches too old to be any longer relevant. In any case, such an approach is not possible for the real-time risk assessment process developed in project FLARE, aimed at promoting the employment of first-principles tools for risk evaluation. In this spirit, the present work investigates the possibility of developing a database-oriented damage breach model, which employs direct crash analyses with the super-element code SHARP.
However, the sole usage of crash simulations is not suitable for real-time applications. Therefore, starting from the collision simulation database, surrogate models have to be derived for real-time application. In this specific case, three different strategies have been used for the models creation namely: multiple linear regressions, neural networks and decision trees. Here, the strategy to build the database and application on a reference passenger ship is described, highlighting the differences in accuracy and calculation time between the proposed surrogate models.
Such an approach gives crash analyses a role of primary importance in determining the necessary inputs to flooding analyses, providing higher reliability compared to the statutory probabilistic distributions of antiquated damage breach characteristics. The present work focuses on the generation of damages, not for the execution of damage stability calculations but for the generation of surrogate models to be employed for an onboard flooding risk assessment. As highlighted in previous studies, the execution of crash analyses requires a computational effort not suitable for real-time calculations, both using FEM (Finite Element Method) or super-elements software. However, such simulations are useful for generating suitable databases of collision cases, describing breach dimensions as a function of specific parameters of the striking and struck vessels.
Once a fast description is available for the damage location and dimensions, the risk of flooding and the consequences of that event can be assessed by estimating the Potential Loss of Life (PLL) in real-time. As the creation of a collision breaches database for surrogate model generation requires a large number of calculations, the super-element method presents a good balance between the simulation accuracy and the total calculation time. This allows for developing a database with design of experiments (DOE) techniques resulting in more than 5000 collision cases, thus suitable for applying regression techniques for surrogate model determination. In addressing this requirement, the following main topics are covered by this paper. • Determination of a methodology for fast damage dimension estimation compatible with the real-time flooding risk assessment framework developed in project FLARE.