dataesr/scientific-paragraphs-categorization huggingface dataset:
, 2020) , the recently discovered Candidatus Azoamicus ciliaticola, a denitrifying gammaproteobacterial endosymbiont within a Plagiopylea ciliate host  (Graf et al. , 2021) , and the Nostoc azollae symbiont of the Azolla water ferns  (Ran et al. , 2010). (E) Binding energy and encoding compartment. ''Retention'' here is not the continuous index used previous, but a binary variable describing if any organisms retain a gene in their oDNA (1) or if none have been observed to do so (0). Traces show mean and 95% credible intervals for Bayesian generalized linear mixed model (GLMM) (see STAR Methods for priors). The associated p value is a frequentist interpretation from bootstrapping, against the null hypothesis of no relationship. Crystal structures are colored according to the number of species in our dataset that retain the gene for each subunit.
Binding energy predicts retention propensity most strongly at very low (under À200 kJ mol À1 ) binding energies-very strongly bound subunits are almost invariably found in at least some eukaryotic oDNA. At higher energies (less strongly bound subunits), there is typically a mix of retention scores. This reflects a general observation-the interactions between features shaping oDNA gene retention can be complicated. At low energies, it may be that binding energy dominates retention behavior, whereas at higher energies, other features like hydrophobicity and pK a play a competing role in determining retention. As we cannot analyze binding energy in the same model structure as our other features (the source datasets and response variables are different)-and as we use simple linear models for other features-the quantitative details of such interactions remain to be elucidated.
Materials availability This study did not generate new unique reagents. Data and code availability d This paper analyzes existing, publicly available data. The accession numbers for the datasets are listed in the key resources table. d Code is written in R, Python, and C, with a wrapper script for bash, and is freely available at github. com/StochasticBiology/ odna-loss. This study did not generate new unique reagents. d Any additional information required to reanalyze the data reported in this paper is available from the lead contact upon request.
Source data We used the mitochondrion and plastid sequences available from NCBI RefSeq (O'  Leary et al. , 2016) , and annotated eukaryotic whole genome data also from NCBI. The accessions and references for the endosymbiont/relative pairs are given in Table  S4. For biochemical and biophysical gene properties, we used the values from  (Johnston and Williams, 2016) , described below, using BioPython  (Cock et al. , 2009)  to assign these to given gene sequences. We averaged gene statistics over representative species from a collection of diverse taxa, both using model species (Homo sapiens, Arabidopsis thaliana, Saccharomyces cerevisiae, Reclinomonas americana, Chondrus crispus, Plasmodium falciparum) and randomly selected members of different taxa (Figure  S10 ). Codes used in the figures are [Hyd]rophobicity, [HydI] hydrophobicity index, [GC] content, [Len]gth, [pK1] carboxyl pK a , [pK2] amino pK a , [MW] molecular weight, [AG/CW] energies of gene expression.
We used crystal structures and associated HTML descriptions from the PDB  (Berman et al. , 2000) references PDB: 1oco, 1q90, 2h88, 2wsc, 5iu0, 5mdx, 5mlc, 5o31, 5xte, 6cp3, 6fkf. We used PDBePISA  (Velankar et al. , 2009)  to estimate subunit binding energies with two different protocols, both removing ligands and incorporating them into the overall binding energy value for a subunit. We used estimated taxonomies from NCBI's Common Taxonomy Tree tool  (Federhen, 2012).
Biochemical and biophysical properties of genes and products Our assignment of biochemical and biophysical properties of genes and their products follows that in  Johnston and Williams (2016). The length* (in number of amino acids of gene product) and GC content (trivially counted) of genes are taken straightforwardly from a sequence. Chemical properties of amino acids were taken from the compilation at http://www. sigmaaldrich. com/life-science/ metabolomics/learning-center/amino-acid-reference-chart. html. The hydrophobicity and hydrophobicity index of a gene product was computed using this compilation (original data from Ref. Monera et al. , 1995). Amine group pK a , carboxyl group pK a , and molecular weight* values were calculated using this compilation (original data from  Lide, 1991).
To compute a single value for each statistic of interest, a protocol is required to summarise the many different values seen for a given gene across the species in our dataset. For robustness, we considered several different averaging protocols. First, we averaged gene statistics over a set of model species taken from diverse eukaryotic groups (Homo sapiens, Arabidopsis thaliana, Saccharomyces cerevisiae, Reclinomonas americana, Chondrus crispus, Plasmodium falciparum). Second, we randomly selected a member of each clade branching from the eukaryotic group (see clade names above) and averaged over the set containing these random samples. Most statistics were very strongly correlated for these different choices (Figure  S10A ). The exception was GC content, which is well known to evolve differently in different clades.
Gene labelling and evolutionary transitions Gene annotations are inconsistent across such a diverse dataset. For organelle genomes, we used two approaches. In a supervised approach, where the full set of unique labels found was manually curated and assigned a 'correct' label based on biological knowledge. In an unsupervised approach, we used BLASTn to perform an all-against-all comparison of all genes in our dataset. We scored each comparison as the proportional length of the region of identity compared to the reference sequence, multiplied by the proportion of identities across that region. Scores over 0. 75 were interpreted as 'hits' (e. g. 75% identity over the full sequence, or full identity over 75% of the sequence). If more than 25% of appearance of gene label X in the BLAST output involved a 'hit' with gene labels Y, we interpreted X and Y as referring to the same gene.
This process built a set of pairwise identities, which we then resolved iteratively into groups of gene labels assumed to refer to the same gene. We then assigned the most prevalent gene label to all members of that group. In each case, we retained only genes that were present in more than ten species in our dataset. For annotated whole genome data, we used pattern matching for gene annotations based on regular expression identifiers to identify nuclear-encoded subunits of organellar protein complexes (expressions below). Using these curated gene sets, we assigned 'barcodes' of gene presence/absence (binary strings of length L, with 0 denoting gene absence and 1 denoting gene presence) to each species in our dataset. Each of these species is a tip on an estimated taxonomic tree describing their putative evolutionary relationship.
Retention indices Our simple retention index is defined as follows. Identify the set of transitions that involve the loss of gene X. For each transition in this set, count the genes retained by the parent and the genes retained by the child, and take their mean. The retention index is the mean of this quantity over the set of transitions where X is lost. The rationale is to characterise the number of genes that have already been lost when X is lost. If a transition event involves only the loss of X, the parent-child average will report this number minus 1= 2. If a transition involves the loss of several other genes in parallel with X, the average of the before and after counts is used. In addition to our simple retention index, which relies on an estimated phylogeny linking observations in our dataset, we considered another assumption-free index.
Here, we construct the set of unique oDNA presence/absence patterns in our dataset (as in Figure  1 ), and simply count the occurrences c i of each gene i in this dataset. The index is given by logc i =max j logc j. This index relies on no evolutionary assumptions, and thus cannot account for the evolutionary relationship between sampled species. Considering only the set of unique barcodes goes some way towards accounting for the sampling bias in the dataset (for example, almost all metazoans have the same presence/absence profile, but this profile will only occur once in the unique set). The distribution of this index had substantial structure (as visible in Figure  1 , and clear, particularly for plastids, in Figure  S11 ), but we do not consider further transformations or more tailored analysis here, instead focusing on the similarity of results with those from the other index.
Prediction of retention index We used Bayesian model selection with non-local priors to promote separation of overlapping models  (Johnson and Rossell, 2010) ; specifically, moment (MOM) priors parameterised so that a signal-to-noise ratio of >0:2 is anticipated, compatible with previous findings  (Johnston and Williams, 2016) ; a beta-binomial ð1; 1Þ prior distribution on the model space, and a minimally informative inverse gamma prior for noise. Further information on priors, and the effects of varying them, are given in Figure  S12. We implemented the selection process in the R package mombf. In addition to the Bayesian linear model approach, we used a variety of different approaches for retention index regression. These included decision linear modelling with ridge and LASSO penalisation, decision tree regression, and random forest regression.
QUANTIFICATION AND STATISTICAL ANALYSIS The quantification and statistical analyses are an integral part of this research and each approach is described in detail above and as it arises. Briefly, we use a bioinformatic pipeline to curate oDNA datasets, constructing gene profiles for each species and collecting physical and chemical statistics for each gene. We create a quantitative retention index borrowing from hypercubic transition path sampling. We then use Bayesian model selection to (a) predict this index from those statistics using linear models and (b) predict encoding compartment from these statistics using generalised linear models. In this Bayesian paradigm, quantitative outputs are posterior probabilities over model indices and parameter values, and 95% credibility intervals are given; the effect of different priors is explored throughout.
For binding energy analysis we quantify binding energy using PDBePISA and use both maximum likelihood and Bayesian generalised linear models to relate the variables, with confidence and credibility intervals given accordingly. For the recent endosymbiont analysis we use Wilcoxon rank-sum tests to compare statistics in different compartments. (Barton et al. , 2010; Craig and Weber, 1998). The GLM approach (red) treats each complex independently; the GLMM (blue) describes complexspecific changes to an overall trend. Frequentist p-values against the null hypothesis of no relationship are 0. 00047 (GLM) and 0. 0038 (GLMM). (bottom) The same plot, but using a threshold of 1000 species rather than 1 species in our dataset retaining a gene for it to be assigned a retention value of 1. The corresponding p-values are 3.
(D) Performance (T/F, true/false; P/N, positive/negative) of GLMs involving hydrophobicity and carboxyl pK a on predicting encoding compartment of genes outside the training set. Each set of points corresponds to a model for one organism. (E) Binding energy and encoding compartment. ''Retention'' here is not the continuous index used previous, but a binary variable describing if any organisms retain a gene in their oDNA (1) or if none have been observed to do so (0). Traces show mean and 95% credible intervals for Bayesian generalized linear mixed model (GLMM) (see STAR Methods for priors). The associated p value is a frequentist interpretation from bootstrapping, against the null hypothesis of no relationship. Crystal structures are colored according to the number of species in our dataset that retain the gene for each subunit.
Mean linear model regression performance, related to Fig. 2. Spearman's ρ between predicted and observed retention index in test sets for different cases. Non-standard genes (msh1/muts, matr, mttb) are removed from mtDNA sets for these experiments. Labels show simple retention index vs barcode retention index; 'pruned' dataset (retaining only mt genes from families nad, sdh, atp, cox, cytb, rp and pt from psa, psb, rp, rbc, ndh, atp, pet) vs unpruned. Each LM uses only GC content and hydrophobicity.
Code and dependencies Code is written in R, Python, and C, with a wrapper script for bash, and is freely available at github. com/StochasticBiology/odna-loss, publication release https://doi. org/10. 5281/zenodo. 6873510. Our pipeline uses the following R packages: ape  (Paradis and Schliep, 2019) , arm  (Gelman and Su, 2020) , blme  (Chung et al. , 2013) , BMA  (Raftery et al. , 2021) , caper  (Orme et al. , 2018) , cowplot  (Wilke, 2020) , e1071  (Meyer et al. , 2021) , geiger  (Pennell et al. , 2014) , GGally  (Schloerke et al. , 2021) , ggnewscale  (Campitelli, 2021) , ggplot2  (Wickham, 2016) , ggpubr  (Kassambara, 2020) , ggpval  (Cheng, 2021) , ggrepel  (Slowikowski, 2021) , ggtree  (Yu et al. , 2017) , ggtreeExtra  (Xu et al. , 2021) , glmnet  (Friedman et al. , 2010) , grid-Extra  (Auguie, 2017) , hexbin  (Carr et al.
RSAT (Regulatory Sequence Analysis Tools) enables the detection and the analysis of cis-regulatory elements in genomic sequences. This software suite performs (i) de novo motif discovery (including from genome-wide datasets like ChIP-seq/ATAC-seq) (ii) genomic sequences scanning with known motifs, (iii) motif analysis (quality assessment, comparisons and clustering), (iv) analysis of regulatory variations and (v) comparative genomics. RSAT comprises 50 tools. Six public Web servers (including a teaching server) are offered to meet the needs of different biological communities. RSAT philosophy and originality are: (i) a multi-modal access depending on the user needs, through web forms, commandline for local installation and programmatic web services, (ii) a support for virtually any genome (animals, bacteria, plants, totalizing over 10 000 genomes directly accessible).
INTRODUCTION The Regulatory Sequence Analysis Tools (RSAT) provides a wide range of bioinformatics programs enabling the analysis of genomic regulatory sequences in physiological and disease contexts. RSAT enables users to obtain genomic sequences and perform typical analyses, such as de novo motif discovery, or motif scanning to predict transcription factor (TF) binding sites (TFBSs). RSAT functionalities also include original analyses, such as motif quality evaluation, 2 Nucleic Acids Research, 2022 motif comparisons and clustering, detection and analysis of regulatory variants, building of control datasets and comparative genomics to discover motifs based on cross-species conservation. Altogether, the RSAT Web site gives access to 50 tools that can be used individually, or sequentially to perform more complex analyses.
Epigenomics datasets such as ChIP-seq or ATAC-seq peaks Genome-wide datasets obtained from epigenomics experiments (e. g. ChIP-seq, ATAC-seq, ChIP-exo, DNaseI, Cut&Run, Cut&Tag) consists of genomic regions--known as peaks--that are likely bound by a given transcription factor (TF), or associated with open chromatin. The prevalent question is 'Which TF binding motifs can be detected in the peaks?' The peaks can be analyzed with the user-friendly pipeline peak-motifs  (5, 8, 9) , which relies on de novo motif discovery to detect exceptional motifs in a set of sequences. peakmotifs runs multiple complementary algorithms [oligoanalysis (1), dyad-analysis  (10) , position-analysis  (11)  and local-word-analysis  (8)  that can all be used as independent tools], then compares the predicted motifs with annotated motif databases (compare-matrices), and finally predicts the positions of the putative transcription factor binding sites (TFBSs) within the peaks (matrix-scan (12) (Figure  2 ).
Two datasets can be provided as input to enable differential analysis. Alternatively, the peaks can be directly scanned with motifs (e. g. the discovered motifs, or from motif databases such as JASPAR (cf. 'Motifs represented as Position-Scoring Specific Matrices (PSSM) or consensus sequences')) to locate putative TFBSs (dna-pattern or matrix-scan  (12) ) or to predict potential cis-regulatory modules (crer-scan (3)). The tool matrix-quality can measure the enrichment of a specific motif within one or more peak datasets  (13). As input peaks must be provided as FASTA-formatted sequences, RSAT provides two tools to extract sequences from genome-wide peak datasets specified in BEDformated genomic coordinates (cf. 'Genomic coordinates as a BED file'). Control datasets can be built by selecting sequences at random positions from a given genome (random-genomefragments), or by generating simulated sequences matching the size and composition of the peaks (random-sequences).
Lists of gene names or identifiers Genome-wide datasets from transcriptomics experiments (e. g. microarrays, RNA-seq), as well as more targeted in situ hybridization experiments, typically results in a list of co-expressed genes. A frequent question is 'Which TFs may co-regulate the expression of these genes?' The typical analysis workflow consists in (i) retrieving sequences relative to these genes (e. g. promoter) and (ii) performing de novo motif discovery or motif scanning (cf. 'Epigenomics datasets such as ChIP-seq or ATAC-seq peaks'). Given a list of gene names or identifiers, retrieve-sequences extracts promoter sequences of locally-installed genomes, while retrieve-ensembl-seq  (14)  retrieves sequences of promoters or other specified features on-the-fly from Ensembl. To support comparative genomics analyses, retrieveensembl-seq can also retrieve sequences from homologous genes.
On the Plant server, the tool get-orthologs-compara additionally returns detailed information on homologous genes in a set of reference organisms, using precomputed Ensembl Compara data  (15, 16). On the Fungi and Prokaryotes servers, lists of orthologous genes can be obtained with get-orthologs. For the subsequent motif analysis step on these servers, footprint-discovery  (17, 18)  and footprintscan directly use cross-species conservation to detect putative regulatory signals in non-coding sequences (phylogenetic footprinting) (Figure  2 ). Control datasets can be built by randomly selecting genes within a given genome with random-gene-selection. Use case 1 (3) combines get-orthologs-compara, retrieve-sequences and matrix-scan to predict TFBSs of VRN1 within the promoters of the FT1 gene in several plant genomes.
Motifs represented as Position-Scoring Specific Matrices (PSSM) or consensus sequences Motifs represented as PSSMs or as consensus sequences may be obtained by de novo motif analysis, from databases such as JASPAR  (19) , or directly from the literature. Some typical questions are (i) 'Is the motif of good quality ?', (ii) ' Which sequences contain TFBS matching this motif ?', (iii) 'Does this motif resemble other motifs ?'. First, matrix-quality (13) aims at assessing the quality of a PSSM on sequence datasets provided by the user, by comparing theoretical and empirical score distributions. Second, matrix-scan takes as input motifs to locate putative TFBSs in user-provided sequences (cf. 'Epigenomics datasets such as ChIP-seq or ATAC-seq peaks'). Third, compare-matrices compares two collections of matrices and returns various similarity statistics along with a PSSMs multi-pairwise alignment.
matrix-clustering  (20)  regroups similar PSSMs into clusters, builds consensus PSSMs for each cluster and offers a dynamic visualization of aligned PSSMs. We applied matrix-clustering to regroup redundant matrices within and across motifs databases, in order to build the RSAT non-redundant motif collections for insects, plants and vertebrates  (20). These collections are accessible with retrieve-matrix (3), which conveniently offers additional access to 187 external motifs collections, totalizing 454 524 motifs, all homogenized in TRANSFAC format (Supplementary Table  S1 ). These collections include large databases such as JASPAR  (19)  and FootprintDB (21), as well as more specific ones such as ANISEED  (22) , Regu-lonDB  (23)  or RNA binding motifs, covering all kingdoms (Metazoa, Prokaryotes, Fungi, Plants).
JASPAR  (19)  provides matrix-clustering results for each release, to provide information on the redundancy of motifs (https://jaspar. genereg. net/matrix-clusters/). As there is no standard format for the PSSMs files, the tool convert-matrix performs interconversion between multiple motifs formats, and generates graphical representations of motifs in the form of logos. This allows users to focus on their scientific questions rather than formatting issues. Control datasets can be built by generating permuted versions of PSSMs with permute-matrix or simulated matrix with random-motif.
Lists of genetic variants as VCF files Lists of genetic variants (SNPs, indels) can be retrieved from Genome-wide Association Studies (GWAS) and from databases such as Ensembl. A standard question is 'Which non-coding variants are affecting TF binding on cisregulatory elements?' RSAT provides variation-tools  (25) , a series of programs to obtain information on individual variants, extract their flanking sequences, scan these flanking sequences with motif collections and predict which variants may affect TF binding. Control datasets can be built by generating permuted versions of PSSMs with permute-matrix. Use case 3 (3) combines convert-variations, retrieve-variation-seq and variation- scan on a VCF-formatted file specifying allelic variants detected in melanoma. It illustrates how scanning the surrounding sequences of the variants with the AP1 motif enables the identification of potential regulatory variants affecting AP1 binding.
RSAT locally installed organisms and motif collections Since the last NAR Web server issue, we have further extended the number of supported organisms on the pub-lic servers, notably for Plants (+25 genomes) and Prokaryotes (+195 genomes). Some organisms were installed upon user request. As of February 2022, RSAT public servers support 10 076 locally installed genomes, including 9 646 Prokaryotes, 245 Fungi, 186 Protists, 91 Metazoa and 93 Plants. Besides, we have extended the number of external motif databases directly accessible in the common TRANS-FAC format, from 50 to 187 external databases (cf. 'Motifs represented as Position-Scoring Specific Matrices (PSSM) or consensus sequences') (Supplementary Table  S1 ). Some motif collections were added upon user request. Adding Nucleic Acids Research, 2022 5 new collections can now be made directly by a pull request on GitHub.
All collections are freely downloadable to be used independently of RSAT (https://github. com/rsa-tools/ motif databases). Users genome installation requests for servers are welcomed. In order to get a genome installed users have to contact the RSAT team through email 'rsatcontact@list01. biologie. ens. fr' with the information of the requested genome: organism name, genome version, source (i. e. NCBI, ENSEMBL) and url link to the genome data. In the case of motif collections, users can also request additions by providing: name, data, URL link and version information. Furthermore, interested users can install genomes locally in their own RSAT instances. The documentation at https://rsa-tools. github. io/managing-RSAT contains detailed manuals to install genomes from different sources, such as RSAT servers, Ensembl, NCBI and from original FASTA and GTF data files.