dataesr/scientific-paragraphs-categorization huggingface dataset:
The expected frequencies of the four haplotypes are p 1 p 2 , p 1 (1-p 2 ) : : : etc. from which we generated four random variates from a multinomial distribution for a sample size of N chromosomes using Mathematica version 11; for each sample of haplotypes we calculated r 2. We repeated this procedure 10,000 times and calculated the mean to estimate the expected value of r 2. We found that the expected value of r 2 is independent of the allele frequencies. To investigate the relationship between the non-synonymous, p N , and synonymous, p S , nucleotide diversity we used a variation of the method of James, Castellano & Eyre-Walker (2017) to combine data from different genes. If the distribution of fitness effects of new mutations is a gamma distribution (assuming most mutations are deleterious) then log(p N ) is expected to be linearly correlated to log(p S ) if there is variation in N e  (Welch, Eyre-Walker & Waxman, 2008).
Data Availability The following information was supplied regarding data availability: The sequences are available from the NCBI genome repository: N. gonorrhoeae: NC_011035, NC_022240, NZ_CP012026, NZ_CP012027, NZ_CP012028, NZ_CP016015, NZ_CP016016, NZ_CP016017, NZ_CP020415, NZ_CP020418, NZ_CP020419, NZ_LT906437, NZ_LT906440, NZ_LT906472. N. meningitidis: MC58, NC_003116, NC_008767, NC_010120, NC_013016, NC_017501, NC_017505, NC_017512, NC_017513, NC_017514, NC_017515, NC_017516, NC_017517, NC_017518, NZ_CP007524, NZ_CP009418, NZ_CP009419, NZ_CP009420, NZ_CP009421, NZ_CP016684. Codes written to analyse the sequences are available as Code S1.
However, a new set of methods have been proposed to correct genomic long reads. There exist two types of long-read error-correction algorithms, those using information from long reads only (self or non-hybrid correction), and those using short reads to correct long reads (hybrid correction). In this article, we will report on the extent to which state-of-the-art tools enable to correct long noisy RNA-seq reads produced by Nanopore sequencers. Several tools exist for error-correcting long reads, including ONT reads. Even if the error profiles of Nanopore and PacBio reads are different, the error rate is quite similar and it is reasonable to expect that tools originally designed for PacBio data to also perform well on recent Nanopore data. There is, to the best of our knowledge, very little prior work that specifically addresses error-correction of RNA-seq long reads.
g. HG-Color  [39] , HECIL  [40] , MIRCA  [41] , Jabba  [42] , nanocorr  [43] , and Racon  [44]. Other works have evaluated error correction tools in the context of DNA sequencing. LRCstats  [45] , and more recently ELECTOR  [46] , provide automated evaluations of genomic long read correction using a simulated framework. A technical report from Bouri and Lavenier  [47]  provides an extensive evaluation of PacBio/Nanopore error-correction tools, in the context of de novo assembly. This analysis is completed with more recent results in Fu et al. [48]  on hybrid correction methods. Perhaps the closest work to ours is the AlignQC software  [21] , which provides a set of metrics for the evaluation of RNA-sequencing long-read dataset quality. In Weirather et al. [21]  a comparison is provided between Nanopore and PacBio RNA-sequencing datasets in terms of error patterns, isoform identification and quantification.
Evaluation datasets Our main evaluation dataset consists of a single 1D Nanopore run using the cDNA preparation kit of RNA material taken from a mouse brain, containing 740,776 long reads. An additional Illumina dataset containing 58 million paired-end 151 bp reads was generated on the same sample but using a different cDNA protocol. For more details on the sequencing protocol, see Section 4. The Nanopore and Illumina reads from the mouse RNA sample are available in the ENA repository under the following study: PRJEB25574. In this paper, we provide a detailed analysis of this dataset, from Section 2. 3 to Section 2. 11. In order to obtain a more comprehensive understanding of the evaluated tools, we further analysed the correction of the methods on one human Nanopore direct RNA sequencing data from the Nanopore-WGS-Consortium (dataset from centre Bham, run#1, sample type RNA, kit SQK-RNA001, pore R9.
Surprisingly, the non-hybrid tools also presented very low mismatches rates: all of them showed rates lower than 1%, except for Canu (1. 33%) and daccord (1. 1%). This suggests that the rate of systematic substitution errors in ONT data is low, as self-correctors were able to achieve results comparable to the hybrid ones, even without access to Illumina reads. Still, the three best performing tools were all hybrid (NaS(µ), PBcR(s), and Proovread(t)), which should therefore be preferred for applications that require very low mismatch rates. The contrast between self and hybrid tools is more visible on deletion errors. In general, all hybrid tools outperformed the non-hybrid ones (the only exception is LSC (2. 64%), with higher deletion error rate than LoRMA(s) (2. 51%)). Although in the hybrid ones, LoRDEC (2.
Error-correction perturbs the number of reads mapping to the genes and transcripts Downstream RNA-sequencing analyses typically rely on the number of reads mapping to each gene and transcript for quantification, differential expression analysis, etc. In the rest of the paper, we define the coverage of a gene or a transcript as the number of reads mapping to it. For short we will refer to those coverages as C G and C T , respectively. In this section we investigate if the process of error correction can perturb C G and C T , which in turn would affect downstream analysis. Note that error correction could potentially slightly increase coverage, as uncorrected reads that were unmapped can become mappable after correction. Figure  1  shows the C G before and after correction for each tool. We can note, as expected, that splitting a long read into several well-corrected fragments generates multiple counts, skewing up the observed coverages (see HALC(s), LoRDEC(s), PBcR(s), LoRMA(s) in Figure  1 ).
Minor isoforms are corrected towards major isoforms We define a major isoform of a gene as the isoform with the highest coverage of that gene in the raw dataset, all other isoforms are considered to be minor. To follow-up on the previous subsection, we investigate whether correctors tend to correct minor isoforms towards major isoforms. We do so by comparing the difference of coverage of the major and the minor isoforms before and after correction. In Figure  5 , we observe that the coverage of the major isoform generally slightly increases after correction. The exceptions are tools that split reads (HALC(s), LoRDEC(s), PBcR(s), and LoRMA(s)), where the coverage is increased significantly, and MECAT, where the coverage decreases significantly, likely due to a feature of MECAT's own correction algorithm.
Since these 5 tools seem to heavily distort the coverage of isoforms due to aggressive splitting or filtering steps, we will focus now on the 14 other results. The slight increase of a transcript coverage after correction is expected, as already discussed in Section 2. 6: uncorrected reads that were unmapped can become mappable after correction. Therefore, the effect presented in Figure  5  could be simply due to reads being corrected to their original respective isoforms, instead of correction inducing a switch from a minor isoform to the major isoform. To verify this hypothesis, Supplementary Material Figure  S4  shows that the coverage of the minor isoforms usually decreases after correction (R 2 ∈ [0. 5; 0. 8]), except for: i) tools that split reads (HALC(s), LoRDEC(s), PBcR(s), LoRMA(s)), which skews even more the coverage of minor isoforms, and ii) both HALC and HALC(t).
Correction towards the major isoform is more prevalent when the alternative exon is small In order to observe if particular features of alternative splicing have an impact on error-correction methods, we designed a simulation over two controlled parameters: skipped exon length and isoform relative expression ratio. Using a single gene, we created a mixture of two simulated alternative transcripts: one constitutive, one exon-skipping. Several simulated read datasets were created with various relative abundances between major and minor isoform (in order to model a local differential in splicing isoform expression), and sizes of the skipped exon. Due to the artificial nature and small size of the datasets, many of the error-correction methods could not be run. We thus tested these scenarii on a subset of the correction methods.
In Figure  6 , we distinguish results from hybrid and self-correctors, presented with respectively 100x coverage of short reads and 100x coverage of long reads, and only 100x coverage of long reads. Results on more shallow coverage (10x) and impact of simulation parameters on corrected reads sizes are presented in Supplementary Material Sections S7 and S8. Overall, hybrid correctors are less impacted by isoform collapsing than self-correctors. LoRDEC shows the best capacity to preserve isoforms in presence of alternatively skipped exons. Thus, regardless of the abundance of inclusion reads in the dataset to be corrected, 99% of reads from inclusion are corrected to inclusion form for an exon size of 10, and 100% of reads from inclusion are corrected to inclusion form for exon sizes of 50 and 100.
However with less coverage, e. g. due to low-expressed genes and rare transcripts, all tools tend to mis-estimate the expression of isoforms (see Supplementary Material Sections S7 and S8). Self-correctors generally have a minimum coverage threshold (only daccord could be run on the 10x coverage dataset of long reads, with rather erratic results, see Supplementary Material Section S8). Even with higher coverage, not all correctors achieve to correct this simple instance. Among all correctors, only LoRDEC seems to report the expected number of each isoforms consistently in all scenarii. We could not derive any clear trend concerning the relative isoform ratios, even if the 90% ratio seems to be in favor of overcorrection towards the major isoform. Skipped exon length seems to impact both hybrid and self-correctors, small exons being a harder challenge for correctors.
Error-correction affects splice site detection The identification of splice sites from RNA-seq data is an important but challenging task  [50]. When mapping reads to a (possibly annotated) reference genome, mapping algorithms typically guide spliced alignments using either a custom scoring function that takes into account common splices sites patterns (e. g. GT-AG), and/or a database of known junctions. % of inclusion (major) isoform in expressed RNA % of reads corrected to inclusion (major) isoform Fig. 6. Mapping of simulated raw and error-corrected reads to two simulated isoforms, and measurements of the percentage of reads mapping to the major isoform. The two isoforms represent an alternatively skipped exon of variable size: 10 bp, 50 bp, 100bp. Left: isoform structure conservation using 100X short reads coverage and 10X long reads, using three error-correction programs, one per row: LoRDEC, PBcR, and proovread.
Running time and memory usage of error-correction tools Table  5  shows the running time and memory usage of all evaluated tools, measured using GNU time. The running time shown is the elapsed wall clock time (in hours) and the memory usage is the maximum resident set size (in gigabytes). All tools were ran with 32 threads. Overall, all tools were able to correct the dataset within 7 hours, except for LSC, NaS, PBcR, and Proovread, which took 63-116 hours, but also achieved some of the lowest post-correction error rates in Table  2  (except for LSC). In terms of memory usage, all tools required less than 10 GB of memory except for HALC, PBcR, Proovread and LoRMA, which required 53-166 GB. It is worth noting, however, that hybrid error correctors have to process massive Illumina datasets, which contributes to them taking higher CPU and memory usage for correction.
We thus further mapped with Minimap2 (version 2. 14-r883 with parameters -ax splice) the following read datasets: i) raw reads; ii) LoRDEC, the  1 NaS was ran in batches on a different system (TGCC cluster) than other tools; total running time was estimated based on subset of batches. 2 PBcR was ran on a machine different from the others. 3 daccord and pbdagcon need DAZZ_DB and DALIGNER to be ran before performing their correction. DAZZ_DB execution time and memory usage was disregarded due to being negligible. DALIGNER, however, took 0. 5h and 27. 2Gb of RAM. The runtime in parenthesis denotes the runtime of the tool plus DALIGNER. The memory usage in parenthesis denotes the maximum memory usage between the tool and DALIGNER. 4 LoRMA was using more than its allocated 32 cores in some (short) periods of time during the run.
On the other hand, Minimap2 was considerably better than GMAP on mapping splice sites correctly. The difference between both mappers when they performed well, mapping more than 96. 9% of the splice sites, was not significant (≤1. 15%). The largest discrepancies can be seen on mapping the splice sites of the raw and Canu reads, with Minimap2 correctly aligning 18. 49% and 6. 64% more splice sites than GMAP. We can thus conclude that Minimap2 was slightly better on mapping reads and bases, and significantly better at correctly mapping splice sites. On the other hand, GMAP was considerably better at detecting genes. The error rate of the reads mapped by both tools are very similar, with GMAP reporting slightly more mismatches, and Minimap2 reporting slightly more deletions and insertions. However, these differences are mainly concentrated on the raw reads dataset, which is the less accurate.
Analysing human Nanopore direct RNA-sequencing data We further analysed a human Nanopore direct RNA-sequencing dataset from the Nanopore-WGS-Consortium (see Section 2. 2 for details). Since there was no corresponding Illumina sequencing for this dataset, we were able to evaluate only the non-hybrid error correction tools. Moreover, although LoRMA could be successfully executed, AlignQC could not process its output so we removed LoRMA from the evaluation. Table  7  presents some main statistics of non-hybrid error correction tools on the aforementioned dataset. In the rest of this section, we highlight the major differences and similarities between cDNA and direct RNA datasets, keeping in mind that they were performed on two different species (human and mouse, respectively). In general, self-correctors discarded more reads on the direct RNA dataset than on the 1D cDNA dataset.
Daccord(t) discarded the least number of reads (102k), while Canu and MECAT discarded a considerable amount of reads (361k and 670k, respectively), due to post-correction filtering. Due to our choice of parameters, the shortest reads in Canu and MECAT outputs were of lengths 101 and 100 bases, respectively. However, the removal of shorter reads explains only a fraction of the read losses, as the raw dataset contains only ∼59k reads smaller than 101 bases. GMAP mapped a smaller percentage of raw reads in the direct RNA dataset (76% vs 83. 5% for the 1D cDNA dataset), but on the other hand, the mapping rate of error-corrected reads was generally higher. Notably, 97. 5% of the daccord reads (resp. 98. 2% for daccord(t)) were mapped, as opposed to 92. 5% (resp. 94%) in the 1D cDNA dataset. The mean length of the corrected reads when compared to the mean length of the raw reads was also in general higher in the direct RNA dataset, which translated into tools having a number of output bases more similar to the number of bases in the raw reads in this dataset, except for MECAT.
The error rate of the raw direct RNA reads was 14. 61%, 0. 89% higher than in the raw 1D cDNA reads. As expected, the error rates in all tools were also higher in the direct RNA dataset, leading to worse results. The largest difference is with pbdagcon(t), where the error rate after correction of direct RNA reads is 2. 55% higher than on the 1D cDNA dataset. The distribution of errors in the direct RNA dataset was more balanced, with mismatches and deletions having almost the same representation (around 5. 85%), but insertions still being less represented (2. 87%). The correction behaviour of the tools is similar across both datasets: insertion is the best corrected type of error, followed by mismatches, with satisfactory results, and deletions, in which the methods overall did a poor job.
In particular, pbdagcon and pbdagcon(t) even increased the deletion error rate by 0. 84% and 0. 99%, respectively. The behaviour was similar on correcting homopolymer errors: homopolymer deletions were poorly corrected, with MECAT, pbdagcon and pbdagcon(t) not reducing the homopolymer deletion error rate at all, while homopolymer insertions were well corrected. The number of detected genes in the raw direct RNA dataset (14. 1k) is less than in the raw 1D cDNA dataset (16. 8k), although this is consistent with the difference in human/mouse genes count. Moreover, the tools also lose more genes in the direct RNA dataset. In particular, MECAT loses 6. 4k genes in the 1D cDNA dataset, and 7. 8k in the direct RNA dataset. The rate of correctly mapped splice sites was slightly higher in the raw direct RNA reads (76.
Funding This work was supported by the  French National Research Agency [ANR ASTER ,  ANR-16-CE23-0001 ]; the  INCEPTION  project  [PIA/ANR-16-CONV-0005 ]; and the  Brazilian Ministry of Science, Technology and Innovation (in portuguese, Ministério da Ciência, Tecnologia e Inovação -MCTI)  through the  National Counsel of Technological and Scientific Development (in portuguese ,  Conselho Nacional de Desenvolvimento Científico e Tecnológico -CNPq) , under the  Science Without Borders (in portuguese, Ciências Sem Fronteiras)  scholarship grant [process number  203362/2014-4  to LL].
Reference-based evaluation of long read error correction A tool coined LR_EC_analyser, available at https://gitlab. com/leoisl/LR_EC_analyser, was developed using the Python language to analyze the output of long reads error correctors. The required arguments are the BAM files of the raw and corrected reads aligned to a reference annotated genome, as well as the reference genome in Fasta file format and the reference annotation in GTF file format. A file specifying the paralogous gene families can also be provided if plots on gene families should be created. In our main analysis, gene families were computed by selecting all paralogs from Ensembl r87 mouse genes with 80%+ identity. Note that paralogs from the same family may have significantly different lengths, and no threshold was applied with respect to coverage.
The complete selection procedure is reported here: https://gitlab. com/leoisl/LR_EC_ analyser/blob/master/GettingParalogs. txt. The main processing of our method involves running the AlignQC software  [21]  (https://github. com/jason-weirather/AlignQC) on the input BAMs and parsing its output to create custom plots. It then aggregates information into a HTML report. For example, Tables  2 3 4 are compilations from AlignQC results, as well as Tables  6  and 7 , and Figure  7. Figures  1 2 3 4 5 were created processing text files built by AlignQC called "Raw data" in their output. In addition, an indepth gene and transcript analysis can be performed using the IGV. js library (https://github. com/igvteam/igv. js) [56, 57]. In this paper, we did not include all plots and tables created by the tool.
Computing resources All the programs were run on the UA Research Computing High Performance Computing (HPC) at the University of Arizona. The cluster used is composed of 28 core processors with 168 gb RAM per node, and is run via a PBS-Pro grid system. All the programs used were installed under a user python virtual environment (pip). The majority of the programs used are available as Bioconda packages for easy installation in non-cluster environments  (Grünings et al. , 2018). They are also provided as Docker containers through Bioconda which can be run through Singularity (https://sylabs. io/) on cluster systems. All command lines are provided in Appendix.
For this reason, and because programs often include third party packages, it is important to keep track of each version used and physically separate the repositories, so the SMRT toolkit was installed in an independent directory with no direct link to the user bin, except for the Blasr program. We modified the split_and_run_sparc. sh script available from the Sparc Github repository so as to call the split_reads_by_backbone. py script externally (Appendix I), and to set the number of chores used by Blasr from the command line. This way, it is easier to rerun the time-consuming Sparc step in case of crash from where it stopped, and after moving the already corrected backbones into another directory. The hybrid assembly was then polished using the PacBio tool in the SMRT toolkit (SMRT Link v4.
Alternative Pipelines DBG2OLC was identified as the only pipeline, among the most recently published assemblers, allowing the assembly of long-reads prior to correction. Alternatively, long-reads may be corrected prior to assembly, as is the case in the Canu pipeline. Other possible correction tools include LSCplus  (Hu, Sun & Sun, 2016) , a modified version of the MHAP tool (indexing kmers used to build the assembly graph in Celera;  (Carvalho, Dupim & Goldstein, 2016) , HALC  (Bao & Lan, 2017) , and FMLRC  (Holt, Wang, Jones & McMillan, 2016) , and most recently (not tested here) MECAT  (Xiao et al. , 2017)  and Jabba  (Miclotte et al. , 2016). The LSCplus package was not available at the time of our study, and we were therefore not able to assess its efficiency. The modified MHAP tool was implemented in Celera only (the older version of Canu), which thus yielded poor results in term of assembly contiguity, and this solution was abandoned.
Assembly quality check Comparisons between assemblies and quality assessment were performed based on assembly statistics from Quast version 4. 6. 2 (Gurevich et al. , 2013)  by comparing each assembly to a reference genome to estimate the number of global and local misassemblies as well as the number of mismatches and indels. For both general statistics (number of fragments, N50) and error rates (presented in Tables  4 5 6 ), we used contigs longer than 400 bp only, so as to run the program faster. We also calculated BUSCO scores using the diptera (odb9) set of Benchmarking Universal Single-Copy Orthologs  (Waterhouse et al. 2017). We used the reference genomes FB2017_01and FB2015_02  (Consortium DG, 2007)  released on FlyBase  (Thurmond et al. , 2019)  for Dmel and CAT, respectively. For SON, we used a template assembly constructed based on the Catalina reference genome  (Allan & Matzkin, 2019).
Acknowledgments CCJ, CWA and LMM reviewed the literature and selected the pipeline. CWA performed DNA extraction. CCJ performed the bioinformatics work with the help of CWA. CCJ wrote the manuscript with contributions from LMM and CWA. Table 1. Sequencing technology and coverage of each data set. b calculated as the total number of bases in data files obtained from converting. bax. h5 files into. bam files, and converting the obtained subreads. bam files into fasta files, with no specific trimming c calculated as the total number of bases in data files after trimming from Platanus_internal_trim. Sparc step ((node=1:ncpus=28:mem=90gb; cput=84:00:00;walltime=03:00:00): sh split_and_run_sparc_ncpus_new. sh. /Cons_backbones 2 28 > Sparclog_Part1. txt (4) Long-read only assembly with Canu canu -p PB_Only_Assembly -d /path_to_curr_dirr genomeSize=123m correctedErrorRate=0.