Science, Faculty of
DSpace
UBCV
Hafezqorani, Saber
Doctor of Philosophy - PhD
University of British Columbia
The advent of long-read RNA sequencing technologies has advanced transcriptomic research by enabling the sequencing of entire transcripts. This advancement holds the promise of uncovering novel insights into the complex nature of eukaryotic transcriptomes, characterized by phenomena such as alternative splicing and intron retention. However, the vast amounts of data generated by these technologies necessitates the development of sophisticated tools for effective data analysis. This thesis addresses these challenges through two main objectives: the development of a novel simulator for long-read RNA sequencing data, capable of accurately mimicking transcriptome-specific features and the application of deep learning techniques for the robust analysis of RNA sequencing data. The first objective addresses the need for a simulator tailored specifically for RNA sequencing data from Oxford Nanopore Technologies, aiming to create a tool that not only generates reads mimicking real sequencing outputs, but also incorporates critical transcriptomic features such as expression levels and intron retention events. This simulator serves as a resource for the development and refinement of transcriptome analysis tools, offering a cost-effective alternative to extensive sequencing experiments to generate ground-truth data for benchmarking. The second objective explores the potential of deep learning in transcriptomics, focusing on the development of a nucleotide sequence embedding method. It aims to capture the complex, long-term dependencies within sequences, a task that has proven challenging due to the variable length and intricate nature of RNA sequences. By leveraging deep learning's capacity to learn feature representations implicitly, this research seeks to enhance the accuracy and efficiency of sequence classification and clustering tasks within transcriptomic studies.
MACHINE LEARNING IN TRANSCRIPTOME ANALYSIS USING LONG RNA SEQUENCING DATA by Saber Hafezqorani M.Sc., Middle East Technical University, 2015 A THESIS SUBMITTED IN PARTIAL FULFILLMENT OF THE REQUIREMENTS FOR THE DEGREE OF DOCTOR OF PHILOSOPHY in THE FACULTY OF GRADUATE AND POSTDOCTORAL STUDIES (Bioinformatics) THE UNIVERSITY OF BRITISH COLUMBIA (Vancouver) July 2024 © Saber Hafezqorani, 2024 ii The following individuals certify that they have read, and recommend to the Faculty of Graduate and Postdoctoral Studies for acceptance, the dissertation entitled: Machine learning in transcriptome analysis using long RNA sequencing data submitted by Saber Hafezqorani in partial fulfilment of the requirements for the degree of Doctor of Philosophy in Bioinformatics Examining Committee: Inanc Birol, Professor, Medical Genetics, University of British Columbia Supervisor William Hsiao, Associate Professor, Health Sciences, Simon Fraser University Supervisory Committee Member Angela Brooks-Wilson, Professor, Medical Genetic, University of British Columbia University Examiner Judith Mank, Professor, Zoology, University of British Columbia University Examiner Additional Supervisory Committee Members: Faraz Hach, Assistant Professor, Urological Sciences, University of British Columbia Supervisory Committee Member Robert Holt, Professor, Medical Genetics, University of British Columbia Supervisory Committee Member iii Abstract The advent of long-read RNA sequencing technologies has advanced transcriptomic research by enabling the sequencing of entire transcripts. This advancement holds the promise of uncovering novel insights into the complex nature of eukaryotic transcriptomes, characterized by phenomena such as alternative splicing and intron retention. However, the vast amounts of data generated by these technologies necessitates the development of sophisticated tools for effective data analysis. This thesis addresses these challenges through two main objectives: the development of a novel simulator for long-read RNA sequencing data, capable of accurately mimicking transcriptome-specific features and the application of deep learning techniques for the robust analysis of RNA sequencing data. The first objective addresses the need for a simulator tailored specifically for RNA sequencing data from Oxford Nanopore Technologies, aiming to create a tool that not only generates reads mimicking real sequencing outputs, but also incorporates critical transcriptomic features such as expression levels and intron retention events. This simulator serves as a resource for the development and refinement of transcriptome analysis tools, offering a cost-effective alternative to extensive sequencing experiments to generate ground-truth data for benchmarking. The second objective explores the potential of deep learning in transcriptomics, focusing on the development of a nucleotide sequence embedding method. It aims to capture the complex, long-term dependencies within sequences, a task that has proven challenging due to the variable length and intricate nature of RNA sequences. By leveraging deep learning's capacity to learn iv feature representations implicitly, this research seeks to enhance the accuracy and efficiency of sequence classification and clustering tasks within transcriptomic studies. v Lay Summary In recent years, scientists have made great efforts in understanding the genetic information contained in RNA, a molecule essential for various biological functions. This was enabled by advanced technologies that allow us to read RNA in much longer segments than before, offering a more complete picture of its complexity. However, analyzing this wealth of data requires sophisticated tools. My research focuses on two main areas: developing a simulation tool that can mimic the intricacies of RNA sequences for better analysis, and employing deep learning—a type of artificial intelligence—to unravel the complex patterns within RNA data. By developing these tools, my work bridges the gap between advanced technologies and the comprehensive analysis of genetic data, providing tools that would enable scientific breakthroughs. vi Preface My supervisor Dr. Inanc Birol and I have conceived the core concepts of the two main projects presented in my thesis (Chapters 2 and 4). Projects discussed in Chapter 3 are collaborated work with my colleagues. Chapters 1 and 5 are my original works, a version of which is part of the publications described in Chapters 2 and 4. Details of all contributions are as follows: Chapter 2: A version of this material has been published as Saber Hafezqorani, Chen Yang, Theodora Lo, Ka Ming Nip, René L Warren, Inanc Birol. “Trans-NanoSim characterizes and simulates nanopore RNA-sequencing data.” GigaScience, Volume 9, Issue 6, June 2020, giaa061 (https://doi.org/10.1093/gigascience/giaa061). My colleague, Chen Yang, and I contributed equally to this project and this work is also reported in her PhD dissertation [1]. We both conceived and designed the study together with the help of I.B. I implemented the intro retention modeling, adapted the script for transcriptome simulation, incorporated the transcript abundance estimation pipeline, and performed the benchmarking experiments. C.Y. implemented the Kernel Density Estimation modeling, parallelized model fitting, and aided in experimental design. T.L. implemented the polyadenylation tails and read quality scores simulation, and parallelized the simulation process. C.Y. and I maintained the tool over the years through constant bug fixes and version releases. We wrote and revised the initial draft and all the other authors reviewed, edited, and approved the final manuscript as well as provided feedback throughout the entire project. Chapter 3: This chapter details collaborative projects showcasing the application of Chapter 1 project. My contribution within this chapter is featured in several publications: vii 1. Chen Yang, Theodora Lo, Ka Ming Nip, Saber Hafezqorani, René L Warren, Inanc Birol. “Characterization and simulation of metagenomic nanopore sequencing data with Meta-NanoSim.” GigaScience, Volume 12, June 2020, giad013 (https://doi.org/10.1093/gigascience/giad013). I.B. and C.Y. conceived and designed the study. C.Y. designed and implemented the software with the help of T.L., S.H., and K.M.N. K.M.N. and S.H. provided additional help with the software maintenance. C.Y. wrote the initial draft. I revised the manuscript, addressed reviewer’s comments and prepared and submitted all required files for publication. All authors read and approved the final manuscript. 2. Ka Ming Nip, Saber Hafezqorani, Kristina K. Gagalova, Readman Chiu, Chen Yang, René L Warren, Inanc Birol. “Reference-free assembly of long-read transcriptome sequencing data with RNA-Bloom2.” Nature Communications, 14, 2940 (2023) (https://doi.org/10.1038/s41467-023-38553-y). K.M.N. and I.B. conceived the study. K.M.N. designed and developed RNA-Bloom2 under the supervision of I.B. K.M.N., S.H., and C.Y. generated the simulated datasets and analyzed the LRGASP Consortium dataset. S.H., R.C., R.L.W., and I.B. advised on the benchmarking design. K.M.N., K.K.G., and R.C. analyzed the Sitka spruce dataset. All authors contributed to the interpretation of the results. KMN took the lead in writing the manuscript with input from all authors. 3. Francisco J. Pardo-Palacios, et al “Systematic assessment of long-read RNA-seq methods for transcript identification and quantification.” Nature Methods, 21, 1349–1363 (2024) (https://doi.org/10.1038/s41592-024-02298-3). My colleagues and I participated in this project through RNA-Bloom2 assembly submissions. I generated simulated datasets viii which provided a resource for benchmarking RNA-Bloom2 to test and refine our approach and submission. Chapter 4: A version of this material is currently being prepared for submission to a refereed journal and is also available in preprint form as Saber Hafezaqorani, Ka Ming Nip, Inanc Birol. “ntEmbd: Deep learning embedding for nucleotide sequences.” bioRxiv (2024) (https://doi.org/10.1101/2024.04.30.591806). I designed the method and algorithms with input from I.B. I implemented the ntEmbd software and conducted the benchmarking experiments. I took the lead in writing the manuscript with input from all authors. ix Table of Contents Abstract ......................................................................................................................................... iii Lay Summary .................................................................................................................................v Preface ........................................................................................................................................... vi Table of Contents ......................................................................................................................... ix List of Tables .............................................................................................................................. xiii List of Figures ............................................................................................................................. xiv List of Abbreviations ...................................................................................................................xv Acknowledgements ................................................................................................................... xvii Dedication ................................................................................................................................... xix Chapter 1: Introduction ................................................................................................................1 1.1 Background ..................................................................................................................... 1 1.1.1 Transcriptome ......................................................................................................... 1 1.1.2 RNA-sequencing ..................................................................................................... 1 1.1.3 Long-read RNA-sequencing ................................................................................... 2 1.1.4 RNA coding potential assessment .......................................................................... 3 1.1.5 Machine learning for transcriptome analysis .......................................................... 4 1.1.6 Deep learning .......................................................................................................... 4 1.1.7 Embedding .............................................................................................................. 5 1.2 Motivation ....................................................................................................................... 5 1.2.1 Advancing Nanopore Sequencing Data Analysis ................................................... 5 1.2.2 Next-Generation Tools for Sequence Representation............................................. 6 x 1.3 Research objectives ......................................................................................................... 7 Chapter 2: Trans-NanoSim characterizes and simulates nanopore RNA-sequencing data ...8 2.1 Publication note .............................................................................................................. 8 2.2 Author summary ............................................................................................................. 8 2.3 Introduction ..................................................................................................................... 9 2.4 Results ........................................................................................................................... 11 2.4.1 Read length simulation ......................................................................................... 11 2.4.2 Base calling error simulation ................................................................................ 12 2.4.3 Expression level simulation .................................................................................. 14 2.4.4 IR modeling .......................................................................................................... 14 2.4.5 Homopolymer simulation ..................................................................................... 15 2.4.6 Runtime and memory usage comparison .............................................................. 16 2.5 Methods......................................................................................................................... 20 2.5.1 Trans-NanoSim workflow overview..................................................................... 20 2.5.2 Length distribution characterization and simulation............................................. 21 2.5.3 Intron retention characterization and simulation .................................................. 22 2.5.4 Transcript abundance quantification and simulation ............................................ 23 2.5.5 Error mode characterization and simulation ......................................................... 23 2.5.6 Homopolymer characterization and simulation .................................................... 24 2.5.7 Discussion and conclusion .................................................................................... 26 Chapter 3: Collaborative works and applications of Trans-NanoSim ...................................27 3.1 Publication note ............................................................................................................ 27 3.2 Author summary ........................................................................................................... 27 xi 3.3 Meta-NanoSim: A nanopore metagenome simulator ................................................... 28 3.3.1 Background ........................................................................................................... 28 3.3.2 Findings................................................................................................................. 29 3.3.3 Discussion and conclusion .................................................................................... 36 3.4 RNA-Bloom2 ................................................................................................................ 36 3.4.1 Background ........................................................................................................... 36 3.4.2 Findings................................................................................................................. 37 3.4.3 Discussion and conclusion .................................................................................... 40 3.5 LRGASP ....................................................................................................................... 40 3.5.1 Background ........................................................................................................... 40 3.5.2 Findings................................................................................................................. 41 3.5.3 Discussion and conclusion .................................................................................... 43 Chapter 4: ntEmbd: deep learning embedding for nucleotide sequences ..............................44 4.1 Publication note ............................................................................................................ 44 4.2 Author summary ........................................................................................................... 44 4.3 Introduction ................................................................................................................... 45 4.4 Methods......................................................................................................................... 47 4.4.1 Architecture of ntEmbd......................................................................................... 48 4.4.2 Data preparation and training strategy .................................................................. 51 4.4.3 Classification models ............................................................................................ 52 4.4.4 Hyperparameter tuning ......................................................................................... 53 4.4.5 Modular design ..................................................................................................... 55 4.5 Results ........................................................................................................................... 55 xii 4.5.1 Application in coding and noncoding classification ............................................. 55 4.5.2 Benchmarking against other RNA coding potential assessment tools .................. 56 4.5.3 Impact of sequence completeness on RNA classification accuracy ..................... 57 4.5.4 Transfer learning with ntEmbd for identifying ONT adapters ............................. 59 4.6 Conclusion .................................................................................................................... 60 Chapter 5: Conclusions ...............................................................................................................62 5.1 Summary ....................................................................................................................... 62 5.1.1 Oxford Nanopore RNA-sequencing simulation with Trans-NanoSim ................. 62 5.1.2 Learning features of RNA-sequencing data with ntEmbd .................................... 63 5.2 Future directions ........................................................................................................... 63 5.2.1 Advancements and opportunities for NanoSim suite of tools .............................. 63 5.2.2 Advancing embeddings with next-generation ML technologies .......................... 64 Bibliography .................................................................................................................................67 Appendices ....................................................................................................................................84 Appendix A ............................................................................................................................... 84 A.1 Supplementary method – experimental datasets ....................................................... 84 A.2 Supplementary method – Pre-trained NanoSim models ........................................... 86 A.3 Supplementary method - Simulating reads from human and mouse reference transcriptome and analysis .................................................................................................... 87 A.4 Supplementary figures .............................................................................................. 90 Appendix B ............................................................................................................................... 94 B.1 Supplementary tables ................................................................................................ 94 xiii List of Tables Table 2.1 Error rates in empirical and simulated reads. ............................................................... 12 Table 2.2 Error rates in homopolymer regions and non-homopolymer regions for human direct RNA dataset. ................................................................................................................................. 16 Table 2.3 Runtime usage in simulating Human direct RNA dataset for Trans-NanoSim and DeepSimulator. ............................................................................................................................. 17 Table 2.4 Memory usage in simulating Human direct RNA dataset for Trans-NanoSim and DeepSimulator. ............................................................................................................................. 17 Table 2.5 Trans-NanoSim multiprocessing memory usage (maximum resident set size in GB) with IR modelling. ........................................................................................................................ 18 Table 3.1 Transcript isoform quantification using long-read tools............................................... 43 Table 4.1 Benchmarking ntEmbd embedding in RNA coding potential assessment task ............ 57 Table B.1 Coding and noncoding RNA classification metrics with different sequence lengths as input .............................................................................................................................................. 94 xiv List of Figures Figure 2.1 Benchmarking Trans-NanoSim and DeepSimulator on the human direct RNA dataset........................................................................................................................................................ 13 Figure 2.2 Homopolymer simulation performance on the human direct RNA dataset. ............... 16 Figure 2.3 Runtimes for multiprocessing...................................................................................... 19 Figure 2.4 Schematic overview of the Trans-NanoSim pipeline. ................................................. 21 Figure 2.5 Homopolymer characterization of human NA12878 direct RNA dataset ................... 25 Figure 3.1 Evaluation of chimeric read detection and simulation ................................................ 31 Figure 3.2 Performance of Meta-NanoSim and CAMISIM in simulating 1 million reads from the Log dataset .............................................................................................................................. 33 Figure 3.3 metaFlye assemblies with 4 sets of simulated metagenome sequencing data ............. 35 Figure 3.4 Computational performance on simulated datasets ..................................................... 39 Figure 4.1 Overall view of ntEmbd architecture .......................................................................... 49 Figure 4.2 IUPAC degenerate base symbols ................................................................................ 51 Figure 4.3 Visualizing full and partial-length transcripts’ embedding vectors ............................ 58 Figure A.1 Bootstrapping results for length distribution analyses ............................................... 90 Figure A.2 Benchmarking Trans-NanoSim and DeepSimulator on the human cDNA 1D2 dataset....................................................................................................................................................... 91 Figure A.3 Benchmarking Trans-NanoSim and DeepSimulator on the mouse cDNA dataset .... 92 xv List of Abbreviations Bi-LSTM: Bidirectional Long short-term memory bp: base pair cDNA: complementary DNA CPU: Central Processing Unit DNA: deoxyribonucleic acid dRNA: direct RNA EM: Expectation-Maximization GB: Gradient Boosting GPU: Graphics Processing Unit HP: Hyperparameter IR: Intron Retention IUPAC: International Union of Pure and Applied Chemistry KDE: Kernel Density Estimation KNN: K-Nearest Neighbors kb: kilobase pairs LLMs: Large Language Models LRGASP: Long-read RNA-seq Genome Annotation Assessment Project MLP: Multilayer Perceptron MRD: Mean Relative Difference NLP: Natural Language Processing NRMSE: Normalized Root Mean Square Error xvi nt: nucleotide ONT: Oxford Nanopore Technologies Public Limited Company PacBio: Pacific Biosciences of California, Incorporated PCR: Polymerase Chain Reaction R2: Coefficient of Determination RF: Random Forest RDB: Rational Database RNA: ribonucleic acid RNA-seq: RNA-sequencing RSEM: RNA-Seq by Expectation Maximization SCC: Spearman's Correlation Coefficient SIRV: Spike-In RNA Variant TPM: transcripts per million UMAP: Uniform Manifold Approximation and Projection xvii Acknowledgements I extend my deepest gratitude to my supervisor, Dr. Inanc Birol, for his unwavering support, patience, and invaluable guidance throughout my PhD journey. His mentorship not only shaped my research path but also my development as a scientist, for which I am eternally grateful. I am thankful to my supervisory committee members, Dr. Faraz Hach, Dr. William Hsiao, and Dr. Robert Holt, for their insightful feedback, constructive criticism, and encouragement. Their expertise and perspectives have been instrumental in refining my research and broadening my understanding. My appreciation also goes to my collaborators at Birol Lab with special thanks to Dr. Ka Ming Nip, Dr. Chen Yang, and Mr. René L. Warren, whose contributions and support have been pivotal to the success of this work. Collaborating with such talented individuals has been both an honor and a privilege. Further, I thank my family and friends for their love, understanding, and endless encouragement. Their belief in me has been my strength and motivation to persevere through challenges. Lastly, I wish to acknowledge the Graduate and Postdoctoral Studies at the University of British Columbia (UBC), the Bioinformatics Graduate Program at the UBC, the International Society for Computational Biology (ISCB), Genome Informatics, and the John Bosdet Memorial Fund for kindly offering their scholarships and travel awards. xviii Chapter 2: This work was supported by Genome Canada and Genome BC [281ANV, I.B.]; Genome Canada, Genome BC, Genome Quebec, and Genome Alberta [243FOR, I.B.]; and by the National Human Genome Research Institute of the National Institutes of Health [R01HG007182, I.B.]. Chapter 4: This work was supported by Genome Canada and Genome BC [281ANV, I.B.]; the National Human Genome Research Institute of the National Institutes of Health [R01HG007182, I.B.]; and by the Canadian Institutes of Health Research (CIHR) [PJT-183608, I.B.]. xix Dedication To my dear wife, Mahsa Ghavidel: Thank you for your unconditional love, care, and support throughout the years. To my parents and brother: Thank you for encouraging me to pursue doctoral studies. To my aunt in heaven: Your memories inspire me to keep moving forward with courage and joy. 1 Chapter 1: Introduction 1.1 Background 1.1.1 Transcriptome The transcriptome represents the complete set of RNA molecules within a biological entity, from simple viruses to complex organisms like humans. In eukaryotic cells, transcription of DNA produces primary RNA transcripts. These transcripts undergo processing where introns are excised by spliceosomes, leaving only the exons to form the final transcript. This process involves a series of protein factors, which also cleave the 3’ end of the transcript and add a poly(A) tail. The transcriptome's diversity is further enhanced through alternative transcriptional initiation, splicing, and polyadenylation, allowing genes to express multiple isoforms [2]. Since RNAs are the initial gene products, some of which encode proteins, understanding the transcriptome is vital for comprehending gene functions. 1.1.2 RNA-sequencing RNA-sequencing (RNA-seq) is a technique used to read the nucleotide sequences of RNA molecules. It is a cornerstone technology that has enabled us to generate an unprecedented global view of the transcriptome and its organization for a number of species and cell types [3,4]. RNA-seq enables cataloging transcript species, determining transcriptional structure of genes, and quantifying the varying transcript expression levels – all of which are crucial to the study of biology at the molecular level, and understand various disease mechanisms [5–7]. Typically, RNAs are isolated from a collection of cells, subsequently converted into their complementary 2 DNA (cDNA) through reverse transcription, and then amplified using polymerase chain reaction (PCR) prior to sequencing. Traditionally dominated by technologies like those from Illumina, Inc. (San Diego, CA), which offer 150-300 bp reads with a low mismatch error rate (less than 0.1%), short-read sequencing provides a cost-effective and accurate approach to survey transcriptome in a high throughput manner [8]. However, the short amplified sequence fragments it produces render the downstream analyses complicated as it is difficult to reconstruct and count the original DNA/RNA molecules and resolve alternatively spliced isoforms. 1.1.3 Long-read RNA-sequencing In recent years, third-generation single-molecule sequencing technologies, such as those from Oxford Nanopore Technologies (ONT, Oxford, UK), offered long reads, which, though noisier, can span multiple exons and sometimes capture full-length transcripts. This opened new possibilities in transcriptomics field and greatly enhanced the capacity for comprehensive analyses. Throughout the years, ONT's sequencing technology has evolved extensively, with numerous advancements in both the nanopore and motor protein components of the system. These developments have led to improvements in sequencing yield, speed, and accuracy. Since the initial release, ONT has introduced several upgraded versions of its sequencing system, beginning with R6 flow cells in 2014 and advancing through multiple iterations to the latest chemistry R10.4.1 in 2023. In addition, the library preparation methods improved since the initial 2D protocol, which involved sequencing both strands of a double-stranded DNA (dsDNA) molecule, hence reading the same sequence twice to enhance accuracy by creating a consensus sequence. This resulted in higher average accuracy of 94% versus 86% compared to 1D protocol 3 [9]. This method evolved into the 1D2 strategy introduced alongside the R9.5 nanopore in 2017 in which each strand of a dsDNA is ligated separately to a special adapter instead of being connected by a hairpin adapter in the case of 2D approach. This specialized adapter increased the likelihood of the complement strand to be captured by the same nanopore right after the template strand. This improved the average accuracy of 1D2 reads up to 95% as reported in a study [10]. Moreover, ONT devices enable the direct sequencing of native RNA molecules (dRNA) without the need for reverse transcription [11]. As nanopore sequencing technology is overcoming their early limitations in base accuracy and throughput [12], the number of computational methods designed for analyzing their data is growing rapidly [13]. 1.1.4 RNA coding potential assessment The exponential increase in omics data, driven by advances in sequencing technologies, has underscored the necessity for efficient methods to analyze newly sequenced reads. Annotating these reads is critical for understanding their function and role in the broader biological context [14–16]. This huge amount of data presents both a challenge and an opportunity to develop and refine computational tools and methodologies for effective and accurate annotation, aiding in the deciphering of complex biological information [17]. RNA coding potential assessment is an example of sequence classification, pivotal for the in-depth analysis of transcriptome. It involves distinguishing between coding and noncoding RNAs, and helps us understand gene regulation and function. Historically, computational prediction methods have been based on a series of human-crafted sequence features such as GC-content, 3-4 base periodicity, k-mer frequencies and experimental techniques like ribosome profiling [18–22]. The growing interest in noncoding RNAs and their role in regulatory networks has fueled the development of new methodologies to accurately predict RNA coding potential, an area that continues to evolve with advancements in computational biology [23–26]. 1.1.5 Machine learning for transcriptome analysis It is now possible to obtain large amounts of genomic information quickly and inexpensively, marking genomics as a data-driven science which tries to uncover new properties through the analysis of genome-scale data. Machine learning broadly encompasses the development of predictive models and the identification of meaningful patterns within data. It aims to mimic human pattern recognition capabilities in an objective, computational way, programming computers to learn from examples or past experiences—referred to as training data—to solve specific problems [27,28]. Hence, it can be harnessed to uncover patterns within large-scale sequencing data, aiding in tasks such as gene expression profiling, prediction of RNA secondary structures, and identification of novel transcripts [29–31]. 1.1.6 Deep learning Deep learning is a subset of machine learning that employs neural networks with multiple layers [32]. These deep neural networks are capable of learning complex, hierarchical representations of data, making them particularly suited for tasks involving large-scale and complex datasets, such as those commonly encountered in genomics and transcriptomics. While both machine learning and deep learning are rooted in the ability of algorithms to learn from data, the distinction between machine learning and deep learning is marked by their approaches to feature 5 representation. Traditional machine learning algorithms rely on handcrafted features, meaning their effectiveness hinges on the precision with which data features are defined and calculated. This often requires domain expertise to identify and encode relevant features from the data manually. In contrast, deep learning addresses this limitation by integrating feature computation within the model itself [33]. This results in an end-to-end learning solution where deep neural networks automatically learn to identify and extract relevant features from raw data, thus eliminating the need for manual feature engineering. This intrinsic ability of deep learning to learn complex representations makes it particularly suited for tasks in transcriptomics, where data is multidimensional and intricate [34–41]. 1.1.7 Embedding Embeddings in deep learning refer to the representation of data in a lower-dimensional space, capturing the essence of the data in a form that algorithms can efficiently process. In transcriptome analysis, embeddings can be used to transform high-dimensional data into a more manageable form, aiding in tasks such as clustering, visualization, and identification of patterns [42–44]. This concept has become increasingly important in the analysis of large-scale omics data, facilitating the extraction of meaningful biological insights [45,46]. 1.2 Motivation 1.2.1 Advancing Nanopore Sequencing Data Analysis The full potential of long-read RNA-seq technologies can only be harnessed with the development of analytical tools. In this context, simulated data provides a cost-effective means 6 to test and refine analytical methodologies, complete with known ground truth for validation. Long-read simulators have been developed for ONT genomic reads [47–50]. However, these tools are not specifically designed to capture and reproduce transcriptome-specific features such as transcript expression profiles and intron retention (IR) events. While transcript expression levels inform the biological state of a transcriptome, IR, as one form of alternative splicing, contributes to the functional complexity of eukaryotic transcriptomes [51]. There is an unmet need for an ONT RNA-seq simulator, which can aid the development of transcriptome analysis methods without the expense of establishing ground truth through sequencing experiments. 1.2.2 Next-Generation Tools for Sequence Representation The effectiveness of simple machine learning algorithms largely depends on data representation they utilize, that is, how each variable (also called a feature) is defined. This reliance on representation is a widespread phenomenon across computer science, where classification outcomes are notably influenced by the quality and relevance of these features. While many artificial intelligence tasks can be addressed by creating and designing appropriate feature sets and using them in algorithms, identifying the optimal features remains challenging for numerous tasks. A promising solution is representation learning, a method where machine learning not only determines the relationship between representation and output but also identifies the most effective representation itself. This technique typically enhances performance beyond what is possible with manually crafted features and allows artificial intelligence systems to adapt swiftly to new tasks with minimal human intervention. 7 Deep learning has transformed fields such as computer vision and natural language processing (NLP) and it has a great potential to be applied to many transcriptomic analysis tasks [34,35]. One particular strength of deep learning is its ability to embed the computation of features into the machine learning models. By constituting a highly informative and machine-interpretable representation for the sequences, it enables building downstream classification and clustering models. Compared to machine translation problems in NLP, feature embedding is particularly challenging for transcriptomic studies as the sequences are string of thousands of nucleotides in length, which make the long-term dependencies between features from different parts of the sequence even more difficult to capture. This highlights the need for nucleotide sequence embedding methods that are capable of learning input sequence features implicitly. 1.3 Research objectives The primary aim of my PhD thesis is to design and develop computational solutions for transcriptome analysis, particularly focusing on long RNA-seq data. There are two fundamental research objectives within my thesis: 1. Explore algorithms and methodologies for characterizing Oxford Nanopore RNA sequencing data to generate reads with similar features, as well as investigating the application of such a tool in the development of other analytical tools for transcriptomic data. 2. Explore the use of deep learning methods to implicitly learn the features of nucleotide sequences and represent them in embedding vectors, suitable for downstream sequence classification tasks. 8 Chapter 2: Trans-NanoSim characterizes and simulates nanopore RNA-sequencing data 2.1 Publication note The research and methodologies that comprise this chapter have been published in GigaScience in 2020 [52]. This study, on which I am the first-named co-first author, presents the development and application of Trans-NanoSim, a simulator designed for accurate replication of nanopore RNA-seq data. Preliminary investigations leading to this work are available as a preprint on bioRxiv in 2019 [53]. Furthermore, I presented the initial findings of this project at the Genome Informatics, Cambridge, UK in 2018 as well as 27th Annual Conference on Intelligent Systems for Molecular Biology and 18th European Conference on Computational Biology – Community of Special Interest in High-Throughput Sequencing Algorithms (ISMB/ECCB – HiTSeq COSI), Basel, Switzerland in 2019. 2.2 Author summary This chapter fulfills the first research objective detailed in my thesis by introducing Trans-NanoSim, a nanopore sequence simulator tailored to transcriptomic data. In this chapter, I describe how Trans-NanoSim is engineered to emulate technical and transcriptome-specific features learned from real nanopore RNA-seq data. I comprehensively benchmarked my method against another nanopore read simulator and showed the unique advantage and robustness of Trans-NanoSim in capturing the characteristics of nanopore cDNA and dRNA reads. 9 2.3 Introduction RNA-seq is a cornerstone technology that has helped further our understanding of transcriptomes [3]. Third-generation single-molecule sequencing technologies such as those from ONT are proving invaluable for isoform-level analyses since the read length provided has a very high upper bound with an average length up to 100 kb, and maximum lengths reaching several megabases [54]. This permits the identification and quantification of most full-length isoforms in the human transcriptome and enable various complex feature analyses [55–58]. In recent years, there has been an increase in the development of novel algorithms to leverage the power of this technology, including de novo assembly, alignment and mapping, and structural variant detection [59–65]. In this active field of research, simulated data with a known ground truth provide a cost-effective means to help develop, refine, and benchmark these tools. Long-read simulators have been developed for ONT genomic reads [49,50]. DeepSimulator [50] employs a context-dependent deep learning model to simulate the electrical current signals, which are then decoded into sequence reads using any off-the-shelf base calling method. Although it may facilitate the development of base calling algorithms, DeepSimulator does not provide the ground truth at the base level. On the other hand, as a base-level simulator, NanoSim [49] first utilizes statistical models to learn the characteristics of sequencing libraries and then applies those models to simulate ONT genomic reads directly. Although proven to have advanced the development of various bioinformatics analysis tools, NanoSim’s initial development was centered on simulating genomic reads [66,67]. Neither of these tools is specifically designed to capture and reproduce transcriptome-specific features such as transcript expression profiles and intron retention (IR) events. While transcript expression levels inform the 10 biological state of a transcriptome, IR, as one form of alternative splicing, may represent mRNA processing in action and contributes to the functional complexity of eukaryotic transcriptomes [68]. ONT reads have the potential to capture complex IR events involving multiple introns, thus allowing researchers to study mRNA processing and investigate IR at isoform-level resolution. In addition, the inadequacy of base callers to detect timespan in the signal data often results in homopolymer expansion and contraction events, represented by higher deletion rates in homopolymer regions. Despite these homopolymer errors account for many, if not the majority, of the errors in ONT reads, ONT read simulator can struggle in simulating them. Taking all these into consideration, there was an unmet need for an ONT RNA-seq simulator. Here we present further developments of NanoSim and introduce Trans-NanoSim, which is specifically designed for ONT transcriptome sequencing platform. This versatile tool mimics the technical features of nanopore RNA-seq data including read error modes, read length distribution and homopolymer artefacts, all of which might be affected by different library preparation methods and base calling algorithms. Furthermore, Trans-NanoSim can be trained to characterize transcriptome-specific features, such as expression patterns and IR events for more accurate simulations. To demonstrate the performance of Trans-NanoSim, we chose three sets of publicly available experimental ONT reads for training and simulation, including dRNA and cDNA 1D2 libraries describing the human NA12878 cell line, and a mouse cDNA 1D library (Appendix A.1). Through benchmarking the similarity between experimental and simulated reads, we show that Trans-NanoSim consistently outperforms the genomic simulator DeepSimulator, on all three datasets. 11 2.4 Results 2.4.1 Read length simulation Unlike short reads generated from second-generation sequencing technologies, ONT reads have long and non-uniform lengths. Thus, read length distribution is a key feature to preserve in simulation. The read length distribution of transcriptomic data is jointly influenced by sequencing techniques, sample preparation protocols (often leading to reads derived from partial transcripts), and transcriptomic variables, such as transcript lengths and expression levels (for the latter, different expression profiles may result in different read length distributions.) Therefore, in order to capture this relationship between expression levels and read lengths, we profiled three datasets and then simulated reads with Trans-NanoSim and DeepSimulator (Appendix A.3). For the human direct RNA dataset, the length distribution of simulated reads generated by Trans-NanoSim (mean = 807 nt, standard deviation of mean lengths = 0.75 nt determined by ordinary nonparametric bootstrapping 1,000 times using boot command in R, Figure A.1) followed the empirical read length distribution (mean = 815 nt) closely (Figure 2.1A). Although we configured DeepSimulator to preserve the mean read length of empirical reads (mean = 808 nt), DeepSimulator still generated a bimodal length distribution with a mode of ~150 nt. We suspect that this limitation is due to the predefined read-length distributions of DeepSimulator, while the ONT read length cannot be simply described by a single statistical distribution, as elucidated by previous studies [49]. Further, DeepSimulator, being a genomic read simulator, does not associate the isoform expression levels with read lengths. 12 2.4.2 Base calling error simulation Next, we aligned the simulated and empirical reads to the reference genome and evaluated the length of consecutive match/error bases in both sets (see Appendix A.3 for methods details). While the error rate of the empirical reads from human direct RNA dataset was 10.53%, the simulated reads generated by Trans-NanoSim and DeepSimulator were 10.44% and 11.09%, respectively (Table 2.1). Combined with the length distribution of base-calling events, it is evident that Trans-NanoSim mimics error and match events more closely to the experimental data (Figure 2.1B). We recapitulated our results by repeating this analysis on human cDNA 1D2 and mouse cDNA sequencing data and obtained similar findings (Table 2.1, Figure A.2 and A.3). Table 2.1 is adopted from Trans-NanoSim supplementary data [69]. We abbreviated simulated reads from Trans-NanoSim as “TNS”, simulated reads from DeepSimulator as “DS”, and raw experimental reads as “Raw”. % of the all bases having Human cDNA Human direct RNA Mouse cDNA Raw TNS DS Raw TNS DS Raw TNS DS Mismatch 4.77 4.53 2.48 2.61 2.63 3.51 1.62 1.60 3.45 Insertion 7.22 6.68 6.00 2.30 2.22 4.37 1.22 1.13 6.13 Deletion 5.07 4.53 2.28 5.61 5.58 3.20 5.35 5.55 3.03 Total 17.07 15.75 10.77 10.53 10.44 11.09 8.21 8.29 12.61 Table 2.1 Error rates in empirical and simulated reads. We aligned the simulated reads generated by Trans-NanoSim and DeepSimulator back to the reference genome and evaluated the rate of error events in simulated reads and raw experimental read counterparts. This table is adopted from the Trans-NanoSim manuscript. 13 Figure 2.1 Benchmarking Trans-NanoSim and DeepSimulator on the human direct RNA dataset. A. Comparison of length distributions of experimental reads and simulated reads generated by Trans-NanoSim and DeepSimulator. B. The length of consecutive match/error bases of empirical and simulated reads, as indicated. C. Transcript expression levels measured from simulated reads versus the same measured from experimental reads. This figure is adopted from the Trans-NanoSim manuscript. 14 2.4.3 Expression level simulation For a transcriptome sequence simulator, it is critical that the number of simulated reads for each transcript correlate with its expression level. To evaluate whether a simulated dataset generated by both tools account for transcript isoform usage and expression levels, we used the quantify module in Trans-NanoSim to compute the transcript expression levels with both empirical and simulated reads (Appendix A.3). The coefficient of determination (R2) between the estimated transcript abundance of the empirical human direct RNA dataset and the simulated dataset generated by Trans-NanoSim is 0.9444, indicating that the observed raw transcript expression level is well replicated by Trans-NanoSim (Figure 2.1C). In contrast, the R2 value for DeepSimulator simulated reads is 0.0032, which suggests that the transcript abundance in the simulated dataset is independent of its counterpart in the empirical one. Since genomic simulators do not require expression profiles as input, it is understandable that they miss this desirable feature. 2.4.4 IR modeling To the best of our knowledge, Trans-NanoSim is the first transcriptome sequence simulator that provides IR modelling. In the human direct RNA dataset, the IR modelling module of Trans-NanoSim identified 2,872 transcripts with at least one retained intron, and nearly half of them (1,285 transcripts) were expressed at over two Transcripts Per Million (TPM). Interestingly, we identified as much as six retained introns in one highly expressed transcript (Ensembl transcript ID: ENST00000425660, TPM = 1,433). The IR modelling module also reports the transitional probability of each intron being retained based on the state of the previous intron, a model that the pipeline uses for read simulations. In the human direct RNA dataset, only 0.41% of reads 15 spanned the first intron of the represented transcript. However, given an intron is retained, the probability of observing the subsequent intron being retained increased to 17.12%. 2.4.5 Homopolymer simulation We introduce a new feature in Trans-NanoSim to model homopolymer lengths. It is applicable to both genome and transcriptome simulations. It is observed that the high error rates in ONT reads are partly attributed to base calling artifacts in homopolymer regions [70]. Specifically, the rate of base calling errors, predominantly deletions, is higher in homopolymer regions compared to non-homopolymer areas (0.16627 versus 0.05103 respectively as detailed in Table 2.2). Trans-NanoSim simulates homopolymer of each base type individually, and in our experiments, the mean homopolymer length is largely consistent between simulated and experimental reads (Figure 2.2). Our analysis revealed a linear correlation between the homopolymer length on the reference compared to the sequencing reads. However, as the homopolymer length increases, less data points were observed as expected, thus widening the confidence interval. As a result, we observed a larger variation between simulated length and experimental lengths for A and T homopolymers longer than ~20 nt and C and G homopolymers longer than ~15 nt. We note that in the experimental long read datasets used herein, at most 0.08% and 0.01% of reads contain sequences with these homopolymer lengths, respectively, and will likely represent rare occurrences in ONT data. 16 Error type Insertion Mismatch Deletion Total Homopolymer 0.02233 0.02579 0.16627 0.21439 Non-homopolymer 0.02287 0.02495 0.05103 0.09885 Table 2.2 Error rates in homopolymer regions and non-homopolymer regions for human direct RNA dataset. This table is adopted from the Trans-NanoSim manuscript. Figure 2.2 Homopolymer simulation performance on the human direct RNA dataset. The x-axis shows the reference homopolymer length (nt) and y-axis is the mean homopolymer length (nt) on corresponding reads. The distributions for A and T homopolymers are trimmed at 40 nt. This figure is adopted from the Trans-NanoSim manuscript. 2.4.6 Runtime and memory usage comparison Finally, we evaluated the computational performance of Trans-NanoSim and DeepSimulator through characterizing and simulating 687,192 reads describing transcripts from the human reference transcriptome. Although both tools allow users to train a custom model with any dataset, authors of DeepSimulator noted that this step is computationally intensive, and advised their users against trying it. In contrast, in a typical run, it takes Trans-NanoSim less than one 17 hour to train and an additional few minutes to compute the expression profile with four processors. In the simulation stage, Trans-NanoSim ran for 2h11m with peak memory of 526MB, while DeepSimulator ran for 1d8h32m in total (with 5h46m to simulate signals and 1d2h46m for base calling) with peak memory of 17.22 GB (Tables 2.3 and 2.4). Tables 2.3 and 2.4 are adopted from the Trans-NanoSim supplementary data. We abbreviated simulated Trans-NanoSim runs as “TNS”, Trans-NanoSim runs with IR modeling as “TNS + IR”, and DeepSimulator as “DS” in Tables 2.3 and 2.4. Number of reads 10,000 50,000 100,000 687,192 TNS 00:02:22 00:08:49 00:17:09 02:11:30 TNS + IR 00:04:44 00:11:46 00:21:09 02:21:44 TNS 4 processors 00:01:16 00:03:05 00:05:17 00:33:35 DS + Guppy 00:06:06 + 00:24:28 00:25:35 + 02:06:39 00:53:23 + 03:57:04 05:46:34 + 26:46:39 Table 2.3 Runtime usage in simulating Human direct RNA dataset for Trans-NanoSim and DeepSimulator. The reported time is wallclock time in hh:mm:ss format. For DeepSimulator, the runtime comes in two parts, signal generation + base calling. The best runtime for each simulated set is bolded. This table is adopted from the Trans-NanoSim manuscript. Number of reads 10,000 50,000 100,000 687,192 TNS 0.50 0.49 0.53 0.52 TNS + IR 0.97 0.98 0.95 1.01 TNS 4 processors 2.46 2.45 2.68 2.51 DS + Guppy 17.22 17.22 17.22 17.22 Table 2.4 Memory usage in simulating Human direct RNA dataset for Trans-NanoSim and DeepSimulator. The reported memory is maximum resident set size. The lowest memory usage for each simulated set is bolded. This table is adopted from the Trans-NanoSim manuscript. 18 Trans-NanoSim also supports multi-processing, which reduces the runtime, but at the cost of increased memory usage (Figure 2.3, Table 2.5). The runtime of Trans-NanoSim is proportional to the number of reads to be simulated, with a fixed time usage for reading in profiles. The effect of multiprocessing starts to saturate with 12 CPUs when processing less than 60,000 reads, while with more reads, this saturation point is observed with a greater number of CPUs. Even with only four processors, there is a substantial reduction in runtime (~75% less than the same run on a single CPU); it took 33 minutes to simulate 687,192 human direct RNA reads. Processors Reads 1 4 8 12 20,000 0.98 4.85 8.47 12.32 40,000 1.00 4.53 8.60 11.82 60,000 0.99 4.89 8.27 12.14 80,000 0.96 4.79 8.26 11.91 100,000 0.98 4.92 8.80 11.98 Table 2.5 Trans-NanoSim multiprocessing memory usage (maximum resident set size in GB) with IR modelling. This table is adopted from the Trans-NanoSim manuscript. 19 Figure 2.3 Runtimes for multiprocessing Wallclock time (hh:mm) for Trans-NanoSim simulation stage with 1, 4, 8, and 12 processors. This figure is adopted from the Trans-NanoSim manuscript. We confirmed our findings by replicating all the analyses described here using human cDNA 1D2 and mouse cDNA sequencing data, yielding consistent results (Figure A.2 and A.3, respectively, and Table 2.1). We noticed that even though the error rates in the raw reads can vary from experiment to experiment, DeepSimulator always generates reads with similar error rates and length distribution, while Trans-NanoSim can adapt to different sequencing libraries and simulates base calling events that are true to the platform. 20 2.5 Methods 2.5.1 Trans-NanoSim workflow overview I designed the workflow of the Trans-NanoSim with the help of my colleague, Chen Yang. It consists of two stages: characterization of experimental reads and simulation from a reference transcriptome (Figure 2.4). In the characterization stage, experimental reads are aligned against the reference transcriptome to infer their source transcript, which is essential for read length analysis and transcript expression quantification. Reads are also aligned against the reference genome to compute statistical models for read error modes. Both genomic and transcriptomic alignments are used to model intron retention events. We also provide pre-trained models for users to use directly without training [71]. Next, according to these models, reads are simulated given a reference transcriptome and genome. For each read to be simulated, the source reference transcript is selected based on the expression profile. Then, a sequence is extracted from that transcript according to the length distribution model, and it is modified with respect to the IR and error models. This modular design of Trans-NanoSim enables it to adapt to changes in ONT chemistries by retraining models with the latest data. This ensures the simulator remains current with evolving ONT technology, maintaining accuracy and relevance in simulating long-read sequencing data. Furthermore, analyses suggest that the mixture models used to characterize sequencing errors remain robust across technological iterations [49,72]. 21 Figure 2.4 Schematic overview of the Trans-NanoSim pipeline. The first stage (Characterization) of the pipeline aligns input ONT transcriptome reads against the reference transcriptome and genome to statistically model the read length distribution and error modes. It also optionally detects intron retention events and quantifies transcript expression. These profiles alongside the homopolymer model are then used in the second stage (Simulation) to generate simulated reads, also reporting their associated error profiles. This figure is adopted from the Trans-NanoSim manuscript. 2.5.2 Length distribution characterization and simulation Previous versions of NanoSim utilized an empirical cumulative density function to simulate the length distribution of reads. In the current version of the pipeline, Chen Yang implemented a Kernel Density Estimation (KDE) approach for this task, which captures underlying patterns in the read length distributions, and avoids overfitting. We also replace the binning strategy in simulating the alignment ratio on each read with KDE, resulting in a smoother simulated read length distribution. Theoretically, nanopore transcriptome sequencing can yield reads of the same length as the original mRNA molecule. However, in practice, ONT reads are often shorter than their corresponding mRNA molecules due to experimental or data acquisition artefacts, and 22 thus they may represent partial transcripts. Therefore, it is crucial to consider the length of the reference transcript when simulating the length distribution of simulated ONT reads. In order to achieve this, we utilize a two-dimensional KDE model, and measure the length of an ONT read relative to the length of the source transcript. Furthermore, unaligned regions on both ends of each read are also subjected to length distribution analysis. We follow the same KDE model approach as described to model their length distributions separately. We note that, the percentage of antisense sequences in cDNA and dRNA sequences may be substantially different. To capture this information, Trans-NanoSim automatically infers the strand ratio by calculating the percentage of reads that are in the same direction as the annotated strand. This strand ratio is then utilized to assign the orientation of reads accordingly during the simulation stage. 2.5.3 Intron retention characterization and simulation Trans-NanoSim is able to detect and model IR events for ONT transcriptome reads. Based on alignments to intronic regions, it uses a Markov chain model to calculate the transitional probabilities between the states of spliced and retained introns, given the state of the previous intron. This feature is not part of the characterization phase by default. To enable this option, transcript annotation file in GTF/GFF format needs to be provided. This functionality can also be invoked in a standalone module (detect_ir), enabling users to only detect and model IR events without characterizing or simulating reads. The module outputs comprehensive information on the location of the detected IR events based on input ONT reads. 23 2.5.4 Transcript abundance quantification and simulation We have incorporated a pipeline to estimate transcript abundance based on reference transcriptome alignments (courtesy of Dr. Jared Simpson, personal communication) [73]. The pipeline relies on minimap2 with -p0 flag to retain all secondary mappings, and then utilizes an expectation-maximization approach similar to RSEM (RNA-Seq by Expectation Maximization) [74] to assign multi-mapping reads. It is a standalone module (quantify) that outputs transcript abundance in TPM values, which can be used in the simulation stage. Users may also provide their own expression profile in tab-delimited format, describing empirical or theoretical distributions, if preferred. During simulation, these transcript abundance values are used to calculate the probability of an isoform being selected and ultimately the number of constituent reads of each isoform. 2.5.5 Error mode characterization and simulation Statistical modelling of error patterns in long nanopore reads by NanoSim was proven to be effective in mimicking the sequencing platform [49]. In Trans-NanoSim, we build on the same mixture models to deal with transcriptome reads as these patterns are shared among different library preparation methods and datasets. According to the alignments, reads are classified into two groups: aligned and unaligned. For each group, we consider specific characterization and modelling approaches. As for the aligned reads, we consider their aligned bases for further error rate analysis. The length of indels and mismatches are drawn from Weibull/Geometric and Poisson/Geometric mixture models, respectively. We also calculate the transitional probability between every two consecutive base call errors using a Markov chain model. Chen Yang re-implemented the model fitting function of NanoSim in Python (formerly in R), and allowed 24 multi-threading to expedite the fitting process. Unaligned reads may provide crucial information about the nature of ONT sequencing experiments, and thus we chose to model the length distribution of the unaligned reads as well. For this purpose, we extract sequences from reference transcripts based on their length distribution and apply an arbitrarily high error rate (default, 90%). However, since it is impossible to trace their source transcript molecule, unaligned reads are not included in the error rate analysis. 2.5.6 Homopolymer characterization and simulation Previous versions of NanoSim have a k-mer bias parameter (--k-mer) in the simulation stage that effectively compresses all homopolymers longer than n into n-mers. However, it does not simulate homopolymer expansion events, nor is it an accurate representation of the distribution of read homopolymer lengths. My colleague, Theodora Lo, analyzed the datasets used in this study and observed that the homopolymer length on sequencing reads is consistent with a normal distribution. Further, she demonstrated that the mean and associated standard deviation of homopolymer lengths on those same reads is linearly proportional to the reference homopolymer length (Figure 2.5). 25 Figure 2.5 Homopolymer characterization of human NA12878 direct RNA dataset A. Each facet represents one homopolymer (length <= 15 nt) on the reference transcriptome, the x-axis of which designates the corresponding homopolymer length (<= 30 nt) on the raw reads. B. The y-axis represents the mean homopolymer length on raw reads. The fitted line is calculated based on linear regression and the grey area represents the 95% confidence interval. This figure is adopted from the Trans-NanoSim manuscript. 26 In the simulation stage, Trans-NanoSim first finds homopolymers greater than n in the sequence extracted from the reference. Given the reference homopolymer length, the mean and standard deviation, which are used to generate the normal distribution, are calculated from segmented and linear regression models, respectively. The homopolymer length to be simulated is then drawn from the constructed normal distribution, and the extracted sequence is modified accordingly. Depending on the base caller used and sequencing types, the distribution of read homopolymer lengths can vary; thus, while we provide pre-trained models to simulate genome and transcriptome reads base called with Albacore, Guppy’s default model and Guppy’s flip-flop model (Appendix A.2), we also provide a means to model the phenomenon. 2.5.7 Discussion and conclusion In this work, we report on results from comprehensive benchmarking experiments to illustrate Trans-NanoSim’s performance on three ONT RNA-seq datasets with different sequencing data types: dRNA, cDNA 1D2, and cDNA 1D. Our evaluations demonstrate the robustness of Trans-NanoSim in learning and mimicking the length distribution, sequence error profiles, and homopolymer runs of nanopore RNA-seq reads. Moreover, Trans-NanoSim provides a solution to the characterization of transcriptome-specific features, such as isoform expression and IR events, which cannot be addressed by genomic read simulators. As a fast and memory-efficient ONT read simulator, it is feasible to run Trans-NanoSim on a standard modern-day laptop computer. We anticipate that it will offer an important functionality to the community and it will facilitate the development of various base-level bioinformatics algorithms that leverage the potential of long nanopore reads, including transcriptome assembly, alignment and quantification, structural variant detection, and novel isoform identification. 27 Chapter 3: Collaborative works and applications of Trans-NanoSim 3.1 Publication note The content of this chapter reports the results from intra- and extramural collaborations I undertook during my PhD studies. These collaborative projects have contributed to the advancement of transcriptome analysis, demonstrating the practical applications and impact of Trans-NanoSim. The results of these efforts, to which I have contributed as a co-author, are encapsulated in three publications: GigaScience in 2023 [75], Nature Communications in 2023 [76], and Nature Methods in 2024 [77]. 3.2 Author summary This chapter describes a series of works that used Trans-NanoSim in analyzing transcriptomic data, and further addresses the first research objective in my thesis (See Chapter 1, Section 1.3). These collaborative efforts have led to the development and enhancement of computational tools and methodologies. The three studies included in this chapter are: 1. Meta-NanoSim: The third iteration of the NanoSim pipeline, Meta-NanoSim, facilitates the characterization and simulation of nanopore metagenomic reads. This version extends the framework to metagenomics and substantially builds on my improvements in its codebase. It addresses the unique challenges of simulating metagenomic data from complex microbial communities. 2. RNA-Bloom2: Trans-NanoSim played a crucial role in this study, supporting the benchmarking of reference-free assembly of long-read transcriptome sequencing data. By 28 simulating ONT cDNA and dRNA datasets, Trans-NanoSim enabled a comprehensive evaluation of RNA-Bloom2's assembly quality and computational efficiency. 3. LRGASP (Long-read RNA-seq Genome Annotation Assessment Project): Trans-NanoSim was critical in LRGASP project, a global initiative aimed at evaluating various computational methods for transcript identification and quantification using long-read sequencing data. By generating simulated datasets, Trans-NanoSim provided a resource for participants of this project to test and refine their approaches. Furthermore, my colleagues and I also participated in this project through RNA-Bloom2 assembly submissions. Given that these projects are primarily the work of my colleagues, the following sections will briefly cover the background and key results only, focusing on Trans-NanoSim's pivotal role in facilitating these projects without delving into extensive methods details. 3.3 Meta-NanoSim: A nanopore metagenome simulator 3.3.1 Background Building on the understanding established in Chapters 1 and 2, where the advancements in next-generation sequencing technologies and their impact on transcriptome analysis were discussed, this section explores the challenges and opportunities presented by nanopore sequencing technology in the context of metagenomic research. The capability of nanopore sequencing to produce long reads has notably advanced the field, enabling detailed study of microbial communities without the constraints of traditional culturing methods [78,79]. However, this technology also introduces specific challenges, such as high error rates, nonuniform error 29 distributions, and chimeric read artifacts, all of which necessitate the development of tailored analytical tools for metagenomic analysis. In developing and evaluating such tools, utilizing a nanopore metagenomic read simulator that mirrors ONT's characteristics can enhance efficiency and reduce costs. Meta-NanoSim, introduced as part of NanoSim version 3, is a simulator designed specifically for nanopore metagenomic data. It characterizes and simulates the unique properties of ONT metagenomic reads, including read length distributions, error profiles, and alignment ratio models. Additionally, it offers the capability to detect chimeric reads and to estimate the microbial abundance levels. In benchmarking exercises, it was demonstrated that the abundance estimation capabilities of Meta-NanoSim exceeded those of existing methods, and the inclusion of chimeric read detection contributed to more accurate simulations of read lengths. The utility of Meta-NanoSim in evaluating the performance of metagenomic assembly tools was also showcased, highlighting its value and applicability in the field. 3.3.2 Findings For training and testing Meta-NanoSim, we used two publicly available ONT datasets generated on the GridION platform [80]. ERR3152364 was sequenced from the Zymo CS Even ZRC190633 community, and ERR3152366 was sequenced from the Zymo CSII Log ZRC190842 community. Both communities contain eight species of bacteria and two species of fungi; the abundance levels are 12% for each bacterium and 2% for each fungus for the Even dataset; and the abundance levels for the Log dataset are distributed on a log scale, ranging from 89.1% (Listeria monocytogenes) down to 0.000089% (Staphylococcus aureus). 30 We first assess the chimeric read detection feature of Meta-NanoSim. Chimeric reads are prevalent in ONT sequencing data, constituting 1.70% to 8.17% of reads according to past findings [70,81–83]. These chimeric reads may impact downstream analyses, such as assembly, taxonomy binning, and quantification since they are free of known adapters and may contain unaligned or soft-clipped regions when aligned to their respective reference genome sequences. Meta-NanoSim's chimeric read detection feature improved alignment by reducing unaligned sections, which are evident in reads with over 1 kbp in length (Figure 3.1A). Length distributions of the gaps between split alignments displayed varied lengths, but Meta-NanoSim accurately simulated these patterns as illustrated in Figure 3.1B. Furthermore, we observed that the number of segments per read follows a geometric distribution, with an average of 1.03 segments per read for both datasets used in our study (Figure 3.1C). 31 Figure 3.1 Evaluation of chimeric read detection and simulation A. The length distribution of the unaligned regions of reads with or without chimeric read detection for the Log dataset (x-axis in logarithmic scale). B. The performance of gap length simulation for the Log dataset (x-32 axis in logarithmic scale). C. The number of segments each read contains for the Even and Log datasets. D. All segments in chimeric reads in the Even dataset are converted into overlapping pairs. Each facet represents 1 source species of the first segment, and the x-axis represents the source species of the second segment. Each facet shows the probability of the second segment given the source species of the first one. Cryptococcus neoformans and Saccharomyces cerevisiae are excluded here due to their low abundances. This Figure is adopted from the Meta-NanoSim manuscript. Current abundance estimation methods typically quantify mapped reads or k-mers, assuming uniform read lengths. However, given the wide variation in ONT read lengths, the average read length likely differs among species. My colleague, Chen Yang, implemented an optional feature in Meta-NanoSim to estimate microbial abundance levels and benchmarked its performance against other methods. Base-level quantification methods, specifically Meta-NanoSim variants (with chimeric read detection and with Expectation-Maximization (EM) algorithm), outperformed read-level methods like Salmon [84] and MetaMaps [85] in correlating with expected abundances, achieving the highest R-squared values and lowest percent errors (0.7499 and 144.0877 respectively for the Even dataset). We also note that difficulties in distinguishing multimapped reads for low-abundance species led to decreased log transformed R-squared values in the Log dataset for Meta-NanoSim without EM algorithm versus with EM algorithm (0.7895 and 0.9917 respectively). This indicates that EM can be advantageous for datasets consisting of similar genomes but with large variances in abundance levels. We also demonstrated the performance of Meta-NanoSim both in terms of runtime and accuracy in read simulation benchmarked against the results of CAMISIM [86]. It simulated 1 million reads in under 20 minutes using eight processors, outperforming CAMISIM's 6+ hour 33 requirement. Meta-NanoSim's simulations matched the empirical read lengths closely, with a median peak around 4,040 nt, closely mirroring the actual 3,994 nt whereas the length distribution of CAMISIM generated reads deviated far from those of empirical data (Figure 3.2A). Both tools accurately represented mismatches and deletions, but Meta-NanoSim had superior performance in simulating insertions and matches, showcasing the improved models (Figure 3.2B). Figure 3.2 Performance of Meta-NanoSim and CAMISIM in simulating 1 million reads from the Log dataset A. Comparison of read length distributions in the empirical vs. simulated reads (x-axis in logarithmic scale). Unaligned length represents the length of unaligned part of each aligned read. B. Cumulative probability distributions of the lengths of matches/errors in empirical and simulated reads. This figure is adopted from the Meta-NanoSim manuscript. 34 We finally explored the utility of Meta-NanoSim in assessing the correctness, scalability and robustness of metagenome assembly pipeline, metaFlye [87]. Meta-NanoSim was used to generate four distinct datasets with 1M, 2M, 4M, and 10M reads to evaluate metaFlye's assembly capabilities. We noticed that coverage correlated positively with read count and abundance, affecting reconstruction and NGA50 length, a metric representing length of the shortest alignment block for which longer or equal-length alignment blocks cover 50% of the reference genome size (Figure 3.3). Low coverage resulted in poor reconstruction; however, achieving 10× coverage allowed near-complete reconstruction for some species, such as S. cerevisiae. Coverage of 30× enabled whole genome reconstruction for B. subtilis. More reads improved the assembly for B. subtilis and S. cerevisiae, reducing contigs and showing the benefit of higher sequencing depth. Conversely, E. coli and S. enterica displayed fragmentation or misassembly at low coverage. Interestingly, high coverage did not always enhance assembly. For L. monocytogenes, fold coverage exceeding 1,000× led to quality degradation, despite maintaining a 100% genome fraction; the NGA50 length reduced significantly due to an increase in misassemblies and contigs (Figure 3.3). 35 Figure 3.3 metaFlye assemblies with 4 sets of simulated metagenome sequencing data The 4 sets of simulated datasets include 1, 2, 4 and 10 million reads, respectively. The abundance is the expected abundance level during simulation. The coverage panel shows the average read depth, including plasmids (x-axis in logarithmic scale). NGA50% represents the NGA50 length divided by the reference genome size. Genome fraction 36 is a proportion between the assembled sequences and each corresponding genome. The right-most panel shows the number of misassemblies and assembled contigs as the number of simulated reads increases. BS, Bacillus subtilis; CN, Cryptococcus neoformans; EC, Escherichia coli; EF, Enterococcus faecalis; LF, Lactobacillus fermentum; LM, Listeria monocytogenes; PA, Pseudomonas aeruginosa; SA, Staphylococcus aureus; SC, Saccharomyces cerevisiae; SE, Salmonella enterica. This figure is adopted from the Meta-NanoSim manuscript. 3.3.3 Discussion and conclusion The development of Meta-NanoSim represents a significant milestone in enhancing the NanoSim suite of tools, catering to the expanding applications of nanopore sequencing in metagenomic analysis. It introduces a base-level quantification method for abundance estimation and a method for characterizing and simulating chimeric reads. These advancements extend the tool beyond genome and transcriptome simulation to encompass metagenomic analysis, including metagenomic read error correction and taxonomy binning [88]. The significance and impact of NanoSim suite of tools is reflected in their widespread acceptance and use within the scientific community, as evidenced by receiving 251 Google Scholar citations, over 223 GitHub stars [89] and more than 46,000 Bioconda downloads [90] at the time of writing this. 3.4 RNA-Bloom2 3.4.1 Background A transcriptome assembler is a computational tool designed to piece together RNA-seq reads into longer sequences or complete transcripts, effectively reconstructing the original RNA sequences from which the reads were derived. Transcriptome assemblers can be categorized mainly into two types: reference-based, which align reads to a known reference genome to 37 construct transcripts, and reference-free (or de novo), which assemble transcripts without the guidance of a reference genome. The latter is pivotal for studies where the reference genome is incomplete, unavailable, or in cases exploring the transcriptomic diversity within or across species. It allows for the identification of novel transcripts, isoforms, and gene-fusion events that are not captured by the reference genome. The advent of long-read RNA sequencing technologies has underscored the need for specialized transcriptome assemblers that can handle the unique challenges of these data types such as higher error rates. Furthermore, long-read reference-free genome assembly algorithms are not well-suited for transcriptome data as they do not account for the reconstruction of alternative isoforms and nonuniform sequencing depth due to varying transcript expression levels. RNA-Bloom2 [76], developed by my colleague, Ka Ming Nip, is a novel tool for reference-free transcriptome assembly using bulk RNA long sequencing reads. Trans-NanoSim has been used in this study for generating simulated cDNA and dRNA read sets with ground truth for assembly benchmarking. It was also utilized in investigating the nucleotide base error rates of the reads before and after error correction component of RNA-Bloom2. These capabilities were instrumental in refining the algorithms underlying RNA-Bloom2, ensuring its effectiveness in accurately assembling transcriptomes. 3.4.2 Findings We first assessed the error correction of the RNA-Bloom2 using experimental mouse dataset from the LRGASP Consortium [77] containing matching sequencing data of the same biological sample for ONT cDNA and dRNA reads as well as Illumina short reads (40,225,298 read pairs 38 (2 × 100 nucleotides (nt)) which are only used for the hybrid error correction of the long reads. The ONT cDNA sample had the highest volume of reads (13,127,667) but the lowest alignment rate at 78.66%, while ONT dRNA sample with fewer reads (2,153,439), achieved alignment rates above 95% against the mouse GRCm39 reference genome. I analyze these datasets using Trans-NanoSim’s error rate calculation module and revealed that the initial error rates for ONT dRNA and ONT cDNA samples were 12.17% and 7.18%, respectively. Post-error correction, these rates decreased to 10.28% for ONT dRNA and 4.03% for ONT cDNA using only long reads for correction. The rates further dropped to 6.55% and 3.51%, respectively, when employing a hybrid method that combines both long and short reads. This demonstrates that the hybrid error correction method performs better compared to using only long reads for error correction. Ka Ming Nip also benchmarked the assembly quality and computational performance of RNA-Bloom2 against three other methods using simulated datasets generated by myself. First, I generated two mouse-simulated datasets with Trans-NanoSim, mimicking cDNA and dRNA sequencing protocols of experimental ONT data. To explore the impact of sequencing depth, we then subsampled each dataset to 2, 10, and 18 million reads, thus compiling six distinct sets for the benchmarking experiments. 39 Figure 3.4 Computational performance on simulated datasets All assemblers were run with 48 threads and assemblies were generated for 2, 10, and 18 million simulated reads of cDNA and dRNA samples. Peak memory usage was measured in gigabytes (GB), and runtime was measured in wall-clock hours. Both axes are in logarithmic scale. For StringTie2, StringTie2_GTF, and FLAIR, performance figures include read alignment and generation of indexed BAM files. Source data are provided as a Source Data file. This figure is adopted from the RNA-Bloom2 manuscript. RNA-Bloom2 demonstrated the lowest memory usage among the methods when processing the 2 million-read cDNA dataset, indicating efficient memory management. Reference-based assemblers, specifically both run modes of StringTie2 [91] (with and without the transcriptome annotation, StringTie2_GTF and StringTie2, respectively), had the fastest runtimes and consistently low peak-memory usage across all datasets. FLAIR [92], a reference-based method, had the worst peak-memory usages and RATTLE [93], a reference-free method, had the worst total runtimes (Figure 3.4). The peak memory usage and total runtimes of RATTLE were 1.24–3.70 and 9.22–28.12 times of those of RNA-Bloom2, respectively. In terms of assembly quality, RNA-Bloom2 outperformed RATTLE in both complete transcript reconstruction (+1.5 to +7.3%) and minimizing missing transcripts (–9.2 to –11.9%) across all simulated samples. 40 3.4.3 Discussion and conclusion RNA-Bloom2 effectively addresses the computational challenges posed by the increasing throughput of long-read sequencers, as evidenced by its performance in benchmarking studies. Trans-NanoSim played an enabling role in this study, both by providing simulated datasets that mimic the intricacies of real sequencing data as well as measuring the error rates in pre- and post-correction stages of RNA-Bloom2. 3.5 LRGASP 3.5.1 Background The LRGASP Consortium was established to systematically evaluate long-read RNA-seq technologies from ONT and PacBio (Pacific Biosciences of California, Incorporated) for their efficacy in transcript identification and quantification. LRGASP set out to provide a comprehensive, open-community evaluation of long-read sequencing platforms, library preparation methods, and computational tools across three main challenges: 1) reference-based transcript isoform detection, 2) transcript isoform quantification, and 3) de novo transcript isoform identification, the latter particularly focusing on non-model organisms without high-quality annotated genomes. The organizers of the LRGASP Consortium generated long-read and short-read RNA-seq data from aliquots of identical RNA samples. These reads were from cDNA and dRNA datasets covering human, mouse, and manatee species, using various library protocols and sequencing 41 platforms. All samples were grown as biological triplicates with the RNA extracted at one site, spiked with 5’-capped Spike-In RNA Variants (Lexogen SIRV-Set 4). These SIRV transcripts were served as ground truth along with simulated datasets in evaluating computational tools. The datasets were then distributed to all production groups and utilized by developers to address the three challenges mentioned earlier. The findings from LRGASP quantified the strengths of long-read sequencing for achieving full-length transcript reconstruction and uncovering novel transcripts, even within well-annotated genomes. However, the moderate agreement between different bioinformatics tools used in the analysis highlighted the ongoing challenge of accurately annotating genomes de novo using only long-read data. The study also revealed variability in transcript quantification accuracy across tools, which can be attributed to the limitations of long-read technologies at the time of the study, including lower throughput and higher error rates. 3.5.2 Findings Pre-trained cDNA and dRNA models from Trans-NanoSim package, with an average error rate of 15.9% (4.8% substitutions, 6.0% deletions, 5.1% insertions) and 11.2% (2.8% substitutions, 5.9% deletions, 2.5% insertions) respectively were used to simulate ONT cDNA and dRNA read sets. Human dataset was simulated with 30 million ONT cDNA and mouse dataset was simulated with 20 million ONT dRNA sequences. These simulated datasets from Trans-NanoSim were then used in Challenge 1 and 2 to evaluate transcript calls made on human and mouse long read RNA-seq data as well as to evaluate transcript isoform quantification performance. 42 In addition to the enabling role of Trasn-NanoSim within the LRGASP project by generating simulated reads to be used as ground truth, the transcript quantification mode of Trans-NanoSim has also been evaluated in Challenge 2 along with other quantification tools (RSEM, IsoQuant [94], Bambu [95], TALON [96,97], FLAIR [98], FLAMES [99], and IsoTools [100]). The following three metrics have been used to evaluate how close the estimations and ground truth values were for each of the quantification tools. 1. Spearman Correlation Coefficient (SCC) which evaluates the monotonic relationship between the estimation and the ground truth, which is based on the rank for transcript isoform abundance. 2. Median Relative Difference (MRD) which is the median of the relative difference of abundance estimates among all transcript isoforms within a sample. A small MRD value indicates the good performance of abundance estimation. 3. Normalized Root Mean Square Error (NRMSE) which provides a measure of the extent to which the one-to-one relationship deviates from a linear pattern. A good performance of abundance estimation should have a small value of NRMSE. For the SIRV-set 4 data, the number of SIRV transcripts with TPM>0 identified by different tools varied significantly, ranging from 28 to 136. RSEM demonstrated superior performance over other long-read-based tools, achieving an average SCC of 0.84 compared to 0.29–0.78, an MRD of 0.12 versus 0.13–1.00, and an NRMSE of 0.45 compared to 0.89–2.19. Among the long-read tools, Trans-NanoSim showed strong results with an SCC of 0.78, MRD of 0.23, and NRMSE of 0.89, closely followed by IsoQuant with SCC of 0.76, MRD of 0.19, and NRMSE of 43 0.89. IsoTools, FLAIR, and Bambu lagged with respective scores of SCC 0.69, 0.73, 0.68; MRD 0.13, 0.42, 0.79; and NRMSE 1.02, 1.13, 1.55 (Table 3.1). Long-read tools SSC MRD NRMSE Trans-NanoSim 0.78 0.23 0.89 IsoQuant 0.76 0.19 0.89 IsoTools 0.69 0.13 1.02 FLAIR 0.73 0.42 1.13 Bambu 0.68 0.79 1.55 Table 3.1 Transcript isoform quantification using long-read tools 3.5.3 Discussion and conclusion The evaluation results of transcript isoform quantification analysis underscored the challenges in accurately quantifying low-expression and complex transcripts and highlighted performance disparities among tools under various data scenarios. By generating simulated datasets, Trans-NanoSim provided a resource for participants of this project to test and refine their approaches which might led to the development and enhancement of computational tools and methodologies for transcriptome analysis. 44 Chapter 4: ntEmbd: deep learning embedding for nucleotide sequences 4.1 Publication note The material in this chapter is currently being prepared for submission to a refereed journal and is also available in preprint form on bioRxiv [101]. Furthermore, I presented the preliminary findings of this research at the 31st Annual Conference on Intelligent Systems for Molecular Biology and the 22nd European Conference on Computational Biology – Community of Special Interest in Machine Learning in Computational and Systems Biology (ISMB ECCB – MLCSB COSI), Lyon, France in 2023. 4.2 Author summary This chapter addresses the second research objective in my thesis (Section 1.3). It introduces ntEmbd, a deep learning embedding technique designed to enhance the representation of RNA sequences for bioinformatics analysis. Here, I describe the development and implementation of ntEmbd, focusing on its ability to encapsulate the complex nature of RNA sequences into concise, fixed-dimensional vectors. Further, I provide two sample use cases, describing how learned RNA features can be used in downstream analysis. The first use case demonstrates ntEmbd’s utility in classifying coding and noncoding RNA benchmarked against existing tools, and the second one explores the utility of learned representations in identifying adapter sequences in nanopore RNA-seq reads. 45 4.3 Introduction The effectiveness of traditional machine learning algorithms is largely influenced by the data representation they employ, that is, on how each feature is computed. The quality and relevance of these features significantly impact classification model’s outcomes as human-designed features may introduce biases into model predictions. Therefore, identifying optimal features is challenging for numerous bioinformatics classification tasks. A promising solution to this challenge is representation learning where the model learns to identify the most effective feature set implicitly and summarize them in vectors of real number, named embeddings. Traditional embedding approaches, such as one-hot encoding or k-mer based representations, are limited in their ability to capture the contextual dependencies inherent in nucleotide sequences. One-hot encoding transforms each nucleotide into a fixed-size vector where the position corresponding to the nucleotide is marked with ‘1’ and all other positions are set to ‘0’. In contrast, k-mer based representation involves identifying unique substrings of length k within the nucleotide sequences (k-mers) and assigning an integer value to each of them to represent the sequence in a compact form. These methods often result in high-dimensional, sparse data representations that are not conducive to efficient computation or effective learning. Transitioning from these traditional methods, Word2Vec [102] and FastText [103–105], which borrow from successes in natural language processing, offer a different approach by generating dense, lower-dimensional vectors for each word in a text corpus through training models that predict a word from its local context (Word2Vec) or a word from its subwords (FastText), hence they account for local context around each word but not for the sequential order of nucleotides across the larger structure of RNA. Moreover, while these models improve upon one-hot 46 encoding by considering local context, they do not fully appreciate the sequential order of nucleotides or long-range interactions relevant for RNA structure and function. Therefore, methods based on these approaches are limited in capturing the full complexity of sequence-dependent features since they assign the same vector to the same word, regardless of its context [106–110]. Hence, there is a demand for representations that encapsulate the complex nature of RNA sequences to support bioinformatics analyses and interpretations. Embedding methods reduce nucleotide sequences to compact, fixed-length vector representations while effectively learning their features. These features can be applied on different downstream tasks where the traditional approaches often depend on explicit, handcrafted features, which can introduce biases and may fail to encapsulate the full spectrum of sequence intricacies [111–114]. Such engineered features, while beneficial in certain contexts, are derived from prior biological knowledge and assumptions that limit the model’s ability build upon those features to reveal novel insights and to generalize across different RNA sequence landscapes. Moreover, these manual features might overlook subtle, yet biologically important patterns within the nucleotide sequences, due to their reliance on what is already understood rather than what can be discovered through data-driven approaches. Deep learning offers a promising avenue to address these challenges in transcriptomic studies. An advantage of deep learning is its capacity to integrate feature extraction directly within machine learning algorithms. This integration yields representations of sequences that are both rich in information and readily interpretable by machines, thereby streamlining the creation of downstream models for classification and clustering. In the protein domain, for instance, deep 47 learning techniques have been leveraged to learn representations from amino acid sequences [45,46]. On the other hand, feature embedding is particularly challenging for transcriptomic studies as the sequences are string of thousands of nucleotides in length, which make the long-term dependencies between features from different parts of the sequence even more difficult to capture. This highlights the need for nucleotide sequence embedding methods that are tailored to this problem domain and are capable of learning input sequence features implicitly. Here I present ntEmbd, an embedding method to learn a fixed-dimensional representation for nucleotide sequences using deep learning autoencoder architecture. To determine the specific features captured by ntEmbd model, I employed two methods. Firstly, I visualized the embeddings, the learned representations of the RNA sequences, to assess if distinct clusters corresponding to different biological classes (e.g., coding vs. non-coding sequences) emerge. Such visualizations help explain whether the autoencoder manages to separate distinct sequence types into different regions of the embedding space, indicating effective learning of biologically relevant features. Secondly, I utilized these embeddings as inputs for downstream classification tasks. By evaluating the performance of classifiers using these embeddings and analyzing the classification metrics, one could gain insights into the quality and utility of the learned representations. To this point, I demonstrate use case of ntEmbd embeddings in two downstream analyses: 1) RNA coding potential assessment task classifying coding versus noncoding sequences, and 2) Detecting Nanopore adapter sequences in ONT reads. 4.4 Methods 48 4.4.1 Architecture of ntEmbd Autoencoders, which are central to the design of ntEmbd, are quintessential algorithms in representation learning. They function through an unsupervised learning approach aimed at implicitly learning a lower-dimensional feature representation of the input data. The architecture of an autoencoder consists of two primary components: an encoder and a decoder. In this setup, the encoder compresses the input 𝑥 into a lower-dimensional embedding ℎ, which the decoder then uses to reconstruct the input, yielding the output 𝑟. The learning process of an autoencoder involves minimizing a loss function 𝐿, which penalizes the model when the reconstructed output 𝑟 is dissimilar from the original input 𝑥. By training the model to reconstruct the input in its output, the autoencoder attempts to capture and summarize the most important features of the input data in what is referred to as the latent space or embeddings. ntEmbd’s general workflow for encoding RNA sequences into embeddings is summarized in Figure 4.1. It utilizes Bidirectional Long short-term memory (Bi-LSTM) [115,116] networks within its encoder and decoder functions to capture both local and long-range dependencies by processing data in both forward and backward directions. The process begins with input nucleotide sequences that are first pre-processed and encoded based on IUPAC encodings [117] (Figure 4.2), then passed through a masking layer to handle variable-length sequences. Subsequently, the data is processed through a Bi-LSTM layer in the encoder, followed by a dense layer that transforms the encoded data into a fixed-size embedding vector ℎ. This vector ℎ represents the learned feature representation of the input sequence. A repeat vector layer then modifies the encoded data before it enters the decoder Bi-LSTM, which reconstructs an intermediate representation of the original sequence from the learned embeddings. Lastly, a 49 dense layer is applied to each time step of the sequence to produce the final reconstructed output sequence. Figure 4.1 Overall view of ntEmbd architecture The model's training objective is to minimize the reconstruction loss, 𝐿(𝑥, 𝑟), which measures the distance of the reconstituted sequences to the original ones. Through this process, the encoder is encouraged to retain only the most important features in the latent space representation. These features are encoded as real-numbered vectors in ℎ. 50 For the above-mentioned loss function calculation to work, the implementation should satisfy the requirements for a distance measure between sequences of the same length to be a metric, meaning that the distance to self is zero, the distance between two vectors is symmetric, and finally it follows the triangle inequality. To quantify the loss function and measure the distance between vector representation of input sequences and their reconstructed observation, the model incorporates the following formula where for vectors 𝑥 and 𝑟, the angular distance is calculated using the arccosine of their dot product, scaled by a factor of 2𝜋 to ensure the loss ranges between 0 and 1. 𝑑(𝑥, 𝑟) =2 cos−1(𝑥 ∙ 𝑟)𝜋 This workflow design allows ntEmbd to identify and represent the biophysical properties of RNA sequences in the latent space as vectors of real numbers, without explicitly defining these properties in prior. The resulting features from the latent space are then utilized in various downstream tasks as demonstrated in two use cases described in the results section. 51 Figure 4.2 IUPAC degenerate base symbols The illustration is adopted from Nucleic acid notation wikipedia page [118]. 4.4.2 Data preparation and training strategy To train ntEmbd, I utilized full-length reference human transcript sequences. In the pre-processing stage, sequences were first adjusted to a uniform length through padding. ntEmbd also provides the functionality for users to truncate sequences based on minimum and maximum length parameters. This length standardization facilitates batch processing, which is critical for the computational efficiency of the training process required by modern deep learning frameworks such as TensorFlow and Pytorch [119,120]. Following this, the dataset was prepared for validation and testing: 20% of the data was reserved for final evaluation, while the remaining 52 80% was used for training. Within this training subset, a further split was executed to form a validation set which is used for monitoring the model training performance. This split ratio is 75/25 percent by default and users have the option to set their own preferred values when training a ntEmbd model. ntEmbd employs early stopping approach to prevent overfitting during training. It monitors the performance of the model on validation set with a patience variable set to 10 by default. This specifies the number of epochs it waits after the last time the model's performance improved on the validation set. I also incorporated a model checkpoint callback that saves the best model in each step. 4.4.3 Classification models Following the generation of learned representations for each RNA sequence using the ntEmbd model, these embedding vectors serve as inputs for training several classifiers to facilitate classification analysis. The models trained include a Multilayer Perceptron (MLP), which is a type of neural network known for its ability to learn non-linear relationships through layers of interconnected nodes; K-Nearest Neighbors (KNN), a distance-based classifier that assigns a class based on the majority vote of the nearest data points; Gradient Boosting (GB), an ensemble technique that builds models sequentially to correct the errors of the previous models and combines them for improved prediction; and Random Forest (RF), which constructs a multitude of decision trees at training time and outputs the class that is the mode of the classes of the individual trees. To optimize performance, a stacking ensemble method is employed, wherein predictions from each classifier—MLP, KNN, GB, and RF—are combined and used as input to a 53 final model. This ensemble model leverages the collective strengths of the individual classifiers to improve overall accuracy and is used in downstream classification tasks (denoted as ntEmbd-MRKG in Table 4.1). Each classifier brings unique strengths to the table: MLP excels in capturing complex patterns, KNN is effective in a setting where the decision boundary is irregular, Gradient Boosting is robust against overfitting, and Random Forest provides high accuracy through its ensemble approach. 4.4.4 Hyperparameter tuning Hyperparameter optimization is the process of systematically searching for the ideal set of hyperparameters that provides the best performance for a machine learning model. It is critical because hyperparameters, which are the configurations external to the model and not learned from data, substantially influence model behavior and performance. For this purpose, ntEmbd employs a hyperparameter optimization framework named Optuna [121]. Optuna offers a versatile and user-friendly interface for hyperparameter tuning, which can be executed in two modes in ntEmbd pipeline: a standalone mode dedicated solely to hyperparameter tuning and an integrated mode that allows for hyperparameter tuning concurrently with model training. The goal of an Optuna study is to find out the optimal set of hyperparameter values through multiple trials. Users have the flexibility to select from a variety of Samplers, which are algorithms to suggest parameter values, and Pruners, which are methods to stop unpromising trials early, thus improving computational efficiency. This approach ensures that the model is not only fit but also generalizes well to new, unseen data, which is essential for producing reliable and robust machine learning applications. 54 One particular challenge with hyperparameter optimization is its computational expense, as it typically involves running numerous trials to optimize the loss function with various parameter sets across each fold of the training data. Each hyperparameter can impact the runtime differently and may have varying degrees of importance for the objective value. Optuna aids in identifying these nuances by providing insights into which hyperparameters significantly affect performance. For instance, batch size, LSTM unit size, and embedding size were identified as having substantial impacts on performance. ntEmbd employs two strategies to mitigate the computational cost challenge mentioned earlier. First, I implemented an automated search space suggestion feature within ntEmbd to pre-analyze a subset of the training data before the commencement of tuning and suggest a tailored search space for Optuna, effectively narrowing the range for critical hyperparameters based on the characteristics of the input sequences. This component analyzes the size of training data as well as the length distribution of input sequences and suggests a value range for the following three hyperparameters: embedding size, LSTM unit size, and batch size. Additionally, to further enhance efficiency, the Optuna run within ntEmbd supports parallelization and uses a rational database (RDB) to manage trial data, allowing multiple optimization processes to run concurrently. This approach not only expedites the tuning process but also ensures the robustness and reproducibility of the optimization. ntEmbd employs a 5-fold cross-validation approach where it initializes an Optuna study and records the best loss and parameters for each fold. Finally, it aggregates the best hyperparameters across folds using voting strategy for categorical parameters and averaging for continuous 55 parameters. These aggregated best parameters are then used in training the ntEmbd autoencoder model or reported to the user in the case of running hyperparameter tuning module on standalone mode. Additionally, ntEmbd incorporates Optuna’s visualization capabilities to aid users in interpreting the optimization process and making informed decisions about parameter selection. 4.4.5 Modular design The ntEmbd pipeline is designed with a modular structure, comprising discrete components for training, embedding, visualization, and analysis. This means that researchers can use the pipeline to train their own model, get the embedding vectors for given RNA sequences using a pre-trained model, visualize the embedding vectors, or perform only hyperparameter tuning analysis. 4.5 Results 4.5.1 Application in coding and noncoding classification I first assessed the effectiveness of the ntEmbd learned representations in a functional annotation task involving the classification of RNA sequences into coding or noncoding transcripts. I selected the RNA sequences from the human reference transcriptome and labeled them as either protein-coding (mRNA) or noncoding (ncRNA) according to the biotype classes. I filtered these sequences based on three different maximum length thresholds (1500, 2000, and 3000 nt) and pre-padded them to get uniform lengths. This resulted in 14,090, 26,488, and 51,058 mRNA sequences and 10,728, 13,089, and 15,937 ncRNA sequences respectively. I trained ntEmbd models using these sequences and generated the learned representation for each RNA sequence. Utilizing the ntEmbd-generated embeddings along with respective sequence labels, I then trained 56 supervised classifiers to distinguish coding and noncoding RNAs. The ensemble model achieved an accuracy of 0.874, a sensitivity of 0.957, receiving an F1 score of 0.920. The model’s specificity decreased as the length of input sequences increased, whereas both sensitivity and precision increased, resulting in higher overall F1 scores with longer input sequences (Table B.1). 4.5.2 Benchmarking against other RNA coding potential assessment tools I further assessed the effectiveness of ntEmbd generated embeddings in RNA coding potential assessment task by comparing its performance against five other existing state-of-the-art predictors in this domain [113,122–125]. Table 4.1 summarizes the comparison of classification performance using trained models on the mRNN dataset [125]. The training set consists of 87,188 mRNA and 24,421 lncRNA sequences and the test set includes an equal number of mRNA and lncRNA sequences, each with 500 sequences, designed to test classification capabilities under stringent conditions with mRNAs with short ORFs (≤50 codons in the GENCODE annotation) and lncRNAs with long untranslated ORFs (≥50 codons). The ensemble classifier built upon ntEmbd embeddings (ntEmbd-MRKG) outperformed other tools in almost every metric, notably achieving high accuracy (0.884), recall (0.938), and F1-score (0.886), only falling short on precision (0.840). Tools Sensitivity Precision F1 score Accuracy RNASamba 0.774 0.917 0.839 0.852 CPAT 0.528 0.967 0.683 0.755 CPC2 0.384 0.932 0.543 0.678 57 FeeLnc 0.598 0.937 0.730 0.779 mRNN 0.798 0.936 0.861 0.872 ntEmbd-MRKG 0.938 0.840 0.886 0.884 Table 4.1 Benchmarking ntEmbd embedding in RNA coding potential assessment task 4.5.3 Impact of sequence completeness on RNA classification accuracy I also explored the impact of RNA sequence completeness on the performance of classifiers in distinguishing coding from noncoding transcripts. I first generated three set of sequences from complete RNA transcripts: those containing the longest open reading frame of the RNA transcript (referred as full set in this analysis), those containing 5’, 3’, or both 5’ and 3’ truncated sequences (referred as partial set), and lastly a combination of both. Next, I extracted embeddings for these full and partial-length transcripts using a pre-trained ntEmbd model and assessed the distance between these embeddings. Visualizing the UMAP plot of full and partial-length transcripts’ embedding vectors using the Tensorflow Embedding Projector [126] indicated a noticeable separation between the two classes (Fig 4.3). 58 Figure 4.3 Visualizing full and partial-length transcripts’ embedding vectors Next, I trained three classifiers using these embeddings as input: one model with only full-length, another with only partial-length, and a third with a combination of both sequence types. I also employed the pre-trained ntEmbd model to get the embedding vectors of the original RNA transcript sequences studied in this analysis and used them as test set to evaluate the above-mentioned three models. The model trained on both sequence types (full + partial) demonstrated higher accuracy, with a score of 0.646, in comparison to the models trained exclusively on full-length or partial-length sequences, which scored 0.564 and 0.589, respectively (Table 4.2). This suggests that training on a dataset that mirrors the variation found in actual RNA sequences—comprising both complete and incomplete transcripts—enhances the classifier's ability to accurately predict RNA coding potential in real-world scenarios. 59 Model Sensitivity Precision F1 score Accuracy Only Full 0.996 0.559 0.716 0.564 Only Partial 0.974 0.576 0.724 0.589 Both 0.859 0.632 0.728 0.646 Table 4.2 Coding and noncoding RNA classification metrics studying the effect of sequence completeness 4.5.4 Transfer learning with ntEmbd for identifying ONT adapters Adapters are essential component of the ONT sequencing workflows, and their sequences are commonly found in the final output reads. These sequences are typically either trimmed during base calling (in which strand-specificity is lost) or in post-processing analysis, making final sequences ready for downstream tasks. Here, I investigated the utility of ntEmbd embeddings for detecting adapter sequences in ONT sequencing data through a transfer learning approach. First, I processed ONT cDNA reads from a mouse replicate (ENCFF232YSU) of the LRGASP project [77] with pychopper [127] to identify ones with and without primer sequences. I used a pre-trained ntEmbd model to learn features of these sequences and generated their embedding vectors. Next, I trained two MLP classifiers to distinguish reads containing primers from those without. For the first classifier, I used the ntEmbd embeddings as input whereas for the second one, I fed K-mer embeddings for training. The latter is a collection of unique integer values assigned to each 3-mer within the RNA sequence. 60 Classifiers Sensitivity Precision F1 score Accuracy ntEmbd-MLP 0.977 0.862 0.916 0.910 K-mer-MLP 0.951 0.690 0.800 0.762 Table 4.3 Transfer learning with ntEmbd for identifying ONT adapters The classifier utilizing ntEmbd embeddings achieved an accuracy of 0.91, with both sensitivity and precision exceeding those achieved by a classifier using K-mer embeddings (0.977 and 0.862 compared to 0.951 and 0.690) as demonstrated in Table 4.3. This analysis, conducted on a model not originally trained on ONT reads, showcases ntEmbd's transfer learning capability for feature learning and suggests its potential for broader applications within nanopore sequencing workflows. 4.6 Conclusion In this project, I introduced ntEmbd, a deep learning embedding technique to learn feature representation of nucleotide sequences and demonstrated the power of ntEmbd-generated representations in two use cases. First, I assessed the effectiveness of ntEmbd generated embeddings in classifying coding versus noncoding RNA transcripts by benchmarking its performance against five other tools. I also studied the impact of RNA sequence completeness in my model’s classification performance. I further applied the ntEmbd embeddings on Nanopore adapter sequence detection task and demonstrated its transfer learning capability for feature learning. I believe that ntEmbd has the potential to be a valuable tool for other sequence classification and clustering tasks when fine-tuned to the specific problem space. Its ability to capture and encode 61 long-range dependencies in nucleotide sequences makes it suitable for tasks such as metagenomic classification. Moreover, ntEmbd can play an important role in searching for similar sequences within large databases. By encoding sequences into embeddings, ntEmbd could facilitate the use of vector-based databases that can expedite the retrieval process, making it highly efficient for comparative genomics and pathogen identification. Additionally, ntEmbd’s ability to represent sequences in a dense, informative format is ideal for grouping similar sequences. This capability can be harnessed to perform clustering analyses, which are essential in studies aiming to categorize gene families, understand functional genomics, and explore microbial diversity. 62 Chapter 5: Conclusions 5.1 Summary In this thesis, I have introduced and elaborated on two computational tools, Trans-NanoSim and ntEmbd, which represent the core of my PhD work. These tools are instrumental in advancing transcriptome analysis, particularly focusing on ONT long read sequencing data. Chapter 2 presents the development and application of Trans-NanoSim, while Chapter 3 extends this discussion by showcasing collaborative works that highlight Trans-NanoSim's practical applications. Chapter 4 describes the second major project of my thesis, detailing the development of ntEmbd, a deep learning embedding pipeline for nucleotide sequences. Here I briefly summarize each of the tools. 5.1.1 Oxford Nanopore RNA-sequencing simulation with Trans-NanoSim I introduced Trans-NanoSim, a novel tool designed to simulate nanopore transcriptome sequencing data, mimicking the technical features of the ONT sequencing platform, like read error patterns, length distributions, and homopolymer artifacts, alongside transcriptome-specific characteristics such as expression patterns and intron retention events. Through comprehensive benchmarking against three publicly available ONT datasets, Trans-NanoSim demonstrated superior performance over an existing genomic simulator, DeepSimulator. The capability provided by Trans-NanoSim will be valuable for the development of bioinformatics algorithms tailored to long-read sequencing technologies. 63 5.1.2 Learning features of RNA-sequencing data with ntEmbd I introduced ntEmbd, an embedding technique designed to learn feature representation of RNA sequences using deep learning autoencoder architecture. I described the development and implementation of ntEmbd, demonstrating its ability to encapsulate the complex nature of RNA sequences into fixed-dimensional vector representations. Further, I provided two sample use cases, describing how learned RNA features can be used in downstream analysis. I first demonstrated ntEmbd’s utility in classifying coding and noncoding RNA sequences, benchmarked against existing RNA coding potential assessment tools. I also studied the impact of sequence completeness in classification power of the downstream models. I further explored the utility of learned representations in identifying adapter sequences in nanopore RNA-seq reads. 5.2 Future directions Although the research objectives of this thesis have been concluded, there are several key areas for improvement and exploration in future works. These areas not only promise to enhance the capabilities of Trans-NanoSim and ntEmbd but also aim to further expand the scope of bioinformatics tools in transcriptome analysis, particularly with long read sequencing data. 5.2.1 Advancements and opportunities for NanoSim suite of tools The evolving landscape of ONT sequencing presents both challenges and opportunities for NanoSim suite of tools. As advancements in pore chemistry, library preparation methods, and base calling algorithms continue to enhance sequencing accuracy and efficiency, the necessity for NanoSim to integrate machine learning-based approaches for learning nanopore signal data 64 becomes increasingly apparent. Such an approach would not only enable the simulation of reads that are closely aligned with the latest developments in the ONT sequencing space but also ensure that NanoSim remains at the forefront of simulating highly accurate genomic, transcriptomic, and metagenomic data. Additionally, considering the rapid pace of these advancements, the development of newer trained models to keep pace with the latest ONT sequencing innovations is essential. This adaptability would ensure that NanoSim continues to provide valuable insights and support to the bioinformatics community in the face of evolving sequencing technologies. Furthermore, the introduction of more user-defined options, such as specifying desired read coverage or sequencing depth, could substantially enhance the utility of NanoSim suite of tools including Trans-NanoSim. This feature would allow researchers to tailor their simulations more precisely to their experimental needs. The possibility of simulating single-cell Nanopore reads also opens up new avenues for research, catering to the growing interest in single-cell genomics and its unique challenges. Another feature could be enabling users to simulate reads from specific genomic locations, providing a more versatile tool for a wide range of research applications. These future directions represent exciting opportunities for the community to further enhance the capabilities of NanoSim, addressing open problems and expanding its applicability in the rapidly advancing field of genomics. 5.2.2 Advancing embeddings with next-generation ML technologies The evolution of ntEmbd into a more sophisticated tool for RNA sequence analysis invites a thoughtful exploration of potential advancements and the open problems that remain within the 65 domain. One avenue to explore would be the integration of transformer architectures into RNA sequence analysis which might enhance the model's ability to capture complex, long-range dependencies. Given transformers' success in various applications, their adaptation to manage the intricacies of RNA sequences could significantly improve the depth and expressiveness of embeddings. However, the substantial computational resources required by transformers present a notable challenge. Exploring architectures like Hyena [128], which aim to reduce these demands, could provide a balanced approach to leveraging the strengths of transformers while mitigating their limitations. The transformative impact of large language models (LLMs) in various fields, underscored by the success of models like ChatGPT [129] offers an intriguing prospect for the ntEmbd project. Leveraging these foundational models, which have been trained on diverse datasets to capture complex patterns in language, could revolutionize how we approach bioinformatics problems. By fine-tuning these LLMs with extensive RNA sequencing datasets, we can harness their advanced representation capabilities for bioinformatics applications, potentially unveiling novel insights into RNA biology and function. To this end, conducting large-scale studies to train LLMs specifically targeted at sequencing data emerges as a pivotal strategy. Drawing inspiration from innovative ventures like Inceptive, an early-stage company co-founded by Jakob Uszkoreit (co-author of Attention is All You Need paper [130] which introduced Attention mechanism in LLM training) and Dr. Rhiju Das from Stanford University, we can envision a new frontier in RNA studies. Inceptive's approach, which synergizes highly scalable experiments with deep learning, offers a valuable model for how 66 ntEmbd could evolve. By integrating similar methodologies that combine extensive experimental data with machine learning techniques, ntEmbd could advance the capability of learning RNA molecule features and facilitate related research in the field, thereby contributing to breakthroughs in therapeutic development and beyond. 67 Bibliography 1. Yang C, Sc M. Computational modelling, simulation, and prediction of biological sequences. Technology (Singap World Sci). 2021; 2. Neve J, Patel R, Wang Z, Louey A, Furger AM. Cleavage and polyadenylation: Ending the message expands gene regulation. RNA Biol. 2017 Jul 3;14(7):865–90. 3. Wang Z, Gerstein M, Snyder M. RNA-Seq: a revolutionary tool for transcriptomics. Nat Rev Genet. 2009;10(1):57–63. 4. Mortazavi A, Williams BA, McCue K, Schaeffer L, Wold B. Mapping and quantifying mammalian transcriptomes by RNA-Seq. Nature Methods 2008 5:7. 2008 May 30;5(7):621–8. 5. Costa V, Aprile M, Esposito R, Ciccodicola A. RNA-Seq and human complex diseases: recent accomplishments and future perspectives. European Journal of Human Genetics. 2013;21(2):134–42. 6. Prokop JW, Shankar R, Gupta R, Leimanis ML, Nedveck D, Uhl K, et al. Virus-induced genetics revealed by multidimensional precision medicine transcriptional workflow applicable to COVID-19. Physiol Genomics. 2020 May 21;52(6):255–68. 7. Ozsolak F, Milos PM. RNA sequencing: advances, challenges and opportunities. Nature Reviews Genetics 2010 12:2. 2010 Dec 30;12(2):87–98. 8. Metzker ML. Sequencing technologies — the next generation. Nature Reviews Genetics 2010 11:1. 2009 Dec 8;11(1):31–46. 68 9. Gong L, Wong CH, Cheng WC, Tjong H, Menghi F, Ngan CY, et al. Picky comprehensively detects high-resolution structural variants in nanopore long reads. Nature Methods 2018 15:6. 2018 Apr 30;15(6):455–60. 10. Seki M, Katsumata E, Suzuki A, Sereewattanawoot S, Sakamoto Y, Mizushima-Sugano J, et al. Evaluation and application of RNA-Seq by MinION. DNA Research. 2019 Feb 1;26(1):55–65. 11. Garalde DR, Snell EA, Jachimowicz D, Sipos B, Lloyd JH, Bruce M, et al. Highly parallel direct RNA sequencing on an array of nanopores. Nature Methods 2018 15:3. 2018 Jan 15;15(3):201–6. 12. Amarasinghe SL, Su S, Dong X, Zappia L, Ritchie ME, Gouil Q. Opportunities and challenges in long-read sequencing data analysis. Genome Biology 2020 21:1. 2020 Feb 7;21(1):1–16. 13. Jain M, Olsen HE, Paten B, Akeson M. The Oxford Nanopore MinION: delivery of nanopore sequencing to the genomics community. Genome Biology 2016 17:1. 2016 Nov 25;17(1):1–11. 14. Yandell M, Ence D. A beginner’s guide to eukaryotic genome annotation. Nature Reviews Genetics 2012 13:5. 2012 Apr 18;13(5):329–42. 15. Mudge JM, Harrow J. The state of play in higher eukaryote gene annotation. Nature Reviews Genetics 2016 17:12. 2016 Oct 24;17(12):758–72. 16. Brent MR. Genome annotation past, present, and future: How to define an ORF at each locus. Genome Res. 2005 Dec 1;15(12):1777–86. 17. Salzberg SL. Next-generation genome annotation: We still struggle to get it right. Genome Biol. 2019 May 16;20(1):1–3. 69 18. Dinger ME, Pang KC, Mercer TR, Mattick JS. Differentiating Protein-Coding and Noncoding RNA: Challenges and Ambiguities. PLoS Comput Biol. 2008;4(11):e1000176. 19. Yin C, Yau SST. Prediction of protein coding regions by the 3-base periodicity analysis of a DNA sequence. J Theor Biol. 2007 Aug 21;247(4):687–94. 20. Li A, Zhang J, Zhou Z. PLEK: A tool for predicting long non-coding RNAs and messenger RNAs based on an improved k-mer scheme. BMC Bioinformatics. 2014 Sep 19;15(1):1–10. 21. Frith MC, Bailey TL, Kasukawa T, Mignone F, Kummerfeld SK, Madera M, et al. Discrimination of Non-Protein-Coding Transcripts from Protein-Coding mRNA. RNA Biol. 2006;3(1):40–8. 22. Haerty W, Ponting CP. Unexpected selection to retain high GC content and splicing enhancers within exons of multiexonic lncRNA loci. RNA. 2015 Mar 1;21(3):320–32. 23. Uszczynska-Ratajczak B, Lagarde J, Frankish A, Guigó R, Johnson R. Towards a complete map of the human long non-coding RNA transcriptome. Nature Reviews Genetics 2018 19:9. 2018 May 23;19(9):535–48. 24. Yang C, Yang L, Zhou M, Xie H, Zhang C, Wang MD, et al. LncADeep: an ab initio lncRNA identification and functional annotation tool based on deep learning. Bioinformatics. 2018 Nov 15;34(22):3825–34. 25. Amin N, McGrath A, Chen YPP. Evaluation of deep learning in non-coding RNA classification. Nature Machine Intelligence 2019 1:5. 2019 May 13;1(5):246–56. 70 26. Pian C, Zhang G, Chen Z, Chen Y, Zhang J, Yang T, et al. LncRNApred: Classification of Long Non-Coding RNAs and Protein-Coding Transcripts by the Ensemble Algorithm with a New Hybrid Feature. PLoS One. 2016 May 1;11(5):e0154567. 27. Libbrecht MW, Noble WS. Machine learning applications in genetics and genomics. Nature Reviews Genetics 2015 16:6. 2015 May 7;16(6):321–32. 28. Larrañaga P, Calvo B, Santana R, Bielza C, Galdiano J, Inza I, et al. Machine learning in bioinformatics. Brief Bioinform. 2006 Mar 1;7(1):86–112. 29. AlQuraishi M. End-to-End Differentiable Learning of Protein Structure. Cell Syst. 2019 Apr 24;8(4):292-301.e3. 30. Alipanahi B, Delong A, Weirauch MT, Frey BJ. Predicting the sequence specificities of DNA- and RNA-binding proteins by deep learning. Nature Biotechnology 2015 33:8. 2015 Jul 27;33(8):831–8. 31. Zhou J, Troyanskaya OG. Predicting effects of noncoding variants with deep learning–based sequence model. Nature Methods 2015 12:10. 2015 Aug 24;12(10):931–4. 32. Eraslan G, Avsec Ž, Gagneur J, Theis FJ. Deep learning: new computational modelling techniques for genomics. Nature Reviews Genetics 2019 20:7. 2019 Apr 10;20(7):389–403. 33. Lecun Y, Bengio Y, Hinton G. Deep learning. Nature 2015 521:7553. 2015 May 27;521(7553):436–44. 71 34. Zhou J, Troyanskaya OG. Predicting effects of noncoding variants with deep learning–based sequence model. Nature Methods 2015 12:10. 2015 Aug 24;12(10):931–4. 35. Alipanahi B, Delong A, Weirauch MT, Frey BJ. Predicting the sequence specificities of DNA- and RNA-binding proteins by deep learning. Nature Biotechnology 2015 33:8. 2015 Jul 27;33(8):831–8. 36. Kelley DR, Snoek J, Rinn JL. Basset: learning the regulatory code of the accessible genome with deep convolutional neural networks. Genome Res. 2016 Jul 1;26(7):990–9. 37. Lee B, Lee T, Na B, Yoon S. DNA-Level Splice Junction Prediction using Deep Recurrent Neural Networks. 2015 Dec 16; 38. Lee B, Park S, Baek J, Yoon S. DeepTarget: End-to-end learning framework for MicroRNA target prediction using deep recurrent neural networks. ACM-BCB 2016 - 7th ACM Conference on Bioinformatics, Computational Biology, and Health Informatics. 2016 Oct 2;434–42. 39. Hassanzadeh HR, Wang MD. DeeperBind: Enhancing prediction of sequence specificities of DNA binding proteins. Proceedings - 2016 IEEE International Conference on Bioinformatics and Biomedicine, BIBM 2016. 2017 Jan 17;178–83. 40. Angermueller C, Lee HJ, Reik W, Stegle O. DeepCpG: Accurate prediction of single-cell DNA methylation states using deep learning. Genome Biol. 2017 Apr 11;18(1):1–13. 41. Park S, Min S, Choi HS, Yoon S. Deep Recurrent Neural Network-Based Identification of Precursor microRNAs. Adv Neural Inf Process Syst. 2017;30. 72 42. Menegaux R, Vert JP. Continuous Embeddings of DNA Sequencing Reads and Application to Metagenomics. https://home.liebertpub.com/cmb. 2019 Jun 6;26(6):509–18. 43. Ng P. dna2vec: Consistent vector representations of variable-length k-mers. 2017 Jan 23; 44. Shi L, Chen B. A Vector Representation of DNA Sequences Using Locality Sensitive Hashing. bioRxiv. 2019 Aug 6;726729. 45. Heinzinger M, Elnaggar A, Wang Y, Dallago C, Nechaev D, Matthes F, et al. Modeling aspects of the language of life through transfer-learning protein sequences. BMC Bioinformatics. 2019 Dec 17;20(1):1–17. 46. Elnaggar A, Heinzinger M, Dallago C, Rehawi G, Wang Y, Jones L, et al. ProtTrans: Toward Understanding the Language of Life Through Self-Supervised Learning. IEEE Trans Pattern Anal Mach Intell. 2022 Oct 1;44(10):7112–27. 47. Baker EAG, Goodwin S, McCombie WR, Ramos OM. SiLiCO: A Simulator of Long Read Sequencing in PacBio and Oxford Nanopore. bioRxiv. 2016 Sep 22;076901. 48. Lee H, Gurtowski J, Yoo S, Marcus S, McCombie WR, Schatz M. Error correction and assembly complexity of single molecule sequencing reads. bioRxiv. 2014 Jun 18;006395. 49. Yang C, Chu J, Warren RL, Birol I. NanoSim: nanopore sequence read simulator based on statistical characterization. Gigascience. 2017 Apr 1;6(4):1–6. 50. Li Y, Han R, Bi C, Li M, Wang S, Gao X. DeepSimulator: a deep simulator for Nanopore sequencing. Bioinformatics. 2018 Sep 1;34(17):2899–908. 73 51. Middleton R, Gao D, Thomas A, Singh B, Au A, Wong JJL, et al. IRFinder: Assessing the impact of intron retention on mammalian gene expression. Genome Biol. 2017 Mar 15;18(1):1–11. 52. Hafezqorani S, Yang C, Lo T, Nip KM, Warren RL, Birol I. Trans-NanoSim characterizes and simulates nanopore RNA-sequencing data. Gigascience. 2020 Jun 1;9(6):giaa061. 53. Hafezqorani S, Yang C, Nip KM, Warren RL, Birol I, Canada’ ], et al. Trans-NanoSim characterizes and simulates nanopore RNA-seq data. bioRxiv. 2019 Oct 10;800110. 54. Payne A, Holmes N, Rakyan V, Loose M. BulkVis: a graphical viewer for Oxford nanopore bulk FAST5 files. Bioinformatics. 2019 Jul 1;35(13):2193–8. 55. Oikonomopoulos S, Wang YC, Djambazian H, Badescu D, Ragoussis J. Benchmarking of the Oxford Nanopore MinION sequencing for quantitative and qualitative assessment of cDNA populations. Scientific Reports 2016 6:1. 2016 Aug 24;6(1):1–13. 56. Garalde DR, Snell EA, Jachimowicz D, Sipos B, Lloyd JH, Bruce M, et al. Highly parallel direct RNA sequencing on an array of nanopores. Nature Methods 2018 15:3. 2018 Jan 15;15(3):201–6. 57. Byrne A, Beaudin AE, Olsen HE, Jain M, Cole C, Palmer T, et al. Nanopore long-read RNAseq reveals widespread transcriptional variation among the surface receptors of individual B cells. Nature Communications 2017 8:1. 2017 Jul 19;8(1):1–11. 74 58. Simpson JT, Workman RE, Zuzarte PC, David M, Dursi LJ, Timp W. Detecting DNA cytosine methylation using nanopore sequencing. Nature Methods 2017 14:4. 2017 Feb 20;14(4):407–10. 59. Cretu Stancu M, Van Roosmalen MJ, Renkens I, Nieboer MM, Middelkamp S, De Ligt J, et al. Mapping and phasing of structural variation in patient genomes using nanopore sequencing. Nature Communications 2017 8:1. 2017 Nov 6;8(1):1–13. 60. Loman NJ, Quick J, Simpson JT. A complete bacterial genome assembled de novo using only nanopore sequencing data. Nature Methods 2015 12:8. 2015 Jun 15;12(8):733–5. 61. Li H. Minimap2: pairwise alignment for nucleotide sequences. Bioinformatics. 2018 Sep 15;34(18):3094–100. 62. Sović I, Šikić M, Wilm A, Fenlon SN, Chen S, Nagarajan N. Fast and sensitive mapping of nanopore sequencing reads with GraphMap. Nature Communications 2016 7:1. 2016 Apr 15;7(1):1–11. 63. Jain C, Dilthey A, Koren S, Aluru S, Phillippy AM. A fast approximate algorithm for mapping long reads to large reference databases. Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics). 2017;10229 LNCS:66–81. 64. Koren S, Walenz BP, Berlin K, Miller JR, Bergman NH, Phillippy AM. Canu: scalable and accurate long-read assembly via adaptive k-mer weighting and repeat separation. Genome Res. 2017 May 1;27(5):722–36. 65. Vaser R, Sović I, Nagarajan N, Šikić M. Fast and accurate de novo genome assembly from long uncorrected reads. Genome Res. 2017 May 1;27(5):737–46. 75 66. Cretu Stancu M, Van Roosmalen MJ, Renkens I, Nieboer MM, Middelkamp S, De Ligt J, et al. Mapping and phasing of structural variation in patient genomes using nanopore sequencing. Nature Communications 2017 8:1. 2017 Nov 6;8(1):1–13. 67. Marchet C, Morisse P, Lecompte L, Lefebvre A, Lecroq T, Peterlongo P, et al. ELECTOR: evaluator for long reads correction methods. NAR Genom Bioinform. 2020 Mar 1;2(1). 68. Middleton R, Gao D, Thomas A, Singh B, Au A, Wong JJL, et al. IRFinder: Assessing the impact of intron retention on mammalian gene expression. Genome Biol. 2017 Mar 15;18(1):1–11. 69. Supporting data for “Trans-NanoSim characterizes and simulates nanopore RNA-seq data” - GigaDB Dataset http://gigadb.org/dataset/100750. 70. Buck D, Weirather JL, de Cesare M, Wang Y, Piazza P, Sebastiano V, et al. Comprehensive comparison of Pacific Biosciences and Oxford Nanopore Technologies and their applications to transcriptome analysis. F1000Res. 2017;6. 71. bcgsc/NanoSim: Nanopore sequence read simulator - https://github.com/bcgsc/NanoSim?tab=readme-ov-file#downloads. 72. Warren RL, Yang C, Vandervalk BP, Behsaz B, Lagman A, Jones SJM, et al. LINKS: Scalable, alignment-free scaffolding of draft genomes with long reads. Gigascience. 2015 Dec 1;4(1). 73. jts/nanopore-rna-analysis - https://github.com/jts/nanopore-rna-analysis. 74. Li B, Dewey CN. RSEM: Accurate transcript quantification from RNA-Seq data with or without a reference genome. BMC Bioinformatics. 2011 Aug 4;12(1):1–16. 76 75. Yang C, Lo T, Nip KM, Hafezqorani S, Warren RL, Birol I. Characterization and simulation of metagenomic nanopore sequencing data with Meta-NanoSim. Gigascience. 2022 Dec 28;12. 76. Nip KM, Hafezqorani S, Gagalova KK, Chiu R, Yang C, Warren RL, et al. Reference-free assembly of long-read transcriptome sequencing data with RNA-Bloom2. Nature Communications 2023 14:1. 2023 May 22;14(1):1–14. 77. Pardo-Palacios FJ, Wang D, Reese F, Diekhans M, Carbonell-Sala S, Williams B, et al. Systematic assessment of long-read RNA-seq methods for transcript identification and quantification. Nature Methods 2024 21:7. 2024 Jun 7;21(7):1349–63. 78. Handelsman J. Metagenomics: Application of Genomics to Uncultured Microorganisms. Microbiology and Molecular Biology Reviews. 2004 Dec;68(4):669–85. 79. Chen K, Pachter L. Bioinformatics for Whole-Genome Shotgun Sequencing of Microbial Communities. PLoS Comput Biol. 2005;1(2):e24. 80. Nicholls SM, Quick JC, Tang S, Loman NJ. Ultra-deep, long-read nanopore sequencing of mock microbial community standards. Gigascience. 2019 May 1;8(5):1–9. 81. Eccles D, White R, Pellefigues C, Ronchese F, Lamiable O. Investigation of chimeric reads using the MinION. F1000Res. 2017;6. 82. Marijon P, Chikhi R, Varré JS. yacrd and fpa: upstream tools for long-read genome assembly. Bioinformatics. 2020 Jun 15;36(12):3894–6. 77 83. Xu Y, Lewandowski K, Lumley S, Pullan S, Vipond R, Carroll M, et al. Detection of viral pathogens with multiplex nanopore MinION sequencing: Be careful with cross-Talk. Front Microbiol. 2018 Sep 19;9(SEP):390055. 84. Patro R, Duggal G, Love MI, Irizarry RA, Kingsford C. Salmon provides fast and bias-aware quantification of transcript expression. Nature Methods 2017 14:4. 2017 Mar 6;14(4):417–9. 85. Dilthey AT, Jain C, Koren S, Phillippy AM. Strain-level metagenomic assignment and compositional estimation for long reads with MetaMaps. Nature Communications 2019 10:1. 2019 Jul 11;10(1):1–12. 86. Fritz A, Hofmann P, Majda S, Dahms E, Dröge J, Fiedler J, et al. CAMISIM: Simulating metagenomes and microbial communities. Microbiome. 2019 Feb 8;7(1):1–12. 87. Kolmogorov M, Bickhart DM, Behsaz B, Gurevich A, Rayko M, Shin SB, et al. metaFlye: scalable long-read metagenome assembly using repeat graphs. Nature Methods 2020 17:11. 2020 Oct 5;17(11):1103–10. 88. Mande SS, Mohammed MH, Ghosh TS. Classification of metagenomic sequences: methods and challenges. Brief Bioinform. 2012 Nov 1;13(6):669–81. 89. bcgsc/NanoSim: Nanopore sequence read simulator - https://github.com/bcgsc/NanoSim. 90. Nanosim :: Anaconda.org - https://anaconda.org/bioconda/nanosim. 91. Kovaka S, Zimin A V., Pertea GM, Razaghi R, Salzberg SL, Pertea M. Transcriptome assembly from long-read RNA-seq alignments with StringTie2. Genome Biol. 2019 Dec 16;20(1):1–13. 78 92. Tang AD, Soulette CM, van Baren MJ, Hart K, Hrabeta-Robinson E, Wu CJ, et al. Full-length transcript characterization of SF3B1 mutation in chronic lymphocytic leukemia reveals downregulation of retained introns. Nature Communications 2020 11:1. 2020 Mar 18;11(1):1–12. 93. de la Rubia I, Srivastava A, Xue W, Indi JA, Carbonell-Sala S, Lagarde J, et al. RATTLE: reference-free reconstruction and quantification of transcriptomes from Nanopore sequencing. Genome Biol. 2022 Dec 1;23(1):1–21. 94. Prjibelski AD, Mikheenko A, Joglekar A, Smetanin A, Jarroux J, Lapidus AL, et al. Accurate isoform discovery with IsoQuant using long reads. Nature Biotechnology 2023 41:7. 2023 Jan 2;41(7):915–8. 95. Chen Y, Sim A, Wan YK, Yeo K, Lee JJX, Ling MH, et al. Context-aware transcript quantification from long-read RNA-seq data with Bambu. Nature Methods 2023 20:8. 2023 Jun 12;20(8):1187–95. 96. Wyman D, Balderrama-Gutierrez G, Reese F, Jiang S, Rahmanian S, Forner S, et al. A technology-agnostic long-read analysis pipeline for transcriptome discovery and quantification. bioRxiv. 2020 Mar 24;672931. 97. Çelik MH, Mortazavi A. Analysis of alternative polyadenylation from long-read or short-read RNA-seq with LAPA. bioRxiv. 2022 Nov 8;2022.11.08.515683. 98. Tang AD, Hrabeta-Robinson E, Volden R, Vollmers C, Brooks AN. Detecting haplotype-specific transcript variation in long reads with FLAIR2. bioRxiv. 2023 Jun 12; 79 99. Tian L, Jabbari JS, Thijssen R, Gouil Q, Amarasinghe SL, Voogd O, et al. Comprehensive characterization of single-cell full-length isoforms in human and mouse with long-read sequencing. Genome Biol. 2021 Dec 1;22(1):1–24. 100. Lienhard M, Van Den Beucken T, Timmermann B, Hochradel M, Börno S, Caiment F, et al. IsoTools: a flexible workflow for long-read transcriptome sequencing analysis. Bioinformatics. 2023 Jun 1;39(6). 101. Hafezqorani S, Nip KM, Birol I. ntEmbd: Deep learning embedding for nucleotide sequences. bioRxiv. 2024 May 2; 102. Mikolov T, Chen K, Corrado G, Dean J. Efficient Estimation of Word Representations in Vector Space. 1st International Conference on Learning Representations, ICLR 2013 - Workshop Track Proceedings. 2013 Jan 16; 103. Bojanowski P, Grave E, Joulin A, Mikolov T. Enriching Word Vectors with Subword Information. Trans Assoc Comput Linguist. 2017 Dec 1;5:135–46. 104. Joulin A, Grave E, Bojanowski P, Douze M, Jégou H, Mikolov T. FastText.zip: Compressing text classification models. 2016 Dec 12; 105. Joulin A, Grave E, Bojanowski P, Mikolov T. Bag of Tricks for Efficient Text Classification. 15th Conference of the European Chapter of the Association for Computational Linguistics, EACL 2017 - Proceedings of Conference. 2016 Jul 6;2:427–31. 106. Ng P. dna2vec: Consistent vector representations of variable-length k-mers. 2017 Jan 23; 80 107. Dai H, Umarov R, Kuwahara H, Li Y, Song L, Gao X. Sequence2Vec: a novel embedding approach for modeling transcription factor binding affinity landscape. Bioinformatics. 2017 Nov 15;33(22):3575–83. 108. Asgari E, Mofrad MRK. Continuous Distributed Representation of Biological Sequences for Deep Proteomics and Genomics. PLoS One. 2015 Nov 10;10(11):e0141287. 109. Zou Q, Xing P, Wei L, Liu B. Gene2vec: gene subsequence embedding for prediction of mammalian N6-methyladenosine sites from mRNA. RNA. 2019 Feb 1;25(2):205–18. 110. Menegaux R, Vert JP. Continuous Embeddings of DNA Sequencing Reads and Application to Metagenomics. https://home.liebertpub.com/cmb. 2019 Jun 6;26(6):509–18. 111. Tong X, Liu S. CPPred: coding potential prediction based on the global description of RNA sequence. Nucleic Acids Res. 2019 May 7;47(8):e43–e43. 112. Hu L, Xu Z, Hu B, Lu ZJ. COME: a robust coding potential calculation tool for lncRNA identification and characterization based on multiple features. Nucleic Acids Res. 2017 Jan 9;45(1):e2–e2. 113. Kang YJ, Yang DC, Kong L, Hou M, Meng YQ, Wei L, et al. CPC2: a fast and accurate coding potential calculator based on sequence intrinsic features. Nucleic Acids Res. 2017 Jul 3;45(W1):W12–6. 114. Kong L, Zhang Y, Ye ZQ, Liu XQ, Zhao SQ, Wei L, et al. CPC: assess the protein-coding potential of transcripts using sequence features and support vector machine. Nucleic Acids Res. 2007 Jul 1;35(suppl_2):W345–9. 81 115. Hochreiter S, Schmidhuber J. Long Short-Term Memory. Neural Comput. 1997 Nov 15;9(8):1735–80. 116. Schuster M, Paliwal KK. Bidirectional recurrent neural networks. IEEE Transactions on Signal Processing. 1997;45(11):2673–81. 117. Cornish-Bowden A. Nomenclature for incompletely specified bases in nucleic acid sequences: recommendations 1984. Nucleic Acids Res. 1985 May 5;13(9):3021. 118. Nucleic acid notation - Wikipedia - https://en.wikipedia.org/wiki/Nucleic_acid_notation. 119. Abadi M, Agarwal A, Barham P, Brevdo E, Chen Z, Citro C, et al. TensorFlow: Large-Scale Machine Learning on Heterogeneous Distributed Systems. 2016 Mar 14; 120. Paszke A, Gross S, Massa F, Lerer A, Bradbury J, Chanan G, et al. PyTorch: An Imperative Style, High-Performance Deep Learning Library. Adv Neural Inf Process Syst. 2019 Dec 3;32. 121. Akiba T, Sano S, Yanase T, Ohta T, Koyama M. Optuna: A Next-generation Hyperparameter Optimization Framework. Proceedings of the ACM SIGKDD International Conference on Knowledge Discovery and Data Mining. 2019 Jul 25;2623–31. 122. Wucher V, Legeai F, Hédan B, Rizk G, Lagoutte L, Leeb T, et al. FEELnc: a tool for long non-coding RNA annotation and its application to the dog transcriptome. Nucleic Acids Res. 2017 May 5;45(8):e57–e57. 82 123. Wang L, Park HJ, Dasari S, Wang S, Kocher JP, Li W. CPAT: Coding-Potential Assessment Tool using an alignment-free logistic regression model. Nucleic Acids Res. 2013 Apr 1;41(6):e74–e74. 124. Camargo AP, Sourkov V, Pereira GAG, Carazzolle MF. RNAsamba: neural network-based assessment of the protein-coding potential of RNA sequences. NAR Genom Bioinform. 2020 Mar 1;2(1). 125. Hill ST, Kuintzle R, Teegarden A, Merrill E, Danaee P, Hendrix DA. A deep recurrent neural network discovers complex biological rules to decipher RNA protein-coding potential. Nucleic Acids Res. 2018 Sep 19;46(16):8105–13. 126. Smilkov D, Brain G, Thorat N, Nicholson C, Reif E, Viégas FB, et al. Embedding Projector: Interactive Visualization and Interpretation of Embeddings. 2016 Nov 16; 127. epi2me-labs/pychopper: cDNA read preprocessing - https://github.com/epi2me-labs/pychopper. 128. Poli M, Massaroli S, Nguyen E, Fu DY, Dao T, Baccus S, et al. Hyena Hierarchy: Towards Larger Convolutional Language Models. Proc Mach Learn Res. 2023 Feb 21;202:28043–78. 129. Brown TB, Mann B, Ryder N, Subbiah M, Kaplan J, Dhariwal P, et al. Language Models are Few-Shot Learners. Adv Neural Inf Process Syst. 2020;33:1877–901. 130. Vaswani A, Brain G, Shazeer N, Parmar N, Uszkoreit J, Jones L, et al. Attention is All you Need. Adv Neural Inf Process Syst. 2017;30. 83 131. Workman RE, Tang AD, Tang PS, Jain M, Tyson JR, Razaghi R, et al. Nanopore native RNA sequencing of a human poly(A) transcriptome. Nature Methods 2019 16:12. 2019 Nov 18;16(12):1297–305. 132. Byrne A, Beaudin AE, Olsen HE, Jain M, Cole C, Palmer T, et al. Nanopore long-read RNAseq reveals widespread transcriptional variation among the surface receptors of individual B cells. Nature Communications 2017 8:1. 2017 Jul 19;8(1):1–11. 133. De Coster W, D’Hert S, Schultz DT, Cruts M, Van Broeckhoven C. NanoPack: visualizing and processing long-read sequencing data. Bioinformatics. 2018 Aug 1;34(15):2666–9. 134. NanoSim pre-trained model: Human giab - AshkenaziTrio - Son - NA24385 - HG002 - Kit V14 - R10 - basecalled by dorado. 135. Li H. Minimap2: pairwise alignment for nucleotide sequences. Bioinformatics. 2018 Sep 15;34(18):3094–100. 84 Appendices Appendix A This appendix contains supplementary information for Chapter 2. A.1 Supplementary method – experimental datasets We used publicly available ONT dRNA and cDNA sequencing reads describing human and mouse transcriptomes provided by the Nanopore WGS Consortium RNA project [131] and Byrne et al. [132], respectively. This project contains 30 dRNA flowcells sequenced on MinION device from six different centres. In addition, there are 12 cDNA read datasets sequenced using 1D ligation kit (SQK-LSK108) as well as 1D2 ligation kit (SQK-LSK308) using the R9.4 chemistry. We also downloaded and used cDNA sequences from mouse transcriptome provided in the Byrne et al manuscript. We trained/benchmarked our tool using the following three read sets. For each dataset, we used high quality reads filtered by NanoFilt [133] for training and simulation. 1. Human direct RNA dataset • Centre: Birmingham (Bham) – Run 1 • Sample Type: RNA • Kit: SQK-RNA001 • Pore Chemistry: R9.4 • Base caller: Guppy CPU (v3.1.5) 85 • Number of reads: 1,076,330 (687,192 after filtering with NanoFilt with minimum quality score of 7 and minimum length of 50 nt) • Reference manuscript: https://www.nature.com/articles/s41592-019-0617-2 • Reference transcriptome (annotation): Homo_sapiens.GRCh38.cdna.all.fa (Ensembl 90) 2. Human cDNA dataset • Centre: Birmingham (Bham) – Run 1 • Sample Type: 1D2 cDNA • Kit: SQK-LSK308 • Pore Chemistry: R9.4 • Base caller: Albacore (v2.1) • Number of reads: 2,530,461 (728,689 after filtering with NanoFilt with minimum quality score of 7 and minimum length of 50 nt) • Reference manuscript: https://www.nature.com/articles/s41592-019-0617-2 • Reference transcriptome (annotation): Homo_sapiens.GRCh38.cdna.all.fa (Ensembl 90) 3. Mouse cDNA dataset • Experiment: SRR5286960 • Sample Type: 1D cDNA • Pore Chemistry: R9.4 • Base caller: Cloud-based Metrichor 86 • Number of reads: 104,990 (104,979 after filtering with NanoFilt with minimum quality score of 7 and minimum length of 50 nt) • Reference manuscript: https://www.nature.com/articles/ncomms16027 • Reference transcriptome (annotation): Mus_musculus.GRCm38.cdna.all.fa (Ensembl 91) A.2 Supplementary method – Pre-trained NanoSim models For the benefit of the community and the sake of reproducibility of our results, we provide the pre-trained models on the NanoSim Github repository (https://github.com/bcgsc/NanoSim). For releases before v2.2.0, we provide profiles trained for E. coli or S. cerevisiae datasets. Flowcell chemistry is R7.3 and R9, and they were base called by Metrichor. They can be downloaded from the ftp site: http://www.bcgsc.ca/downloads/supplementary/NanoSim/ For release v2.5.0 and onwards, we provide profiles trained for H. sapiens NA12878 gDNA, cDNA 1D2, and dRNA datasets, Mus. musculus cDNA dataset, and the ZymoBIOMICS mock community datasets with 10 species and two abundance levels. Flowcell chemistry is R9.4 for all datasets. NA12878 gDNA and dRNA were base called by Guppy 3.1.5; NA12878 cDNA 1D2 was base called by Albacore 2.3.1; Mouse cDNA was base called by Metrichor. These models are available within pre-trained models directory on NanoSim GitHub. For release v3.1.1, we provide a trained model for H. sapiens NA24385 - AshkenazimTrio - Son (hg002) which is sequenced using Kit v14 (R10 chemistry) and base called by dorado. You may 87 find the trained model on 1 million subsampled reads on the GitHub page (available along with the other models). If you are interested in the trained model based on the whole dataset, you can get it through Zenodo - DOI: 10.5281/zenodo.10064740 [134]. A.3 Supplementary method - Simulating reads from human and mouse reference transcriptome and analysis Benchmark analyses of Trans-NanoSim and DeepSimulator were performed on machines running on CentOS 6.7 with 48 Intel Xeon E5-2650 CPUs and 380 GB of memory. Trans-NanoSim: For each experiment, we used the empirical reads mentioned in Appendix B.1 to train Trans-NanoSim. In addition, we used the mouse and human reference transcriptomes and genomes in the characterization phase. By default, Trans-NanoSim uses minimap2 [135] (v2.17-r941) to align reads to both reference transcriptome and genome for each species. Later, based on these alignments, Trans-NanoSim calculates the length distribution of reads as well as their error profiles. We used the quantify module of the pipeline to quantify expression levels of the Ensembl annotated transcripts. Next, in the simulation phase, these profiles are used to generate the same number of simulated reads as the number of raw reads. All the benchmark results presented in this chapter are done using Trans-NanoSim v2.5.1. Detailed information about parameter settings and input files used in each step is as follows: 1. Characterization (read_analysis.py transcriptome): • –i: Input ONT reads in FASTQ/FASTA • –rg: Reference genome in FASTA • –rt: Reference transcriptome in FASTA 88 • –annot: Annotation file in Ensembl GTF/GFF 2. Quantification (read_analysis.py quantify): • –i: Input ONT reads in FASTQ/FASTA • -rt: Reference transcriptome in FASTA 3. Simulation (simulator.py transcriptome): • –rt: Reference transcriptome in FASTA • –rg: Reference genome in FASTA • –e: Expression profiles in TSV format (from quantification) • –c: Location and prefix of read profiles (from characterization) • –n: Number of reads to simulate Additionally, we used parameters (`-k 6 -b guppy -r dRNA`) for homopolymer simulation (Figure 2.2). We used --no_model_ir to skip the optional intron retention simulation in experiments where this functionality was not required. We included this option in runtime/memory comparison as well as IR modeling analysis (Tables 2.3 and 2.4). Parameter settings for minimap2 within Trans-NanoSim: Alignment to reference transcriptome: minimap2 --cs -ax map-ont Alignment to reference genome: minimap2 --cs -ax splice DeepSimulator: We downloaded and used the version 1.5 of DeepSimulator from the GitHub repository (https://github.com/lykaust15/DeepSimulator). The reference transcriptome was used as input. DeepSimulator allows users to specify the average length of the reads to be simulated. 89 For a fair comparison, the average length of empirical ONT transcriptome reads (Appendix A.1) was provided through the -l option to preserve the mean length in the simulated reads. We used Guppy CPU (v3.1.5) to base call signals for the human direct RNA simulated reads and Albacore (v2.3.1) for the human cDNA simulated reads because the empirical reads were base called by the respective base callers. The mouse cDNA empirical reads were base called by Metrichor. Since Metrichor is not publicly available anymore, we had to use DeepSimulator’s default choice, Guppy (v3.1.5) for this analysis. Other parameters, such as the length distribution pattern, were kept as default. We simulated the same number of simulated reads as the number of raw reads. Detailed information about parameter settings and input files is as follows: • –i: Reference transcriptome in FASTA • –o: Output directory • –B: Base caller to be used • –l: Mean length of reads to be simulated • –n: Number of simulated reads Base call analyses for simulated and raw reads: Parameter settings for aligning raw and simulated reads to reference genome: minimap2 --cs -ax splice 150 For each read, the cs tag from the primary alignment was parsed to record the stretches of correct bases and the mismatch, insertion and deletion errors. The values from all reads are then used to calculate the overall matching rate and error rates for each dataset. 90 A.4 Supplementary figures Figure A.1 Bootstrapping results for length distribution analyses The x-axis in the left plots (t*) is the average length of reads in each bootstrapping sample set. A. Human direct RNA dataset. The average length of the original read set is 807 nt (Standard deviation = 0.76). The 95% confidence interval is between 806 and 809 nt. B. Human cDNA dataset. The average length of the original read set is 1,382 nt 91 (Std = 1.22). The 95% confidence interval is between 1,380 and 1,385. C. Mouse cDNA dataset. The average length of the original read set is 1,871 nt (Std = 2.83). The 95% confidence interval is between 1,865 and 1,876. This figure is adopted from the Trans-NanoSim manuscript. Figure A.2 Benchmarking Trans-NanoSim and DeepSimulator on the human cDNA 1D2 dataset A. Comparison of length distributions of experimental reads and simulated reads generated by Trans-NanoSim and DeepSimulator. B. The length of consecutive match/error bases of empirical and simulated reads, as indicated. C. 92 Transcript expression levels measured from simulated reads versus the same measured from experimental reads. This figure is adopted from the Trans-NanoSim manuscript. Figure A.3 Benchmarking Trans-NanoSim and DeepSimulator on the mouse cDNA dataset A. Comparison of length distributions of experimental reads and simulated reads generated by Trans-NanoSim and DeepSimulator. B. The length of consecutive match/error bases of empirical and simulated reads, as indicated. C. 93 Transcript expression levels measured from simulated reads versus the same measured from experimental reads. This figure is adopted from the Trans-NanoSim manuscript. 94 Appendix B This appendix contains supplementary information for Chapter 4. B.1 Supplementary tables Max length Latent space size Sensitivity Precision F1 score Accuracy 1500 64 0.849 0.804 0.826 0.794 1500 128 0.847 0.856 0.851 0.830 2000 64 0.902 0.867 0.884 0.841 2000 128 0.911 0.842 0.875 0.825 3000 64 0.958 0.876 0.915 0.865 3000 128 0.957 0.887 0.920 0.874 Table B.1 Coding and noncoding RNA classification metrics with different sequence lengths as input
Thesis/Dissertation
eng
Bioinformatics
Vancouver : University of British Columbia Library
Attribution-NonCommercial-NoDerivatives 4.0 International
Graduate
Birol, Inanc
Machine learning in transcriptome analysis using long RNA sequencing data
Text