dataesr/scientific-paragraphs-categorization huggingface dataset:
For this purpose, it is important to select relevant RNAseq datasets with homogeneous characteristics and sufficient samples among thousands of publicly available files. The reanalysis of RNA-seq datasets poses two major challenges. The first challenge is to filter data series and select the most homogeneous and reliable set of libraries for exploration in the context of incomplete metadata  (4). The second challenge is to perform RNA biomarker quantification in reasonable time and with sufficient accuracy to extract biological information in such datasets. Alignmentbased methods like STAR  (5)  and CRAC  (6)  require significant computational resources, making them inadequate for querying datasets on the order of 100-1000 files for a specific biomarker. Pseudo-alignment algorithms like Kallisto  (7)  and Salmon  (8)  are much faster but most commonly use a reference transcriptome far from the real complex biological RNA diversity.
Moreover, classical methods fail to interrogate the whole transcriptome complexity as each RNA is the result of a complex chain of events that combines genetic variation, transcription regulation and RNA processing combined with pathological alterations  (12). The k-mer approach we propose is not an equivalent method compared to the above-mentioned ones, but a new way to explore RNA-seq data that could also be used for in-depth exploration outside the reference. Although any transcript sequence can be decomposed into k-mers, only a subset of these k-mers is specific for the transcript. We call this subset the k-mer signature. These specific k-mers can then be quantified in RNA-seq raw data, making it quick and easy to measure the candidate transcript expression level in a wide range of RNA-seq datasets.
In this paper, we present the Kmerator Suite, a set of three tools designed to (i) extract k-mer signatures from transcripts, (ii) quantify these k-mers into RNA-seq datasets and (iii) visualize large RNA-seq dataset characteristics using precomputed signatures. The core of this suite is Kmerator, which generates k-mer signatures specific for genes or transcripts. The second tool, countTags, is used to quantify selected k-mers across raw RNA-seq files. We first tested the performance of Kmerator + countTags over the whole transcriptome and showed that k-mer signature quantification results were close to simulated count data. The third tool, KmerExploR, demonstrates the capacity of the Kmerator + countTags pipeline combined to a set of predefined kmer signatures, to perform metadata extraction from raw RNA-seq data.
KmerExploR extracts sample characteristics related to the sequencing protocol (ribosomal depletion, polyA+, strand-specific protocol, 5 /3 bias, etc. ), tissue origin (sex) and possible contaminations (mycoplasma, virus, other species or cell lines). Such high-level quality control procedures are valuable as a screening tool before analyzing datasets of uncertain quality, such as public datasets. KmerExploR can also be used in advanced applications to look for user-defined transcripts resulting from mutated alleles or gene fusions in RNA-seq datasets.
Kmerator: k-mer signature identification An overview of the Kmerator Suite is provided in Fig-  ure 1A. Kmerator is a tool designed for the prediction of specific k-mers from input sequences, considering a reference genome and an Ensembl-like fasta transcriptome (see Figure  1A  and Supplementary Figure  S1A ). It is implemented in Julia programming language (https:// julialang. org) and distributed with GitHub (https://github. com/Transipedia/kmerator). Kmerator strictly depends on a reference genome [fasta or Jellyfish  (13)  index format] and on an Ensembl fasta format transcriptome, to define a k-mer as specific or not, depending on the number of occurrences on each reference. The reference genome and transcriptome fasta, used in this paper, have been downloaded here: https://www. ensembl.
org/info/data/ftp/index. html. The procedure also needs a list of gene/transcript Ensembl IDs (or gene symbols) or sequences in fasta format from which Kmerator will extract specific k-mers. As shown in Supplementary Figure  S1A , Kmerator first uses the Jellyfish software to index and count k-mers from the reference genome and transcriptome. For both genome and transcriptome fasta files, Jellyfish produces a hash table including all possible k-mers and their number of occurrences. These hash tables are stored for further querying. Second, using Jellyfish query, Kmerator generates, for each input gene/transcript, the list of k-mers derived from this sequence and their corresponding genome and transcriptome counts. These k-mers are then filtered according to the following criteria: (i) only k-mers associated with a biological event (transcript or gene, splice variant, chimeric RNA, circular RNA, etc.
If the candidate transcript is not annotated, the -unannotated option must be added. In this case, k-mers found zero or one time in the reference genome and that do not map to the reference transcriptome are retained. • Chimera level specific k-mers are found neither in the reference genome nor in the reference transcriptome. This level must be combined to the -unannotated option. Kmerator outputs the list of specific k-mers (also called k-mer gene/transcript signature) according to the chosen parameters in fasta format, for each input sequence. Kmerator command line options. The k-mer length can be set using the -length option. In the present study, we used the default 31 nt k-mer length according to the literature  (11). The level of specificity is chosen among 'gene', 'transcript' and 'chimera' with the -level option.
When using the gene level, the APPRIS database (http://appris. bioinfo. cnio. es) can be queried to identify the 'PRINCIPAL' transcript, (2) countTags quantifies input k-mers in a set of input sequencing raw files (fastq files) and outputs a count table. (3) KmerExploR is a particular application of Kmerator/countTags to visualize input RNAseq dataset (set of fastq files) characteristics. The default usage includes characteristics related to the sequencing protocol (ribosomal depletion, polyA+, strand-specific protocol, 5 /3 bias), tissue origin (sex) and possible contaminations (mycoplasma, virus, other species or HeLa cell line). Users can also visualize their own signatures with the advanced usage. Details are given in the text and Supplementary Figure  S1. (B) Kmerator extracts gene/transcript k-mer signatures with three possible levels of stringency.
This figure describes how the different levels are defined (transcript, gene or chimera) for two example genes A and B. Example gene A has three isoforms: A1, A2 and A3. A1 is the only one with a free interval, i. e. a region not covered by other isoforms, and is defined as the principal transcript (APPRIS database). Therefore, at the transcript level, each transcript has its own specific k-mer set, depending on its coverage with other isoforms. At the gene level, the principal transcript defined with the APPRIS database is used, and specific k-mers can be common to several isoforms. At the chimera level (example of A1-B1 fusion), the k-mer is not described in annotations. using the -appris option. APPRIS defines as the 'PRIN-CIPAL' isoform a CDS (coding sequence) variant for each gene, based on the range of protein features.
When this option is not used or no principal sequence is given by APPRIS [i. e. for long non-coding RNA (lncRNA)], the isoform with the longest sequence is kept. In this study, we always used the gene level in combination with the -appris option. Kmerator usage on the entire transcriptome for performance assessment. Kmerator was tested to extract k-mer signatures from the whole human Ensembl transcriptome (combination of cDNA and ncRNA fasta files, version 91). The Ensembl reference transcriptome was filtered to remove any transcript with alternate loci (labels with ' alt') and have been processed by Kmerator at both transcript (i. e. 199 181 transcripts) and gene (54 874 genes) levels with the -appris option previously described. At the transcript level, 62 transcripts have been ignored due to their length inferior to the k-mer length (31 nt).
The processing to generate the specific k-mers on the whole transcriptome has been completed in <3 days at the gene level (88 003 855 k-mers) and 24 h at the transcript level (69 760 957 k-mers), using a LINUX server with 30 computing cores and 20 GB hard disk space. This step has to be done only one time for one chosen reference transcriptome. Once we have all the annotated transcript kmer signatures, we can rapidly quantify them in any RNAseq data.
group. diffdisp = TRUE, fraction. non. overdispersed = 0). Besides, we set the sequencing depth by RNA-seq file to 100 million reads (seq depth = 100 000 000) and we did not filter low counts (filter. threshold. total = 0). Providing this data frame and the Ensembl reference transcriptome, we used the 'simulate experiment countmat' function, from polyester R package  (15) , to generate paired-end and strand-specific (fr fashion) RNA-seq reads in fasta format. Finally, the fasta files have been converted to fastq. gz format using seqtk (https://github. com/lh3/seqtk). countTags. K-mers designed by Kmerator on the whole transcriptome were counted into the 10 simulated RNAseq data. For this purpose, the list of k-mers was submitted to countTags (https://github. com/Transipedia/countTags), a tool written in C language (see Figure  1A ).
countTags searches for short sequences (<32 nt) and their reverse complement with an exact match in fastq files and counts their occurrences. We used a k-mer length of 31 nt (-k 31) and the paired-end option (-paired), and we also used the count-Tags normalization option to normalize k-mer counts per billion of k-mers present in the dataset, using the -kbp option. As many specific k-mers are associated with one single transcript/gene, we computed the mean k-mer count by transcript/gene. Comparison with Kallisto. We compared the Kmerator + countTags pipeline with Kallisto regarding the performances in transcript/gene expression quantification on simulated data detailed above. As our pipeline cannot quantify genes/transcripts without specific k-mers, we limited Kallisto quantification to the genes/transcripts having specific k-mers.
KmerExploR: exploring large RNA-seq datasets KmerExploR is a command line tool powered by the backend pipeline Kmerator + countTags. KmerExploR provides k-mer quantification results in RNA-seq samples as a graphical and user-friendly html interface (see Figure  1A ). To deal with data heterogeneity and the weaknesses of RNA-seq technology, we developed a turnkey application using KmerExploR. Characterization of a requested RNAseq dataset can be improved with the quantification of selected genes (predictor genes) via the Kmerator + count-Tags pipeline. Predictor genes and their corresponding specific k-mers are included in KmerExploR and have been selected based on the literature to answer specific biological questions: • Are my RNA-seq data based on polyA selection protocol or ribo-depletion? • Are my RNA-seq libraries stranded or not? • What is/are the sex corresponding to my samples? • Is there a read coverage bias from 5 to 3 end along my dataset transcripts? • Are my RNA-seq data contaminated by HeLa (presence of HeLa-derived human papillomavirus 18), mycoplasmas or other viruses such as hepatitis B virus? • What is/are the species present in my samples? Implementation.
KmerExploR is a command line tool written in python 3. It can be installed on a server or on a personal computer from GitHub or with pip command (see https://github. com/Transipedia/kmerexplor). No additional modules are required. KmerExploR does not need a lot of memory and can be launched from a laptop. Indeed, for a common analysis of 36 paired-end samples (80 GB of fastq files), it takes 250 MB of memory (RAM per core) and 24 min. In comparison, the popular useful and complementary QC tool fastQC (https://qubeshub. org/resources/ fastqc) takes 3300 MB of memory (RAM per core) and 15 min. KmerExploR includes countTags, described above. From input fastq files, KmerExploR runs countTags, with a multithreading option, to quantify built-in k-mer selection associated with each predictor gene.
The detailed diagram is shown in Supplementary Figure  S1B. KmerExploR can also directly take countTags output files, as for large datasets it could be useful to separately run countTags on a cluster, for example. KmerExploR outputs an html file with css and javascript in separate files, using the echartsjs library to display user-friendly and graphical information (https://echarts. apache. org/en/index. html). Categories to show are described either in the built-in config file or in the user personal config file. KmerExploR also produces a tabulated text file with mean counts for each predictor gene in each category (rows) and in each sample (columns). Predictor gene selection. We selected a subset of housekeeping genes from the list previously published by Eisenberg and Levanon  (16)  as well as some widely expressed histone genes that produce non-polyadenylated transcripts barely detected in polyA+ RNA-seq (see Table  1 ).
We also selected specific genes from chromosome Y that have a ubiquitous expression, from Maan et al. 's publication  (17). For these different sets of genes, we designed specific k-mers using Kmerator at the gene level and also computed the kmer reversed complementary counterparts for the orientation category. Housekeeping genes' ubiquitous expression profile in various tissues, chromosome Y genes' specific expression pattern in male tissues and histone genes' low expression in polyA+ RNA-seq samples have been validated by exploring the GTEx database (https://www. gtexportal. org) (see Supplementary Figure  S2 ). For the detection of 5 /3 -end biases, we used the specific k-mers from ubiquitous genes (orientation set) and individually attributed them to their corresponding region, 5 untranslated region (UTR), 3 UTR or CDS, depending on their position in the principal transcript, according to the APPRIS database.
For that purpose, we used Ensembl annotations with the biomaRt R package that gives the information of the UTR and CDS regions for each transcript. We searched the k-mers in transcript CDS and UTR sequences to label them by region. For mycoplasma tag selection, we first selected the most frequent mycoplasma found in cell contamination according to Drexler and Uphoff  (18). We then downloaded ribosomal RNA (rRNA) sequences of the six selected mycoplasma species from the SILVA database v132  (19) , which provides updated and curated rRNA sequences from Bacteria, Archaea and Eukaryota. Some species have several associated strains and therefore, several rRNA sequences. We have included them all for the k-mer design. For HeLa detection, we selected HPV-18 transcripts reported to be expressed in HeLa cells  (20).
Using UGENE software  (21) , we manually modified these transcripts to match the mutations reported as HeLa specific in the Cantalupo et al. study  (20). We then defined sequences taking 30 nt on both sides of each mutation, before passing them to Kmerator to keep only k-mers not present in the human genome and transcriptome. For species identification, we selected those principally found in the SRA database. We then downloaded mitochondrially encoded cytochrome c oxidase I (MT-CO1) human gene sequence and its orthologs in each of the selected species, using the corresponding animal reference genome and transcriptome sequences (Ensembl v91 for each). Finally, sequences of virus genomes have been downloaded from RefSeq using the common virus list provided by Uphoff et al. (22). All these potential contamination sequences were used to produce specific k-mers using Kmerator at the chimera level, to select tags that can be found neither in the human reference genome nor in the transcriptome.
For the advanced application of KmerExploR, we designed k-mers corresponding to new or rare transcriptional events detected in the Leucegene dataset (https://leucegene. ca/). For chimera detection, we used two well-known fusion RNA examples associated with chromosomal translocation and their reciprocal counterparts [RUNX1-RUNXT1 t(x,21) RUNXT1-RUNX1, PML-RARA t  (15, 17)  and RARA-PML]. Specific k-mers are designed with Kmerator on 60 bp sequences spanning the junction. For mutation detection, we manually designed 31 bp k-mers centered on the mutation for reference and alternative sequences of three genes currently used in acute myeloid leukemia (AML) diagnosis: TET2, KRAS and CEBPA. We finally designed k-mers with Kmerator at the transcript level for a new lncRNA previously published in  (23)  as NONE 'chr2-p21'.
RNA-seq dataset. In this paper, we illustrated KmerEx-ploR output on several datasets, depending on the biological question, all described in Supplementary Table  S1. Characteristics related to RNA-seq protocol, which we call basic features, are tested on 103 paired-end samples from ENCODE (Dataset-FEATURES). For the contaminations part, we used the 33 single-read samples from the PRJNA153913 study  (24)  previously described as highly contaminated by mycoplasma (Dataset-MYCO)  (25). We also selected three public RNA-seq samples by species to check the relevance of our species-specific k-mers (Dataset-SPECIES). HeLa contamination was tested in three cervical cancer CCLE (Cancer Cell Line Encyclopedia) cell lines: one HeLa and two negative controls (Dataset-HELA-CLE). Finally, for virus detection we used 19 samples from the CCLE dataset reported by Uphoff et al.
Kmerator performances To assess the Kmerator methodology, we first extracted k-mer signatures from all the human Ensembl transcriptome (i. e. 199 181 transcripts) and genes (i. e. 54 874 coding and non-coding genes). We were able to identify specific kmers (k = 31 nt) for 83% of human transcripts and 97% of human genes as shown in Figure  2A  and B. This way, the transcriptome information has been almost entirely summarized by 69 760 957 k-mers at the transcript level and 88 003 855 k-mers at the gene level, corresponding to 23. 8% and 30% of the total number of k-mers in the reference transcriptome, respectively. The attribution of specific k-mers at the gene and transcript levels is fundamentally different: whereas the gene level (-appris option) accepts specific k-mers shared with other isoforms, the transcript level is more stringent and eliminates each k-mer shared by other ones.
To situate our tool in relation to a widely used, referenced and benchmarked quantification tool, we tested the Kmerator + countTags pipeline accuracy to estimate gene and transcript expression using simulated data (see the 'Materials and Methods' section). Indeed, using a simulated dataset, for which we have the exact counts, even if it fails to capture the complexity of real data, is the best way to proceed to illustrate our purpose  (26). We have run Kmerator and countTags to search for all human gene and transcript expression levels in a set of 10 simulated data. We assessed Spearman's correlation between normalized kmer counts and the ground truth. We used countTags kmer mean count per transcript reported to the total of kmers contained in the input fastq. As shown in Figure  2 , the Spearman's correlation factor comparing Kmerator + countTags results to the truth is 0.
86 for the gene level (Figure  2C ) and 0. 94 for the transcript level (see Figure  2D ), indicating a highly positive relationship with normalized counts (P < 2e-16). Quantification results are comparable when using the Kallisto pseudo-alignment method, despite slightly higher correlation factors (gene and transcript R = 0. 97; see Supplementary Figure  S4A  and B ). This result is consistent with the recent paper describing Matataki (9), another quantification tool based on k-mers. Our pipeline being not specifically dedicated to gene quantification but for rapid exploration of large datasets is accurate enough to evaluate gene and transcript expression levels in RNA-seq data. Interestingly, the precision of Kallisto quantification decreases strongly with transcripts/genes not covered by Kmerator (see Supplementary Figure  S4C  and D ), showing that each protocol using the k-mer principle struggles to correctly quantify sequences that do not possess distinctive k-mers.
Finally, we tested speed performance of countTags processing time on random subparts of sample simulated data (10 million, 101 nt paired-end reads), while increasing the number of quantified k-mers (1/1000/1 million). It appears that processing time remains low compared to alignmentbased protocols (∼1 min for 10 million reads) and depends on the number of k-mers quantified (see Supplementary Figure  S4E ). These results support an optimized usage of the Kmerator Suite protocol for its primary usage: the research of a limited number of signatures in large RNA-seq datasets.
KmerExploR for inspecting large RNA-seq datasets We developed KmerExploR to improve the characterization of large RNA-seq datasets using the quantification of selected predictor genes. Predictor genes have been selected based on the literature to answer specific questions (see Table  1 ). As described in the 'Materials and Methods' section, we first extracted with Kmerator sets of specific k-mers from gene sequences and use KmerExploR to count the k-mer occurrences in RNA-seq datasets and visualize the results. Here, we present the results obtained with specific datasets (Table  1  and Supplementary Table  S1 ) selected to highlight the rapid control of biological and technical parameters using KmerExploR. The results of the basic features, including sample sex, polyA or ribo-depletion, orientation and 5 /3 bias, are presented in Figure  3.
When we are looking at cancerous RNA-seq cell lines, some samples with male metadata show low Y chromosome-specific gene expression (data not shown). This extreme downregulation of chromosome Y gene expression has already been described in previous studies and strongly associated with cancer risk in men  (27). Gene abundance can be measured in RNA-seq data through sequencing of mRNA or ribo-depleted total RNA samples. The mRNA protocol relies on polyA selection, when the total RNA method is based on rRNA depletion (Ribozero protocol). However, non-polyadenylated transcripts should only be found in data produced using this procedure, when they should barely be detectable in mRNA samples. As the majority of histone transcripts are known to be non-polyadenylated, we used this characteristic first to detect sample contamination by non-polyadenylated RNA, and second to infer from the result the RNA preparation procedure.
We first investigated the expression level of all histone genes and retained the most highly expressed according to the literature. Second, we analyzed their expression pattern using the GTEX resource. As RNA-seq from GTEX are exclusively produced from polyA selected RNA samples, we used this database to select histone genes showing the lowest expression levels (see Supplementary Figure  S2B ). We used this set of histone genes to test a se-   S1  (103 paired-end ENCODE samples) except for the orientation (C), which is a subset of eight RNA-seq from the Dataset-FEATURES. For each bar plot, the legend lists the set of predictor genes for which k-mer mean counts are computed (see also Table  1 ). Samples are on the X-axis. Panels.