dataesr/scientific-paragraphs-categorization huggingface dataset:
𝑏𝐴𝑆𝑊 = 1 |𝑀| + 1 |𝐶 , | + (1 -|𝑠(𝑖)|) !∈, ,∈. Batch ASW range from 0 to 1, with 0 meaning strongly separated batches and 1 meaning ideal mixing of batch. (3) GC: the graph connectivity score measures whether the k-nearest neighbour (KNN) representation of the data connects all cells with the same label. GC is measured by the fraction of cells belongs to the largest connected component (LCC) of the subgraph constructed with all cells i with the same label j, averaged across M cell types. 𝐺𝐶 = 1 |𝑀| + |𝐿𝐶𝐶:𝐺(𝑁 / ; 𝐸 / )>| |𝐶 , | ,∈. GC range from 0 (exclusive) to 1, with the lowest possible score meaning entire separation of cells with the same label in the graph and 1 meaning complete connection between cells with same label. (4) Batch LISI score: LISI is a measurement of the degree of concentration when individuals are classified into types.
Biology conservation metrics We calculate cLISI, cell type silhouette, NMI, ARI and trajectory conservation as biology conservation metrics using the scIB framework. (1) Cell type LISI (cLISI): If cell type label is used as groups in LISI score calculation, well separated cell types in data will lead to a lower LISI. We reversely scale cLISI to a value between 0 and 1 where 0 indicates cell type mixing and 1 means cell types are kept distinguishable. (2) Cell type average silhouette width (cASW): the cASW is to scale the ASW of cell types to a score between 0 and 1. 0 means there is higher intra-cluster heterogeneity and 1 means well separated, clear cell types.
tl. dpt with default parameters to calculate pseudotime coordinate of cells. The dpt score of each cell is given as input to scIB to compare between pre and post integration for each species. The BENGLE pipeline is available at https://github. com/Functional-Genomics/CrossSpeciesIntegration. Codes and source data for generating the figures in this study are deposed at https://github. com/Functional-Genomics/BENGAL_reproducibility. The package scOntoMatch is available through CRAN https://cran. rproject. org/web/packages/scOntoMatch/index. html, which works on Seurat objects, or https://github. com/Functional-Genomics/scOntoMatch which have two versions that operates on AnnData objects or Seurat objects. published annotation 2) when ontology annotation granularity is incomparable cross datasets, one-toone homology between cell types need to be robustly aligned.
Data and codes availability 3) genes are grouped and translated across species by homology defined in ENSEMBL multiple species comparison tool. Raw count matrices are then concatenated across species using four possible homology matching methods respective to method inputs. 4) run 9 integration algorithms to generate integrated output. 5) preform integration assessment from species mixing, biology conservation and annotation transfer. BENGAL: BENchmarking inteGration strAtegies for cross-species anaLysis of single cell transcriptomics data; QC: quality control; MT: mitochondrial; SCCAF: single cell clustering assessment framework; AUC: area under curve, CV: cross-validation. Created with BioRender. com. scrofa: Sus scrofa; O2O: only use one-to-one orthologs; HE: one-to-one orthologs plus one-to-many and many-to-many orthologs matched by higher average expression level; SH: one-to-one orthologs plus one-to-many and many-to-many orthologs matched by stronger homology confidence; Astro:  O2O, only use one-to-one orthologs; HE, one-to-one orthologs plus one-to-many and many-to-many orthologs matched by higher average expression level.
AUC: area under curve; HM: human and macaque; HMM: human, macaque and mouse; HMMX: human, macaque, mouse and xenopus; HMMXD: human, macaque, mouse, xenopus and zebrafish. Table  1  Overview of the tasks used in this study for benchmarking cross-species integration strategies. Number of cells refers to cells passing quality control in the original literature that are included during the integration. Number of homologous genes refer to genes used during the integration according to following criteria: 1) quantified in each dataset 2) can be mapped to an ENSEMBL gene ID 3) have homology annotation among species in ENSEMBL multiple species comparison tool (version 106). One-to-one orthologs and in-paralogs, including one-to-many and many-to-many orthologs are defined in ENSEMBL and accessed via biomaRt.
Introduction Viral zoonotic disease has had a major impact on human health over the past century despite dramatic advances in medical science, notably the 1918 Spanish influenza, AIDS, SARS, Ebola, and COVID-19. There are an estimated 3×10 5 mammalian virus species  [3]  from which infectious diseases in humans may arise  [4] , of which only a fraction is currently known. Global survey and monitoring of virus diversity is required for improved prediction and prevention of future epidemics; this effort is a focus of international consortia and hundreds of research laboratories worldwide  [5, 6]. Virus discovery can be aided through re-analysis of the petabases of high-throughput sequencing data available in public databases such as the Sequence Read Archive (SRA)  [1, [7] [8] [9] [10] [11] [12].
This data spans millions of ecologically diverse biological samples, many of which capture viral transcripts incidental to the goals of the original studies  [13]. To catalyse global virus discovery, we developed the Serratus cloud computing infrastructure for ultra-high throughput sequence alignment. We screened 5. 7 million libraries comprising 10. 2 petabases (10. 2×10 15 bases) of sequencing data, and report 883,502 RNA-dependent RNA polymerase (RdRP)-containing contigs which cluster at 90% amino-acid identity into 140,208 species-like operational taxonomic units (sOTUs), of which 132,260 were novel, i. e. >10% diverged from a previously known RdRP. We assembled 11,120 runs identified in this screen, recovering coronavirus and corona-like virus contigs including sequences from nine novel sOTUs.
Accessing the planetary virome with petabase-scale alignment Serratus is a free, open-source cloud-computing infrastructure optimised to enable petabase-scale sequence alignment against a set of query sequences. Using Serratus, we aligned in excess of one million short-read sequencing datasets per day for under 1 US cent per dataset (Extended Figure  1 ). We used a widely available commercial computing service to deploy up to 22,250 virtual CPUs simultaneously (see Methods), leveraging SRA data mirrored onto cloud platforms as part of the NIH STRIDES initiative  [14]. Our search space spans data deposited over 13 years from every continent and ocean, and all kingdoms of life (Figure  1 ). We applied Serratus in two of many possible configurations. First, to identify libraries containing known or closely related viruses we searched 3,837,755 (ca.
May 2020) public RNA-seq, meta-genome, meta-transcriptome, and meta-virome datasets (termed sequencing runs  [1] ) against a nucleotide pangenome of all known coronavirus sequences plus all vertebrate RefSeq viruses (Extended Figure  3 ). We then aligned 5,686,715 runs (ca. January 2021) against known viral RdRP amino acid sequences, completing this search within 11 days (Figure  1a  and Methods). Previous approaches for identifying sequences across the entire SRA rely on pre-computed indexes  [15] [16] [17]  requiring exact substring or hash-based matches which limit sensitivity to diverged sequences (Extended Figure  1f ). Pre-assembled reads (e. g. NCBI Transcriptome Shotgun Assembly database  [2] ) enable efficient alignment-based searches,  [8] , but are currently available only for a small fraction of the SRA.
8,871/15,016 (59%) of known RdRP species-like operational taxonomic units (sOTUs) were observed in the SRA, and 131,957 unique and novel RdRP sOTUs were identified (see Extended Figure  2 ). sOTUs identified in multiple taxonomic groups are counted in each group separately, numbers shown indicate the number of novel sOTUs in each group. b Release dates of the runs included in the analysis reflecting the growth rate of available data. c Sample locations for 635,656 RdRP-containing contigs (27. 8% of samples lacked geographic metadata). The high density of RdRP seen in North America, Western Europe and Eastern Asia reflects the substantial acquisition bias for samples originating from these regions. Interactive map is available at https://serratus. io/geo. A, B,  and C ), including intervening variable regions, exemplified within full-length poliovirus RdRP structure with essential aspartic acid residues(*) (pdb: 1RA6  [20] ).
Conservation was calculated from RdRP alignment in  [21] , trimmed to the poliovirus sequence; motif sequence logos are shown below. b Per-phylum histogram of amino acid identity of novel species-like operational taxonomic units (sOTUs) aligned to the NCBI non-redundant protein database. inlay Preston plot of palmprint abundances indicates that singleton palmprints (i. e. , observed in exactly one run) occur within 95% confidence intervals of the value predicted by extrapolation from high-abundance palmprints (linear regression applied to log-transformed data), and this distribution is consistent through time (Extended Figure  2 ). (20. 7%) contained a high-confidence palmprint identified by Palmscan (false discovery rate = 0. 001, further discussed in a companion manuscript  [19] ), representing 260,808 unique palmprints.
Applying Palmscan to reference sequence databases  [2, 21, 22]  we obtained 45,824 unique palmprints, which clustered into 15,016 known sOTUs. If a newly acquired palmprint aligned to a known palmprint at ≥90% identity, it was assigned membership to that reference sOTU, otherwise it was designated novel. We clustered novel palmprints at 90% identity, obtaining 131,957 novel sOTUs, representing an increase of known RNA viruses by a factor 9. 8. Clustering novel palmprints at genus-like 75% and family-like 40% thresholds yielded 78,485 and 3,599 novel OTUs, representing increases of 8. 0x and 1. 9x, respectively (Figure  2b ). We extracted host, geospatial, and temporal metadata for each biological sample when available (Figure  1c ), noting that the majority (88%) of novel RdRP sOTUs were observed from metagenomic or environmental runs, where accurate host inference is challenging.
Expanding the scope of known Coronaviridae The SARS-CoV-2 pandemic has significantly impacted human society. We further exemplify the potential of Serratus for virus discovery with Coronaviridae (CoV), including a recently proposed sub-family  [24]  which contains a CoV-like virus, Microhyla alphaletovirus 1 (MLeV), in the frog Microhyla fissipes, and Pacific salmon nidovirus (PsNV) described in the endangered Oncorhynchus tshawytscha  [25]. First, we identified 52,772 runs containing ≥ 10 CoV-aligned reads or ≥ 2 CoV k-mers (32-mer,  [17] ). These runs were de novo assembled with a new version of synteny-informed SPAdes called coronaSPAdes (discussed in a companion manuscript  [26] ). This yielded 11,120 identifiable CoV contigs which we annotated for a comprehensive assemblage of Coronaviridae in the SRA (see Methods for discussion).
With this training data we defined a scoring function to predict subsequent success of assembly (Extended Figure  3c ). CoV and neighbouring palmprints comprise 70 sOTUs, 44 of which are described in public databases. 17 CoV sOTUs contained partial RdRP (inclusive of full palmprint) from an amplicon-based virus discovery study not yet publicly deposited  [27]. The remaining 9 sOTUs are novel viruses, with protein domains consistent with a CoV or CoV-like genome organisation (Extended Figure  4 ). We operationally designate MLeV, PsNV and the nine novel viruses broadly as group E, noting that all were found in samples from non-mammalian aquatic vertebrates (Figure  3 ). Notably, Ambystoma mexicanum (axolotl) nidovirus (AmexNV) was assembled in 18 runs, 11 of which yielded common 19 kb contigs.
Discussion Since the completion of the the human genome, growth of DNA sequencing databases has outpaced Moore's Law  [49]. Serratus provides rapid and focused access to genomic sequences captured over more than a decade by the global research community which would otherwise be inaccessible in practice. This work and further extensions of petabase scale genomics  [16, 17, 50]  are shaping a new era in computational biology, enabling expansive gene discovery, pathogen surveillance, and pangemomic evolutionary analyses. Optimal translation of such massive datasets into meaningful biomedical advances requires free and open collaboration amongst scientists  [51, 52]. The current pandemic underscores the need for prompt, unrestricted and transparent data sharing. With these goals in mind, we deposited 7.
3 terabytes of virus alignments and assemblies into an open-access database which can be explored via a graphical web interface at https://serratus. io or programatically through the tantalus R package and its PostgreSQL interface. The "metagenomics revolution" of virus discovery is accelerating  [22, 53]. Innovative fields such as highthroughput viromics  [54]  can leverage vast collections of virus sequences to inform policies that predict and mitigate emerging pandemics  [55, 56]. Combining ecoinformatics with virus, host, and geotemporal metadata offers a proof of concept for a global pathogen surveillance network, arising as a byproduct of centralised and open data sharing. Human population growth and encroachment on animal habitats is bringing more species into proximity, leading to increased rate of zoonosis  [4]  and accelerating the Anthropocene mass extinction  [57, 58].
Serratus alignment architecture Serratus (https://github. com/ababaian/serratus) is an open-source cloud-infrastructure designed for ultrahigh throughput sequence alignment against a query sequence or pangenome (Extended Figure  1 ). Serratus compute costs are dependent on search parameters (expanded discussion available: https://github. com/ababaian/ serratus/wiki/pangenome_design). The nucleotide vertebrate viral pangenome search (bowtie2, database size: 79. 8 Mb) reached processing rates of 1. 29 million SRA runs in 24-hours at a cost of $0. 0062 US dollars per dataset (Extended Figure  1 ). The translated-nucleotide RdRP search (DIAMOND, database size: 7. 1 Mb) reached processing rates exceeding 0. 5 million SRA runs in 12-hours at a cost of $0. 0042 per dataset. All 5,686,715 runs analysed in the RdRP search were completed within 11 days for a total cost of $23,980 or $2,350 per petabase.
Computing cluster architecture The processing of each sequencing library is split into three modules dl (download), align, and merge. The dl module acquires compressed data (. sra format) via prefetch, from the Amazon Web Services (AWS) Simple Storage Service (S3) mirror of the Sequence Read Archive (SRA), decompresses to FASTQ with fastq-dump, and splits the data into chunks of 1 million reads or read-pairs (fq-blocks) into a temporary S3 cache bucket. To mitigate excessive disk usage caused by a few large datasets, a total limit of 100 million reads per dataset was imposed. The align module reads individual fq-blocks and aligns to an indexed database of user-provided query sequences using either bowtie2 (v2. 3. 4. 1,--very-sensitive-local)  [59]  for nucleotide search, or DIAMOND (v2. 0.
6development version, --mmap-target-index --target-indexed --masking 0 --mid-sensitive -s 1 -c1 -p1 -k1 -b 0. 75 )  [60]  for translated-protein search. Finally, the merge module concatenates the aligned blocks into a single output file (. bam for nucleotide, or. pro for protein) and generates alignment statistics with a Python script (see Summarizer below).
To exploit this, we used S3 buckets as a data buffering and streaming system to transfer data between instances following methods developed in a previous cloud architecture (https: //github. com/FredHutch/sra-pipeline). This, combined with splitting of FASTQ files into individual blocks, effectively eliminated file input/output (i/o) as a bottleneck, since the available i/o is multiplied per running instance (conceptually analogous to a RAID0 configuration or a Hadoop distributed filesystem  [61]. Using S3 as a buffer also allowed us to decouple the input and output of each module. S3 storage is cheap enough that in the event of unexpected issues (e. g. , exceeding EC2 quotas) we could resolve system problems in realtime and resume data processing. For example, shutting down the align modules to hotfix a genome indexing problem without having to re-run the dl modules, or if an alignment instance is killed by a Spot termination, only that block needs to be reprocessed instead of the entire sequencing run.
If an instance has disappeared due to SPOT termination or manual shutdown, it resets the job allowing it to be processed up by the next available instance. To monitor cluster performance in real-time, we used Prometheus and node exporter to retrieve CPU, disk, memory, and networking statistics from each instance, postgres exporter to expose performance information about the work queue, and Python exporter to export information from the Flask server. This allowed us to identify and diagnose performance problems within minutes to avoid costly overruns.
Generating viral summary reports We define a viral pangenome as the entire collection of reference sequences belonging to a taxonomic viral family, which may contain both full-length genomes and sequence fragments such as those obtained by RdRP amplicon sequencing. We developed a Summarizer module written in Python to provide a compact, human-and machine-readable synopsis of the alignments generated for each SRA dataset. The method was implemented in serratus summarizer. py for nucleotide alignment and serratus psummarizer. py for amino acid alignments. Reports generated by the Summarizer are text files with three sections described in detail online (https://github. com/ababaian/serratus/ wiki/. summary-Reports). In brief, each contains a header section with alignment meta-data and one-line summaries for each virus family pangenome, reference sequence and gene respectively, with gene summaries provided for protein alignments only.
Identification of viral families within a sequencing dataset The Summarizer implements a binary classifier predicting the presence or absence of each virus family in the query. For a given family F , the classifier reports a score in the range [0,100] with the goal of assigning a high score to a dataset if it contains F and a low score if it does not. Setting a threshold on the score divides datasets into disjoint subsets representing predicted positive and negative detections of family F. The choice of threshold implies a trade-off between false positives and false negatives. Sorting by decreasing score ranks datasets in decreasing order of confidence that F is present in the reads. Naively, a natural measure of the presence of a virus family is the number of alignments to its reference sequences.
However, alignments may be induced by non-homologous sequence similarity, for example low-complexity sequence. The score for a family was therefore designed to reflect the overall coverage of a pangenome because coverage across all or most of a pangenome is more likely to reflect true homology, i. e. the presence of a related virus. Ideally, coverage would be measured individually for each base in the reference sequence, but this could add undesirable overhead in compute time and memory for a process which is executed in the Linux alignment pipe (FASTQ decompression → aligner → Summarizer → alignment file compression). Coverage was therefore measured by binning as described above, which can be implemented with minimal overhead. A virus that is present in the reads with coverage too low to enable an assembly may have less practical value than an assembled genome.
g. a single local alignment of a reference to a read (maximising sensitivity, but not always useful in practice); a micro-assembled palmprint; a full assembly contig that contains a complete palmprint or otherwise classifiable fragment of a maker gene; or an assembly of a complete genome. We assessed alignment sensitivity of bowtie2 --very-sensitive-local and Serratus-optimised DIAMOND as a function of identity by simulating typical examples in representative scenario: unpaired reads of length 100 with a base call error rate of 1%. We manually selected test-reference pairs of RefSeq complete Ribovirus genomes at RdRP aa identities 100%, 95%. 20%, generating simulated length-100 reads at uniformly-distributed random locations in the test genome with a mean coverage of 1000x. For the complete reference genome was used as a reference; for DIAMOND the reference was the translated amino acid sequence of the RdRP gene ( 400aa), which was identified by aligning to the Wolf18 dataset.
Nucleotide search pangenomes To create a collection of viral pangenomes, a comprehensive set of complete and partial genomes representing the genetic diversity of each viral family, we used two approaches. For Coronaviridae, we combined all RefSeq (n = 64) and GenBank (n = 37,451) records matching the NCBI Nucleotid server query "txid11118[Organism:exp]" (date accessed: June 1st 2020). Sequences <200 nt were excluded as well as sequences identified to contain non-CoV contaminants during preliminary testing (such as plasmid DNA or ribosomal RNA fragments). Remaining sequences were clustered at 99% identity with UCLUST  [62]  and masked by Dustmasker  [63]  with --window 30 and --window 64. The final query contained 10,101 CoV sequences (accessions in Extended Table  1a , masked coordinates in Extended Table  1b ).
Viruses[Organism] AND srcdb refseq[PROP] NOT wgs[PROP] NOT cellular organisms[ORGN] NOT AC 000001:AC 999999[PACC] AND ("vhost human"[Filter] AND "vhost vertebrates"[Filter])" (date accessed: May 17th 2020). Retroviruses (n = 80) were excluded as preliminary testing yielded excessive numbers of alignments to transcribed endogenous retroviruses. Each sequence was annotated with its taxonomic family according to its RefSeq record; those for which no family was assigned by RefSeq (n = 81) were designated as "unknown". The collection of these pangenomes was termed cov3m, and was the sequence reference used for this study. ) All viral GenBank protein sequences were aligned with diamond --ultra-sensitive against the combined 'wolf18' and 'wolf20' sequences (E-value These produced local alignments which contained truncated RdRP, so each RdRP-containing GenBank sequence was then re-aligned to the 'wolf18' and 'wolf20' collection to "trim" them to 'wolf' RdRP boundaries.
4) The above algorithm was also applied to all viral GenBank nucleotide records to capture additional RdRP not annotated as such by GenBank. A region of HCV capsid protein shares similarity to HCV RdRP, sequences annotated as HCV-capsid were therefore removed. Eight novel coronavirus RdRP sequences identified in a pilot experiment were added manually. The combined RdRP sequences from the above collections were clustered (uclust) at 90% amino acid identity and the resulting representative sequences (centroids, N = 14 653) used as the rdrp1 search query. In addition, we added Deltavirus antigen proteins from NC 001653, M21012, X60193, L22063, AF018077, AJ584848, AJ584847, AJ584844, AJ584849, MT649207, MT649208, MT649206, NC 040845, NC 040729, MN031240, MN031239, MK962760, MK962759, and eight additional homologs we identified in a pilot experiment.