Full text
FACULDADE DE ENGENHARIA DA UNIVERSIDADE DO PORTO Assessing the Impact of Alternative Splicing in Thyroid Cancer Luís Filipe Correia Cleto Mestrado Integrado em Engenharia Informática e Computação Supervisor: Rui Camacho (FEUP) Co-supervisor: Valdemar Máximo (I3S/IPATIMUP & FMUP) Co-supervisor: Pedro Ferreira (I3S/IPATIMUP) July 22, 2016
Assessing the Impact of Alternative Splicing in Thyroid Cancer Luís Filipe Correia Cleto Mestrado Integrado em Engenharia Informática e Computação Approved in oral examination by the committee: Chair: Eugénio Oliveira External Examiner: Sérgio Matos Supervisor: Rui Camacho July 22, 2016
Abstract All over the world there are millions of people affected by cancer. There are several possible causes for this disease, one of which is a genomic origin. While there are many alterations in cancer cells that distinguish them from healthy ones, there is also an abundance of aberrant mRNA transcripts in cancerous cells. These aberrant transcripts might lead to changes in the synthesized proteins which, in turn, will confer new, and possibly devastating, properties to the affected cell. One possible source of this defective mRNA is an abnormal gene splicing. The advent of Next-Generation Sequencing (NGS) techniques has revolutionized the field of molecular biology in the past few years and brought many new approaches for cancer research. The goal of this thesis is to make use of these novel techniques, namely RNA-seq, in order to create a tool capable of detecting events of aberrant alternative splicing and assessing their impact on a cell or an organism’s transcriptome. We have extended our initial goal and expanded our analysis with extra studies that are considered valuable by expert biologists in the study of cancer. The extra developments include the identification of fusion genes. However, current tools of this type are commonly complex to use, require powerful computational resources and also need the user to be familiar with programming or other concepts from the field of informatics, which is often not the case for geneticists or molecular biologists. As such, this project also focuses on enabling these researchers to use the aforementioned tools through the creation of a distributed system which provides the computational resources necessary for an RNA-seq pipeline as well as a web interface to facilitate configuring and running experiments on this pipeline. Lastly, the thesis proposal is evaluated on real data provided by IPATIMUP and also on data obtained from the ENCODE project. i
ii
Resumo Por todo o mundo há milhões de pessoas afetadas pelo cancro. Existem múltiplas causas possíveis para esta doença, algumas das quais são uma origem génica. Enquanto que há muitas alterações em células cancerígenas que as distinguem das saudáveis, existe também uma abundância de registos de mARN aberrantes em células cancerígenas. Estes registos aberrantes irão levar a alterações nas proteínas sintetizadas que, por sua vez, poderão conferir às células propriedades novas, e potencialmente devastadoras. Uma possível origem deste mARN defeituoso é o splicing anormal de genes. O advento das técnicas de sequenciação de nova geração tem revolucionado o campo da biologia molecular nos últimos anos e trouxe inúmeras novas abordagens para investigação do cancro. O objetivo desta tese é recorrer a estas novas técnicas, nomeadamente à técnica RNA-seq, de modo a criar uma ferramenta capaz de detetar eventos de splicing alternativo aberrante e avaliar o seu impacto no transcriptoma da célula ou do organismo. Conseguimos ainda ultrapassar os objetivos iniciais e incluir no estudo a deteção de genes de fusão, considerados muito relevantes para o aparecimento do cancro. No entanto, ferramentas modernas deste tipo são frequentemente complexas de utilizar, necessitam de recursos computacionais poderosos e também exigem conhecimentos de programação e outros conceitos da área da informática por parte do utilizador, o que frequentemente não se verifica para geneticistas ou especialistas de biologia molecular. Como tal, este projeto também se foca em permitir a estes investigadores fazer uso das ferramentas mencionadas através da criação de um sistema distribuído que fornece os recursos computacionais necessários para uma pipeline de RNA-seq e também uma interface web para facilitar a configuração e execução de experiências nesta pipeline. Finalmente, a proposta de tese é avaliada em dados reais fornecidos pelo IPATIMUP e também em dados obtidos do projeto ENCODE. iii
iv
Contents 1 Introduction 1 1.1 ProblemDomain .................................. 1 1.2 MotivationandObjectives ............................. 2 1.3 Project........................................ 3 1.4 DissertationStructure................................ 3 2 Biological Key Concepts and Technology Survey 5 2.1 BasicBiologicalConcepts ............................. 5 2.1.1 Glossary .................................. 5 2.1.2 GeneticProcesses.............................. 6 2.1.3 AlternativeSplicing ............................ 7 2.2 RNA Sequencing and Transcriptome Assembly . . . . . . . . . . . . . . . . . . 9 2.3 Relevant Standard File Formats . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 2.4 ToolsforRNA-seq ................................. 15 2.4.1 RNA-SeqPipelines............................. 17 2.5 DataRepositories.................................. 19 2.6 AdditionalTechnologies .............................. 19 2.7 ChapterConclusions ................................ 21 3 The eRAP Framework 23 3.1 eRAP ........................................ 23 3.2 SystemArchitecture................................. 24 3.2.1 DataScheme ................................ 25 3.3 UseCases...................................... 27 3.4 WebInterface.................................... 27 3.5 AnalysisServer................................... 30 3.6 CaseStudies..................................... 31 3.6.1 StandardExperiment............................ 31 3.6.2 Experiment With Errors . . . . . . . . . . . . . . . . . . . . . . . . . . 32 3.7 ChapterConclusions ................................ 32 4 RNA-seq Data Analysis 33 4.1 GeneFusionAnalysis................................ 33 4.2 Alternative Splicing Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 4.2.1 JunctionsComparer ............................ 34 4.2.2 Usage.................................... 34 4.2.3 Junction Identification . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 4.2.4 Output ................................... 36 v
Chapter 1 Introduction In this chapter we will provide an overview of the context to which this thesis belongs. We will present our objectives with this work as well as the underlying motivations. A brief analysis of the developed project will be explained as well as the structure of the remainder of this report. 1.1 Problem Domain Molecular biology is a branch of science that studies biological activity at the molecular level. It overlaps with biology and chemistry and in particular, genetics and biochemistry. A key area of this field concerns the understanding of how DNA, RNA and the synthesis of proteins function and how this affects the various cellular systems [Man14]. One of the processes studied by molecular biology is gene expression. During this process (further elaborated in Chapter 2), DNA sequences are translated into RNA that is used to synthesize proteins. Using this process DNA indirectly regulates the chemical activity of cells. Deregulation of gene expression is known to play a pivotal role in the origin of cancer [GYLL13]. One such possible deregulation is the compromise of splicing mechanisms, which allow a single gene to code different proteins. This will cause changes to the proteome (total set of proteins) of cells and possibly confer them new properties. Next-Generation Sequencing (or Massively Parallel Sequencing) methods have been revolutionizing genomics and, in turn, genetics. Thanks to these methods, disciplines such as molecular biology are no longer restricted to small-scale genetic approaches but are able to introduce genome-wide thinking. As such, coupling these tools with the appropriate algorithms has the potential to radically alter our understanding of model organisms and ultimately of ourselves [Mar08]. One possible application of these instruments is in cancer research. While there have been many advances in our knowledge of cancer over the past decades, there is much that remains unknown about the mechanisms involved in its origin(s). The primary objective of this thesis is to resort to RNA-seq [WGS09], an NGS approach for transcriptome profiling, in order to create a tool capable of identifying and assessing the impact of aberrant alternative splicing events as a 1
Introduction possible origin for cancer. Additionally, it is also intended to measure the impact of gene fusion events for a more in-depth analysis of the alterations present in cancer cells. However, current RNA-seq tools are commonly complex to use, require powerful computational resources and also need the user to be familiar with programming or other concepts from the field of informatics, which is often not the case for geneticists or molecular biologists. As it is intended to allow experts in the field (who may not have much programming knowledge) to conduct their own analysis through the use of this, and other tools, the creation of a user-friendly web-based application for interacting with the analysis system emerges as an additional objective. The application consists of a web interface that allows access to a distributed system which provides the computational resources necessary for an RNA-seq pipeline and a database where to archive results. 1.2 Motivation and Objectives All over the world there are millions of people affected by cancer. There are several possible causes for this disease, one of which is a genomic origin. While there is a myriad of alterations in cancer cells that distinguish them from healthy ones, one trait that is common to all cancerous cells is an abundance of aberrant mRNA transcripts. One possible source of this defective mRNA is abnormal gene splicing. Alternative splicing is the regulated process during gene expression that results in a single gene coding for multiple proteins. A deregulation in normal splicing, caused by cancerspecific defects in the splicing mechanisms, can confer new properties of growth, differentiation or other characteristics to the cancer cell [FG08]. With the emergence of high-throughput sequencing there have been substantial advances in cancer genomics research. The goal of this project is the development of a tool, based on RNA-seq, that uses high-throughput information from the transcriptomes of thyroid cancer samples in order to identify events of aberrant splicing and assess their impact in the structure of the transcript. For this purpose, the RNA-seq technology was used for sequencing the genomes. RNA-seq performs the reconstruction of at least part of the genome of an individual through the reading of small fragments, calculates the sets of active and inactive genes and compares it with another reference genome (gene differentiation). Further extensions to this tool have already been proposed such as focusing the analysis on mitochondrial DNA, as this is passed down from generation to generation without any modifications (except for rare mutations), making it more stable over time [ED]. It is also in the researchers’ interests to incorporate information relative to events of gene fusion into the analysis to allow further insight into the modifications present in cancer cells. However, it is common for tools of this type to require powerful resources and be complex to use, especially for molecular biologists or geneticists who might not have a programming background. As such, it is also relevant to create a web application to serve as an interface for a distribute system where an RNA-seq pipeline is deployed. 2
Introduction In a final stage to further assess the developed tool, we have used thyroid cancer data retrieved from I3S/IPATIMUP and also from the ENCODE project [Ins]. 1.3 Project This work focuses on the development of a prototype tool for detecting aberrant alternative splicing events and measure their impact on the organism by assessing the changes to the transcriptome induced by these events. This tool was used on real data provided by I3S/IPATIMUP and the ENCODE project in order to validate it and provide new insights on the origins of cancer. In order to generate more complete results, gene fusion and gene expression analyses were also conducted on the provided samples. As we intend to enable the usage of RNA-seq tools of this type by researchers and experts in genomics without programming knowledge, the development of this project also encompasses the creation of a web interface for user interaction and a back-end that is capable of handling the analysis. Analysing the transcriptome is a computationally intensive task. As such, the analysis module should be implemented in such a way that allows it to be separated from the rest of the system as it, ideally, will be running on a dedicated cluster with powerful machines. Our tool exposes a web API that allows executing and monitoring tasks as well as transferring data and results. In this system a pipeline for analysing data via RNA-seq will be deployed. Another service was created for handling the submission of jobs to the cluster and for receiving and aggregating results, storing them in a persistent database. This service allows the interaction of a user with the system via a web interface so that they can submit jobs and view experiment reports in HTML format. 1.4 Dissertation Structure In addition to this introductory chapter, the remainder of this report contains five additional chapters. In Chapter 2, a brief explanation of some key biological and RNA-seq concepts essential for understanding the subjects approached by this work is provided. Other relevant tools and technologies to be used with this project will also be detailed in this chapter. In Chapter 3, we present the system proposed to enable molecular biologist and geneticists to make use of an RNA-seq pipeline: the eRAP system. We describe its architecture, detail each component/module’s functions and describe the methodological approach for their implementation. The chapter concludes by characterizing the studies used to validate the tool. Chapter 4describes the types of analyses we aimed to perform on the data provided by IPATIMUP: gene fusion, alternative splicing and gene expression. For each analysis, the tools used and the necessary pre-processing steps were described in detail. Additionally, as the Junctions Comparer tool was entirely developed by us to perform the desired alternative splicing analysis, the case study used to validate this tool is also described in Section 4.2.5. 3
Introduction Chapter 5introduces the case study we performed using real world thyroid cancer data provided by IPATIMUP’s researchers. The chapter starts with the description of the samples provided, the researching objectives and the protocol of analysis. The following sections describe the results we obtained with our analysis. Finally, Chapter 6summarizes what has been described in this dissertation and presents the final conclusions. In this last chapter we also point out possibilities for future work and improvements/extensions for each of the developed tools. 4
Chapter 2 Biological Key Concepts and Technology Survey In this chapter we present the basic biological concepts that are necessary to understand the thesis work. We begin by detailing the gene expression process, splicing and alternative splicing. This will be followed by a review of some of the different standard formats, tools and methods available for analysing RNA. We focus on the iRAP pipeline1and also on the state-of-the-art technologies necessary to implement the computational infrastructure and web portal. 2.1 Basic Biological Concepts 2.1.1 Glossary We begin by listing some key terms and definitions that will be commonly used throughout the remainder of this dissertation: •DNA - molecule that carries most of the genetic instructions used in the growth, development, functioning and reproduction of all known living organisms and many viruses. •chromosome - a thread-like structure of nucleic acids and protein found in the nucleus of most living cells, carrying genetic information in the form of genes. •gene - distinct sequence of DNA that forms part of chromosome. •RNA - molecule that acts as a messenger carrying instructions from DNA for controlling the synthesis of proteins, although in some viruses RNA rather than DNA carries the genetic information. 1https://nunofonseca.github.io/irap/ 5
Biological Key Concepts and Technology Survey •exon - a segment of a DNA or RNA molecule containing information coding for a protein or peptide sequence. •intron - a segment of a DNA or RNA molecule which does not code for proteins and interrupts the sequence of genes. •genetic code - the means by which DNA and RNA molecules carry genetic information in living cells. •codons - a sequence of three nucleotides which together form a unit of genetic code in a DNA or RNA molecule. •aminoacids - a simple organic compound which serves as a building block for proteins. •5’/3’ - pronounced 5 prime or 3 prime respectively. They indicate the carbon numbers in the DNA’s sugar backbone. The 5’ carbon has a phosphate group attached to it and the 3’ carbon a hydroxyl group. This asymmetry gives a DNA strand a "direction". For example, DNA polymerase works in a 5’ -> 3’ direction, that is, it adds nucleotides to the 3’ end of the molecule, thus advancing to that direction. •DNA strands - the term template strand (or sense strand) refers to the sequence of DNA that is copied during the synthesis of mRNA. The opposite strand (that is, the strand with a base sequence directly corresponding to the mRNA sequence) is called the coding strand (or the antisense strand) because the sequence corresponds to the codons that are translated into protein. •fusion genes - hybrid gene formed from two previously separate genes. 2.1.2 Genetic Processes As mentioned in Chapter 1, gene expression is the process by which genes are "translated" into functional genetic products, such as RNA or, at a later stage, proteins, which ultimately regulate cellular activity. This process can be divided into two main phases: •Transcription - The production of mRNA from DNA by the RNA polymerase enzyme, and further processing of the resulting mRNA molecule. •Translation - The synthesis of proteins directed by mRNA, and subsequent processing of the resulting protein molecule. It is also worth noting that not all genes are translated into proteins as a final product of gene expression. Some genes code different types of RNA that play a role in the translation phase such as tRNA or rRNA [GENb]. One of the processing phases that mRNA molecules undergo is called splicing. Simplifying the structure of genetic code, it can be divided into exons and introns. These sections of DNA 6
Biological Key Concepts and Technology Survey Figure 2.1: Simplified overview of the gene expression transcription and splicing processes and the structure of the genetic molecules involved are kept in precursor mRNA (pre-mRNA) at first as it is initially transcribed from DNA. During the splicing phase, the introns are removed and the pre-mRNA is converted into mature mRNA containing only coding regions (exons), ready to be used for synthesizing proteins. This process is illustrated in Figure 2.1. During the protein synthesis phase, the RNA codons in the exons are "translated" into amino acids, forming chains that will eventually become proteins. This process, illustrated in Figure 2.2 starts with a special start codon (AUG) and ends when one of three stop codons is found (UAA, UAG or UGA). However, it is also possible that during the splicing phase, some exons are also removed. This leads to a single pre-mRNA strand being capable of generating more than one distinct mature mRNA molecules, depending on which exons are kept in the final product. In turn, this implies that a single gene is able to code more than one protein. This process, shown in Figure 2.3, is known as alternative splicing. It is possible for this mechanism to be compromised, inducing aberrant alternative splicing events [FG08]. This will lead to changes in the proteome: some proteins will no longer be synthesized or new ones will be added to the proteome. As proteins play a key role in regulating cellular activity, these changes may have a significant impact on the characteristics of the cancerous cells and confer them new and devastating properties such as capabilities of growth, differentiation and even hormone resistance [ASK+01]. 2.1.3 Alternative Splicing Pre-mRNA splicing is a natural source of cancer-causing errors in gene expression. Mutations in intronic splice sites of tumor suppressor genes often cause exon-skipping events which will result in the truncation of the synthesized proteins, just like classical nonsense mutations. It is also worth noting that many studies over the last 20 years have reported cancer-specific alternative splicing 7
Biological Key Concepts and Technology Survey Figure 2.2: Overview of the gene expression translation process and the structure of the genetic molecules involved2 in the absence of genomic mutations [Ven04]. Types of Alternative Splicing There are five basic modes of alternative splicing which are generally recognized [HKA]. As depicted in Figure 2.4, these modes can be classified as: •Exon skipping: In this case, an exon may be spliced out of the primary transcript or retained. This is the most common mode in mammalian pre-mRNAs. •Mutually exclusive exons: One of two exons is retained in mRNAs after splicing, but not both. •Alternative donor site: An alternative 5’ splice junction (donor site) is used, changing the 3’ boundary of the upstream exon. •Alternative acceptor site: An alternative 3’ splice junction (acceptor site) is used, changing the 5’ boundary of the downstream exon. •Intron retention: A sequence may be spliced out as an intron or simply retained. This is distinguished from exon skipping because the retained sequence is not flanked by introns. If the retained intron is in the coding region, the intron must encode amino acids in frame with the neighboring exons, or a stop codon or a shift in the reading frame will cause the protein to be non-functional. This is the rarest mode in mammals. 2Image taken from: https://en.wikipedia.org/wiki/Translation_(biology)#/media/File: Ribosome_mRNA_translation_en.svg 8
Biological Key Concepts and Technology Survey Figure 2.3: The alternative splicing process. The colored blocks represent exons in the RNA sequence while the lines between them are introns3 Fusion Genes A fusion gene is a hybrid gene formed from two previously separate genes. As shown in Figure 2.5, it can occur as a result of: translocation, interstitial deletion, or chromosomal inversion. Currently, 358 gene fusions involving 337 different genes have been identified. Additionally, a growing number of gene fusion events are being recognized as important parameters for diagnosing (and prognosing) malignant hematological disorders and childhood sarcomas. The analysis shows that gene fusions occur in all malignancies, and that they account for 20% of human cancer morbidity [MJM07]. 2.2 RNA Sequencing and Transcriptome Assembly Understanding the transcriptome (set of all RNA molecules) is essential for interpreting the functional elements of the genome, revealing the molecular constituents of cells and tissues, and also for understanding development and disease. Obtaining information of a cell or organism’s transcriptome is done experimentally, by employing sequencing techniques. These were initially dominated by Sanger’s method, proposed in 1977, and other similar sequencing techniques [FCK02]. In spite of providing accurate results that came to revolutionize the fields of genetics, such methods were notably slow and costly: applying these techniques on large scale projects, such as the Human Genome Project, required the creation of sequencing centers that housed hundreds of DNA sequencing instruments which, in turn, required large amounts of personnel to operate [Sch07]. Due to the severity of the limitations imposed by these methods, this kind of study was mostly 3Image taken from: https://simple.wikipedia.org/wiki/Alternative_splicing 9
Biological Key Concepts and Technology Survey exons. It can take advantage of multiple processor cores by using parallel processes. These features make it much faster than previous systems, mapping nearly 2.2 million reads per CPU hour, which is enough to process the data from a whole RNA-Seq experiment in under a day on a standard desktop computer. Cufflinks Cufflinks [TRG+12] is commonly used together with TopHat and Bowtie as it is part of the Tuxedo Suite tools. It assembles transcripts, estimates their abundances, and tests for differential expression and regulation in RNA-Seq samples. It receives the already aligned RNA-Seq reads as input and assembles the alignments into a set of transcripts. Cufflinks then uses the supporting reads to estimate the relative abundances of the transcripts, taking into account biases in library10 preparation protocols. HTSeq HTSeq [APH14] is a Python library to facilitate the rapid development of scripts for processing high-throughput sequencing data. It provides parsers for many common data formats in these types of projects, as well as classes to represent data (genomic coordinates, sequences, sequencing reads, alignments, gene model information and variant calls) and provides data structures that allow for querying via genomic coordinates. The HTSeq-count tool was developed with this library for preprocessing RNA-Seq data for differential expression analysis by counting the overlap of reads with genes. FastQC FASTQC [A+10] provides a simple way to do quality control checks on raw sequence data coming from high throughput sequencing pipelines. It accepts data in BAM, SAM or FASTQ format and quickly identify possibly problematic areas. It also allows the summarization of the data with graphs and HTML reports. SAMTools SAMTools [LHW+09] is a library and software package for parsing and manipulating alignments in the SAM or BAM formats. It enables converting from different alignment formats, sorting and merging alignments, removing polymerase chain reaction (PCR) duplicates, generating per-position information in the pileup format, calling single nucleotide polymorphisms (SNPs) 10The sequencing library is prepared by random fragmentation of the DNA or CDNA sample, followed by 5’ and 3’ adapter ligation. Alternatively, "tagmentation" combines the fragmentation and ligation reactions into a single step that greatly increases the efficiency of the library preparation process. Adapter-ligated fragments are then PCR amplified and gel purified. 16
Biological Key Concepts and Technology Survey and short indel11 variants, and showing alignments in a text-based viewer. BEDTools BEDTools [QH10] is a collection of utilities for a wide-range of genomics analysis tasks. The most widely-used tools enable genome arithmetic: intersect, merge, count, complement, and shuffle genomic intervals from multiple files in widely-used genomic file formats such as BAM, BED, GFF/GTF and the Variant Call Format (VCF). While each individual tool is designed to do a relatively simple task (e.g., intersect two interval files), quite sophisticated analyses can be conducted by combining multiple bedtools operations on the UNIX command line. MATS The Multivariate Analysis of Transcript Splicing (MATS) tool is used to detect differential alternative splicing events from RNA-Seq data between two samples [SPL+14]. From the RNA-Seq data, MATS can automatically detect and analyze alternative splicing events corresponding to all major types of alternative splicing patterns. deFuse The deFuse [MHZ+11] software is a computational method for fusion genes discovery in tumor RNA-seq data. It uses a dynamic programming-based split read analysis with discordant paired end alignments and does not discard paired end reads that align ambiguously. Additionally, deFuse is not limited to finding gene fusions with boundaries between known exons: it can identify fusion boundaries in the middle of exons or involving intronic or intergenic sequences. EricScript EricScript [BPM+12] is a computational framework used for the discovery of gene fusion events in RNA-seq data. Using the EricScript simulator, it is able to generate synthetic gene fusions and it can also determine statistical measures for evaluating gene fusion detection methods’ performance by using the EricScript CalcStats tool. Comparatively to other similar tools it is a lightweight framework with high sensitivity [KVQL16], yielding accurate results with minimal memory and time consumption. 2.4.1 RNA-Seq Pipelines While RNA-seq has become the technique of choice for whole-transcriptome profiling, applying these techniques requires considerable programming skills and computational resources. It is 11Molecular biology term for the insertion or the deletion of bases in the DNA of an organism 17
Biological Key Concepts and Technology Survey Figure 2.7: iRAP pipeline architecture [FPMB14] necessary to process millions of sequencing reads and, at each step of the processing pipeline, there are multiple tools available each with their own advantages and disadvantages. This makes it common to require a specific combination of tools for each different experiment. However, integrating the desired tools can also be an arduous and lengthy task as the input/output files of each tool may not be compatible. The iRAP [FPMB14] system (available under the GLPv3 license) is an integrated RNA-seq analysis pipeline that integrates many of the major tools available for each step of the RNA- seq process. It targets a broad audience and allows users with little bioinformatics knowledge to customize the pipeline and apply their tools of choice. However, more advanced users are also able to fully customize the options used by the chosen tools. The iRAP pipeline is depicted in Figure 2.7 as a standard analysis pipeline. Table 2.1 lists the available tools for each of the most common stages of an RNA-seq analysis (iRAP incorporates several other tools for other less common processing steps as well). The iRAP pipeline accepts FASTQ or BAM files as input with raw sequence reads, a reference genome in FASTA format, gene model annotation in GTF format and a configuration file. iRAP then generates web reports that the user can read to explore the results of the analysis. Table 2.1: Tools integrated in the iRAP pipeline for each standard processing stage Stage Tools Supported Quality Control fastqc, fastx, bowtie1 Mapping tophat1, tophat2, smalt, gsnap, soapsplice, bwa1, bwa2, bowtie1, bowtie2, gem, star, osa, mapsplice Quantification basic, htseq1, htseq2, cufflinks1, cufflinks2, cufflinks1_nd, cufflinks2_nd, scripture, flux_cap, nurd, stringtie, stringtie_nd, rsem, kallisto Differential Expression cuffdiff1, cuffdiff2, cuffdiff1_nd, cuffdiff2_nd, deseq, edger, voom, deseq2 Gene Set Enrichment piano Gene Fusion Analysis fusionmap 18
Biological Key Concepts and Technology Survey 2.5 Data Repositories In order to evaluate the system to be developed, it is necessary to have access to real data. Apart from the data that will be provided by IPATIMUP12, there are several online repositories available online that provide such data as well. One such repository that we will resort to for obtaining test data is the ENCODE project13. The goal of ENCODE is to build a comprehensive list of all functional elements in the human genome. This includes elements that act at the protein and RNA levels, and regulatory elements that control cells and circumstances in which a gene is active. Through their platform it is possible to access and download several datasets that can be used to validate our thesis work. Other useful repositories and tools with genomic information also exist such as the ENSEMBL project14 and the UCSC Genome Browser15. Both of these allow downloading data via FTP. Additionally, the Cancer Genome Atlas (CGA) provides data on cancer genome sequences, alignments and mutations for several cancer samples on the Cancer Genomics Hub16. One more interesting repository is that of the Genotype-Tissue Expression project17, which collects and analyzes multiple human tissues from donors and allows downloading samples and other data such as RNA-seq results. 2.6 Additional Technologies While the work to be done in this thesis focuses mainly on extending the RNA-seq analysis to detect and assess aberrant alternative splicing events, it also encompasses the creation of web services and a website to allow users to run the analysis, maintaining a database with the relevant results. To this end several other technologies are necessary. AWK Awk [AKW78] is a unix command encorporating a powerful "programming language" for file analysis and filtering. Its basic operation is to search a set of files for patterns, and to perform specified actions upon lines or fields of lines which contain instances of those patterns. Awk patterns may include arbitrary boolean combinations of regular expressions and of relational operators on strings, numbers, fields, variables, and array elements. Actions may include the same pattern-matching constructions as in patterns, as well as arithmetic and string expressions and assignments, if-else, while, for statements, and multiple output streams. 12https://www.ipatimup.pt/Site/ 13https://www.encodeproject.org/ 14http://www.ensembl.org/index.html 15https://genome.ucsc.edu/ 16https://cghub.ucsc.edu/ 17http://www.gtexportal.org/home/ 19
Biological Key Concepts and Technology Survey Awk makes certain data selection and transformation operations easy to express, making it an ideal utility for quickly filtering and processing text-based files such as the ones commonly used in the bioinformatics field for describing genomes or sequencing reads. Python For the development of the system we decided to use the Python18 language. It is a widely used general-purpose, high-level programming language that emphasizes code readability. Many Python libraries are freely available containing helpful modules for tasks such as web development or even biological computations (such as HTSeq or Biopython19). Django Django20 is a high-level Python Web framework. The framework includes features such as authentication, URL routing, a templating system, an object-relational mapper (ORM), and database schema migrations. It follows the Model-View-Controller architectural pattern and has been used in several popular sites such as Pinterest21 and Instagram22. There are alternatives to Django such as Flask, Pylons, Grok and TurboGears. Django was chosen as it is a very mature framework with sane defaults which allows developers to dive in to web applications quickly without needing to make a lot of decisions about their application’s infrastructure ahead of time [Bro15]. This makes it ideal for mid-size and large projects. It is also the framework with the largest and most active community. Databases For the database it was decided to use a non-relational database as we will be storing massive volumes of data with a possibly different format between experiments. As such, this type of databases provide a flexibility that their relational counterparts do not. It might also become relevant at some point to store the data in a distributed manner across several machines, which is better handled by non-relational databases [LM13]. The non-relational database we opted to use was MongoDB23. It is an open source, documentoriented database designed with both scalability and developer agility in mind. Instead of storing your data in tables and rows as you would with a relational database, in MongoDB you store JSON- like documents with dynamic schemas. Additionally, MongoDB provides the GridFS system24 which is a specification for storing and retrieving files that exceed the BSON-document size limit of 16 MB. Instead of storing a file in a single document, GridFS divides the file into parts, or 18https://www.python.org/ 19http://biopython.org/wiki/Main_Page 20https://www.djangoproject.com/ 21https://pinterest.com 22https://www.instagram.com/ 23https://www.mongodb.org/ 24https://docs.mongodb.com/manual/core/gridfs/ 20
Biological Key Concepts and Technology Survey chunks, and stores each chunk as a separate document. GridFS is useful not only for storing files that exceed 16 MB but also for storing any files for which you want access without having to load the entire file into memory, making it useful for the project as the size of both input and output files for RNA-seq analysis tends to be in the order of a few gigabytes. Web Services A Web service is a service offered by an electronic device to another electronic device where communication takes place over the World Wide Web (WWW)25. Generally, a web service provides an object-oriented web based interface to a database server, which is utilized for example by another web server or mobile application that provide a user interface to the end user. It is also common for web servers to consume several web services at once on different machines in order to compile the content into a single user interface. For implementing the web services we resorted to Python and Django, using the latter’s templating language to build the website. To simplify the development of these modules, the Py- Charm26 integrated development environment was used. 2.7 Chapter Conclusions In this chapter we provided an overview of the key molecular biology concepts that are essential for the understanding of the thesis work. We also detailed the RNA-seq process and presented short analyses of concrete tools and standard file formats that are relevant to the project. Finally, we also gave a brief introduction to the other technologies used for the project. 25https://www.w3.org/TR/2004/NOTE-ws-gloss-20040211/#webservice 26https://www.jetbrains.com/pycharm/ 21
Biological Key Concepts and Technology Survey 22
Chapter 3 The eRAP Framework Let us recall that one of the problems we propose to solve is the development of a tool that helps experts to run RNA-seq analysis without requiring any programming knowledge or familiarity with a command-line interface. This tool is able to use powerful computational resources, it is based on an existing RNA-seq pipeline (iRAP) and has a user-friendly web interface. In this chapter we first introduce the architecture of our framework, the Easy RNA-seq Analysis Pipeline, and then detail each of its components as well as the system’s usage. 3.1 eRAP Due to the complexity of configuring an iRAP experiment, a user friendly web interface was designed to allow the creation of said experiments and the retrieval of results. The experiment creation form requires as input the main settings necessary to create an iRAP experiment such as the experiment’s (unique) name, species name and reads in FASTA or FASTQ formats. It is not limited to any specific species as it allows users to specify any reference files (annotation in GTF format and reference genome in FASTA format) by indicating the URLs where they are available. The reference files are then retrieved from the specified URLs and kept locally to allow re-use across experiments and avoid wasting time and storage. However, as there are dozens of possible tools to use, the configuration options are also very vast and many have not been implemented on the interface at this stage. These additional options should be specified on the configuration file1 which should be submitted when creating an experiment. After creating an experiment, it becomes available on the global experiment list page as well as on the owner’s list of experiments. On these pages the status of the experiments is available and further details can be seen on each experiment’s specific page. There the results, output and error logs will also be available once an experiment finishes running. 1https://github.com/nunofonseca/irap/wiki/8-Configuration-file 23
The eRAP Framework Figure 3.1: System Architecture 3.2 System Architecture The system we implemented to answer the aforementioned problem has its foundation on the iRAP system. As depicted in Figure 3.1, there is an independent module responsible for the RNA- seq analysis, which will be a deployment of iRAP. As this component will be responsible for the computationally intensive operations, it will be deployed in a dedicated cluster with sophisticated machines. In this subsystem is included an additional back-end server to allow interaction with the front-end server and the database and it will be through this server that tasks will be created for iRAP. In order to allow user interaction and for aggregating experiment data, the back-end module will expose an API, via Python with Django, to allow submitting and monitoring tasks. Additionally, it will resort to parallelization by maintaining a pool of worker processes in order to allow running multiple tasks at once. Once it receives a request to start an experiment, it will retrieve that experiment’s files, which are stored in the database, and the experiment process will be added to the queue and remain there until a worker process is free and can start processing the experiment. The results will then be processed and stored in a MongoDB database which will be accessed whenever the status of the experiment is updated or results are finished. The output and error logs of the experiment’s execution will also be stored in the database and made available to the users. The front-end server will host a web application in order to provide a user friendly interface and allow researchers without extensive programming knowledge to use the system to run their experiments and analyse the results. Thanks to the decoupling of website, storage and analysis module, it will be simple to change the configuration of the computational resources at any time. 24
The eRAP Framework Table 3.1: MongoDB Collections Stage Tools Supported auth_user User account data django_session Session data for active users storage.chunks GridFS field where files’ data is stored storage.files GridFS field where files’ metadata is stored user_server_experiments Experiment data user_server_gtffile URL and GridFS object for GTF files user_server_refgenome URL and GridFS object for reference genome files 3.2.1 Data Scheme MongoDB is a NoSQL, document based, database. The information is organized in collections in which each element is stored as a JSON document. MongoDB is also capable of storing and serving very large files without having to load them entirely into memory via the GridFS system, which splits files into chunks and saves each one as a separate document. Table 3.1 shows the existing collections used for storing the system’s data. Auth User An Auth User’s document stores all relevant information about a user: a unique ID, username, first and last names, email, password, type of user and other information such as the last login and the join date. This collection is created by the non-relational Django authentication back-end but is easily extendable by developers if necessary. Listing 3.1 shows an example of a document in this collection. 1{ 2"_id" : ObjectId("5739ee7f8bc3b46ad3fab34a"), 3"username" : "luiscleto", 4"first_name" : "Luis", 5"last_name" : "Cleto", 6"is_active" : true, 7"email" : "[email protected]", 8"is_superuser" : true, 9"is_staff" : true, 10 "last_login" : ISODate("2016-05-29T20:15:32.397Z"), 11 "password" : "pbkdf2_sha256$12000$ofxfyaH1uA7S$5TMWvOlCwIGVh4sviT2+ XBz7thyKkZKQbVi/gOHYl+k=", 12 "date_joined" : ISODate("2016-05-16T15:59:59.765Z") 13 } Listing 3.1: Example of an Auth User document in JSON format 25
The eRAP Framework 3.6.2 Experiment With Errors In addition to the previous experiment, a similar one was conducted but errors were introduced in the configuration file so that it would be invalid and iRAP would fail when executing the analysis. In this scenario, the system was able to detect the failure and provide a generic error message relative to the cause of the error (as seen in the second scenario of Figure 3.5). More details on errors during iRAP execution can be seen by analysing the provided output and error logs. 3.7 Chapter Conclusions In this chapter we go over the architecture of the implemented system and detail the functions of each component/module. The main modules were implemented in Python and Django, using MongoDB for storing data with the GridFS system. The essentials were setup so that an expert can run RNA-seq experiments of any kind even though some options are currently only available via the text-based configuration file. Additionally, thanks to the decoupling of the interface, storage and core logic of the proposed system, it is simple to change the configuration of the computational resources at any time. 32
Chapter 4 RNA-seq Data Analysis In order to provide additional meaningful insights into RNA-seq data, several types of analysis can be conducted which may be relevant for assessing the impact of cancer on the transcriptome. For this project, three main types of analysis were conducted: analysis of gene fusion events, alternative splicing and gene expression quantification (for mitochondrial genes). Multiple tools were considered or developed for this purpose as the remainder of this chapter will describe. 4.1 Gene Fusion Analysis One of the types of analyses that were proposed was gene fusion analysis as a high amount of these events is commonly associated with cancer [MJFM15]. As there are several efficient tools available for this specific purpose already, we opted by configuring and using one such tool to conduct the required analysis. The EricScript (see Section 2.4) framework was chosen as it is considerably more lightweight than other tools and provides high quality results [KVQL16]. It is worth noting that, in order to use EricScript with the BAM samples provided for our research, these files have to first be sorted by query name and then converted back to FASTQ format. This can be achieved with the two commands shown in Listing 4.1. 1samtools sort -n sample.bam sample.sorted.bam 2bamToFastq -i sample.sorted.bam -fq sample.end1.fastq -fq2 sample.end2.fastq Listing 4.1: Generating FASTQ input files for EricScript from a sample BAM file 4.2 Alternative Splicing Analysis As was previously mentioned, one of the problems we aimed to solve is the development of a tool that allows measuring the events of alternative splicing present in given input samples. This 33
RNA-seq Data Analysis tool should be able to process vast amounts of data, as is usually the case for genetic analysis, within a reasonable amount of time and yield results that allow experts to visualize the differences in alternative splicing between each of the samples. In this chapter we present the Junctions Comparer tool, which was developed entirely by us, and detail its usage and methods. 4.2.1 Junctions Comparer Once a set of reads has been aligned with a reference genome there are several types of analysis that can be performed on the alignments. One such analysis is quantifying the events of alternative splicing present in that sample as well as the types of such events. This is what Junctions Comparer aims to do by performing a differential analysis between a reference annotation genome and any number of aligned samples. After the samples have been aligned, it is necessary to extract the splice junctions before using our tool to run the analysis. A junction is identified by its coordinates: chromosome, strand, start position and end position. This information can be extracted from a BAM file with a single command by combining SAMTools, AWK and BEDTools. This instruction can be seen in Listing 4.2. 1samtools view -h sample_1.bam | awk ’{if(($6 ~ /N/)|| $1 == "@SQ") print}’ | samtools view -bS | bamToBed -bed12 | sort -k1,1V > sample_1.bed Listing 4.2: Extracting splice sites from sample_1.bam After pre-processing all the relevant samples, the resulting files in BED format can then be provided to Junction Comparer for quantifying and identifying the types of alternative splicing events in each sample. It is important to use the same reference genome that was used for the alignment process or the results may not be accurate. 4.2.2 Usage Junctions Comparer was developed in Python and has no dependencies. It was designed to be as simple as possible to set up and use. The usage options are as seen in Listing 4.3. 1usage: junctions_comparer.py [-h] [-nb | -q] [-n MIN_READS] [-t TEMP_DIR] 2[-o OUT_DIR] [-r RESULTS_FILE] 3[-rl RESULTS_DELIMITER] [-u UNKNOWN_ID] 4[-gl GENE_DELIMITER] [-a {stranded,unstranded}] 5gtf_file bed_file bed_file [bed_file ...] Listing 4.3: Junctions Comparer Usage. Optional arguments are shown between square brackets and curly brackets contain the list of possible values for that argument 34
RNA-seq Data Analysis The required arguments for the script to execute are gtf_file and at least two bed_files. Every other argument is optional and were included primarily to give the user more customization options over the program’s execution and output. The most relevant optional argument is the analysis type as it should be used in accordance to how the original experiment’s libraries were prepared — using stranded protocols or not — as this needs to be correct for the results to be accurate. Table 4.1 describes each of the positional and optional arguments in detail. Table 4.1: Junctions Comparer Arguments Argument Description gtf_file reference annotation file in GTF format bed_file junction annotation file in BED format -h, –help displays the usage information and exits -nb, –no-bars disables loading bars (use when redirecting output to file) -q, –quiet execute silently (disable all prints) -n MIN_READS minimum number of reads supporting a junction for it pass the filter (default: 3) -t TEMP_DIR directory where to keep temporary files (default: sj_tmp) -o OUT_DIR directory where to keep output files (default: sj_out) -r RESULTS_FILE name for final result file (default: results.csv) -rl RESULTS_DELIMITER delimiter for output CSV file (default: ,) -u UNKNOWN_ID ID given to reads in unknown genes (default: UNKNOWN) -gl GENE_DELIMITER delimiter for gene lists in output (default: |). NOTE: MUST NOT BE THE SAME AS RESULTS_DELIMITER -a ANALYSIS_TYPE stranded or unstranded analysis (default: unstranded) 4.2.3 Junction Identification The aforementioned tool can identify canonical junctions as well as most of the classical types of alternative splicing events (see Section 2.1.3). At this stage, only mutually exclusive exons are not detected. Any such events will be detected as either canonical events (for consecutive exons) or standard exon skipping events (for non-consecutive exons). In order to identify the type of a given junction, the tool will extract a list of known exons for the chromosome and strand that the junction belongs to. It will then analyse the start and end positions of the junction to determine if either is canonical or 3’/5’ and also to see if the matching exons are consecutive or if an exon skipping event has taken place. By doing this it is also able to identify any combination of the classical types that were mentioned such as an alternative 3’ acceptor site combined with an exon skipping event. Tables 4.2 and 4.3 show the possible classifications of a junction’s start and end positions respectively. Additionally, a junction may also receive an additional exon skipping classification if the described scenarios do not occur between two consecutive exons. 35
RNA-seq Data Analysis Table 4.2: Junction Start Classification Type Description Canonical Occurs if the junction start matches an exon’s end position Alternative 5’ Occurs if the previous condition is not met but the junction start is contained within an exon Novel Occurs if none of the previous conditions are matched Table 4.3: Junction End Classification Type Description Canonical Occurs if the junction end is immediately followed by an exon’s start position Alternative 3’ Occurs if the previous condition is not met but the position after a junction’s end is contained within an exon Novel Occurs if none of the previous conditions are matched As there are often overlapping exons in the reference genome (same position but different transcripts), precisely determining the type of junction being dealt with is often not trivial. The approach taken by the tool is that if any possible exon combination allows the junction to be considered canonical, that is the type that is assumed. 4.2.4 Output Several output files are created by the program to summarize the results. They are in the sj_out folder unless the user specifies another output folder (see Section 4.2.2). A file named <sample_name>.read_counts.txt is created for each sample summarizing the number of junctions mapped to each gene (or unknown maps) and the total number of reads for that sample. The main output files are results.csv and results.filtered.csv (again, unless a different file name was specified by the user). These files list the junctions found, the number of reads supporting that junction for each sample, the corresponding list of candidate gene IDs for both start and end positions of the junction and the type of junction. The results.filtered.csv only contains junctions that are supported by more reads than the MIN_READS parameter for at least one of the samples. Each junction is identified by a unique ID using one of the following schemes: <chromosome>_<start>_<end> for unstranded analysis or <chromosome>_<strand>_<start>_<end> for stranded analysis. An example of the output generated by this program is shown in Listing 4.4 1id,sample_1,sample_2,sample_3,sample_4,gene_ids (start),gene_ids (end),type 201_154936407_154938114,1,3,0,4,ENSG00000160691,ENSG00000160691,C|ES|C 301_151542246_151546745,4,26,23,39,ENSG00000143367,ENSG00000143367,C|C 401_54675804_54678173,123,287,232,238,ENSG00000116221,ENSG00000116221,C|C 501_121307595_121310521,1,0,9,0,ENSG00000231752,ENSG00000231752,C|3’ 601_27268309_27271880,3,3,1,6,ENSG00000090273,ENSG00000090273,C|ES|C 701_150621224_150621606,2,4,4,16,ENSG00000143457,ENSG00000143457,5’|C 36
RNA-seq Data Analysis 801_7797630_7798018,2,3,2,2,ENSG00000171735,ENSG00000171735,C|C 901_52878296_52879550,76,142,201,195,ENSG00000134748|ENSG00000134744,ENSG00000134748 |ENSG00000134744,C|C Listing 4.4: Example output for an unstranded analysis. The first line contains the header of the CSV file (column names) while the following lines each identify a junction. The fields represent the junction’s ID, the number of supporting reads per each sample, the IDs of the genes in the start and end positions and the type of junction. 4.2.5 Case Study In order to evaluate the performance and quality of the results generated by Junctions Comparer, a simple case study was undertaken using both our tool and MATS (see Section 2.4) to perform a differential analysis on alternative splicing events between two samples as this is the only number of samples allowed for a MATS analysis. These samples were provided by IPATIMUP and both cases present a widely invasive Follicular Thyroid Carcinoma (wFTC). As the samples were prepared using unstranded libraries, the alternative splicing analysis is also, necessarily, unstranded, which might make the results of both tools less accurate. As the main purpose of the experiment was to compare results and performance, the analysis of the results themselves will be very superficial. In this study, JC was configured to filter out junctions with less than twelve supporting reads. As Figure 4.1 shows, Junctions Comparer is significantly faster than MATS in processing the two samples, even if the pre-processing time of converting the BAM files to the required BED format is included. It is worth noting that the pre-processing was done in parallel for each sample so, for a significantly larger number of samples, this pre-processing time might increase significantly. It is likely that this large difference in execution time is due mainly to MATS being designed to perform the analysis on raw reads (FASTQ files) rather than BAM files. Figure 4.1: The graphic on the left shows the execution time for Junctions Comparer and MATS. The middle column includes the pre-processing time required to prepare the BAM samples for JC. The graphic on the right compares the results obtained by the two tools 37
RNA-seq Data Analysis As for the results generated by each tool, the most noticeable difference is in the number of novel junctions detected as MATS reports approximately three times as many novel junctions as JC. This is likely due to JC’s optimistic approach in predicting splice events rather than conducting a more in-depth analysis using the read information to decide between ambiguous splice junctions. 4.3 Gene Expression Quantification In addition to the Junctions Comparer tool, an extra script was developed to allow to easily quantify gene expression for each sample by using the total number of reads mapping to each gene as a proxy: the Gene Expression Counter. It accepts a subset of the options used for the previous script, the only difference being that it receives a custom format CSV file with the summarized reads rather than BED files. Listing 4.5 shows this program’s usage. 1usage: gene_expression_counter.py [-h] [-nb | -q] [-t TEMP_DIR] [-o OUT_DIR] 2[-rl RESULTS_DELIMITER] [-u UNKNOWN_ID] 3[-a {stranded,unstranded}] 4gtf_file reads_file reads_file [reads_file ...] Listing 4.5: Gene Expression Counter usage. Optional arguments are shown between square brackets and curly brackets contain the list of possible values for that argument The reads_files should contain one line per each read with the following values separated by tabs: <chromosome>, <read_start>, <read_end> and <strand>. These files can be easily created from a BAM file by combining SAMTools and AWK through the command show in Listing 4.6. 1samtools view sample.bam | awk ’{printf $3 "\t" $4 "\t" $4+length($10)-1 "\t"} {if( and($2,16)>0){print "-"}else{print "+"}}’ > sample_reads.tsv Listing 4.6: Extracting read information from sample.bam 4.3.1 Output Gene Expression Counter creates a <sample_name>_reads.gene_expression.tsv for each sample with the following tab separated values: <gene_id>, <read_count> and <chromosome>. Additionally, the two last lines indicate the number of reads that don’t map to any known gene and the total number of reads, respectively. These files are created in the gec_out directory unless another output directory is specified by the user. The results can then easily be filtered for specific chromosomes (such as mitochondrial chromosomes) using a text processing tool such as grep1. An example of such an output file is shown in Listing 4.7. 1https://www.gnu.org/software/grep/manual/grep.html 38
RNA-seq Data Analysis 1gene_id read_count chr 2ENSG00000099725 21 Y 3ENSG00000183878 17 Y 4ENSG00000241859 3 Y 5UNKNOWN 3059 _ 6TOTAL 53844186 _ Listing 4.7: Example Gene Expression Counter output. The first line of the TSV file contains the header (column names) while every other line identifies a gene by its ID and shows its read count for this sample along with the gene’s chromosome. The last two lines show the number of reads mapped to unknown locations and the total number of reads, respectively 4.4 Chapter Conclusions In this chapter we go over each of the types of analyses proposed for our research. We detail the decisions taken for each analysis and the tools used or designed for that purpose. The tools that were created were Junctions Comparer and Gene Expression Counter and their usage and output were described in detail. The necessary pre-processing steps were referred in order to prepare BAM samples, like the ones provided by IPATIMUP, for each analysis. 39
RNA-seq Data Analysis 40
Chapter 5 Case Study In this chapter we will present the complete case study undertaken to assess the impact of cancer in several genomic features and events. The data used was provided by IPATIMUP and consists of four samples of thyroid carcinoma. The analyses performed and their methodology is explained in detail in Chapter 4. The purpose of this case study was to research potential differences between distinct types of cancer. In order to accomplish this, four samples were collected from the São João Hospital Centre (Porto). Cases 1 and 2 have been categorized as a widely invasive Follicular Thyroid Carcinoma (wFTC) and cases 3 and 4 as a minimally invasive Follicular Thyroid Carcinoma (mFTC). 5.1 Samples characterization Patient from case 1 was female, 82 years old, with a tumour measuring 2 cm of size and presented a predominant follicular growth pattern and oncocytic features. Patient from case 2 was male, 55 years old, with a tumour measuring 5 cm of size and presented a predominant solid/trabecular growth pattern. For the mFTC group, patient from case 3 was female, 56 years old, the tumour measuring 3.7 cm of size and with follicular growth pattern; patient from case 4 was female, 56 years old, the tumour measuring 4 cm of size and with follicular growth pattern. 5.2 Research Objectives The aim of the study was to analyse the following features regarding the two sample groups: •differentially expressed genes; •genes most affected by alternative splicing events; •most common gene fusion events; •Compare results between versions of human genome assembly; 41
Conclusions and Future Work 6.2 Future Work The work done for this dissertation can be improved in several aspects. The eRAP system is currently only a prototype and can be extended to include more configuration options in the interface until the need to upload an additional configuration file is completely eliminated. Additionally, the tools we developed during this research can also be included in this system (or the underlying iRAP system) in order to allow more types of analyses. It would also be beneficial to separate experiment creation and large file uploads on this system to avoid having to re-upload the files if there is an error in the form (this implies allowing users to manage their files). The Junctions Comparer and Gene Expression Counter tools can also be improved by including statistical analysis of the results generated in order to avoid having to develop additional R scripts or the use of spreadsheet software to summarize the results, as was done in this work. It would also be useful to calculate and include confidence metrics for each event rather than relying on the absolute number of reads that support each event. More types of analyses can also be performed using the tools that were developed, for example by taking into account the types of the alternative splicing events which are also included in the Junctions Comparer output. Finally, the gene fusion analysis should follow a different methodology using a tool capable of providing more accurate results when handling real data such as SOAPfuse, FusionCatcher, JAFFA or PRADA. 48
References [A+10] Simon Andrews et al. Fastqc: A quality control tool for high throughput sequence data. Reference Source, 2010. [AKW78] Alfred V. Aho, Brian W. Kernighan, and Peter J. Weinberger. Awk – a pattern scanning and processing language (second edition), 1978. [APH14] Simon Anders, Paul Theodor Pyl, and Wolfgang Huber. Htseq—a python framework to work with high-throughput sequencing data. Bioinformatics, page btu638, 2014. [ASK+01] Shinichiro Ando, Nicholas J Sarlis, Jay Krishnan, Xu Feng, Samuel Refetoff, Michael Q Zhang, Edward H Oldfield, and Paul M Yen. Aberrant alternative splicing of thyroid hormone receptor in a tsh-secreting pituitary tumor is a mechanism for hormone resistance. Molecular Endocrinology, 15(9):1529–1538, 2001. [BPM+12] Matteo Benelli, Chiara Pescucci, Giuseppina Marseglia, Marco Severgnini, Francesca Torricelli, and Alberto Magi. Discovering chimeric transcripts in paired-end RNA- seq data by using EricScript. Bioinformatics, 28(24):3232–3239, December 2012. [Bro15] Ryan Brown. Django vs flask vs pyramid: Choosing a python web framework. 2015. [CFG+10] Peter JA Cock, Christopher J Fields, Naohisa Goto, Michael L Heuer, and Peter M Rice. The sanger fastq file format for sequences with quality scores, and the solex- a/illumina fastq variants. Nucleic acids research, 38(6):1767–1771, 2010. [ED] Alicia Ebert and Gene Delay. Mitochondrial DNA Analysis. Available at http://www.uvm.edu/~biology/Classes/296D/10_Mitochondria. pdf, accessed on June 2016. [FCK02] Lilian TC Franca, Emanuel Carrilho, and Tarso BL Kist. A review of dna sequencing techniques. Quarterly reviews of biophysics, 35(02):169–200, 2002. [FG08] James D. Fackenthal and Lucy A. Godley. Aberrant rna splicing and its functional consequences in cancer cells. Disease Models and Mechanisms, 1(1):37–42, 2008. [FPMB14] Nuno A Fonseca, Robert Petryszak, John Marioni, and Alvis Brazma. irap-an integrated rna-seq analysis pipeline. bioRxiv, page 005991, 2014. [Gena] Generic Model Organism Database. GFF. Available at http://gmod.org/wiki/ GFF, accessed on June 2016. [GENb] GENIE. Gene Expression and Regulation. Available at http://www2.le. ac.uk/departments/genetics/vgec/schoolscolleges/topics/ geneexpression-regulation, accessed on June 2016. 49
REFERENCES [gro] UCSC Genome Bioinformatics group. BED Format Specification. Available at http://genome.ucsc.edu/FAQ/FAQformat#format1, accessed on June 2016. [GYLL13] Marieta Gencheva, Lixin Yang, Gong-Biao Lin, and Ren-Jang Lin. Detection of alternatively spliced or processed rnas in cancer using oligonucleotide microarray. In RNA and Cancer, pages 25–40. Springer, 2013. [HKA] Galit Lev-Maor Hadas Keren and Gil Ast. Different types of alternative splicing. Available at http://www.nature.com/nrg/journal/v11/n5/box/ nrg2776_BX1.html, accessed on June 2016. [Ins] National Human Genome Research Institute. The ENCODE Project: ENCyclopedia Of DNA Elements. Available at http://www.genome.gov/encode/, accessed on June 2016. [KVQL16] Shailesh Kumar, Angie Duy Vo, Fujun Qin, and Hui Li. Comparative assessment of methods for the fusion transcripts detection from rna-seq data. Scientific reports, 6, 2016. [LHW+09] Heng Li, Bob Handsaker, Alec Wysoker, Tim Fennell, Jue Ruan, Nils Homer, Gabor Marth, Goncalo Abecasis, Richard Durbin, et al. The sequence alignment/map format and samtools. Bioinformatics, 25(16):2078–2079, 2009. [LM13] Yishan Li and Sathiamoorthy Manoharan. A performance comparison of sql and nosql databases. In Communications, Computers and Signal Processing (PACRIM), 2013 IEEE Pacific Rim Conference on, pages 15–19. IEEE, 2013. [LS12] Ben Langmead and Steven L Salzberg. Fast gapped-read alignment with bowtie 2. Nature methods, 9(4):357–359, 2012. [LTD+16] Silvia Liu, Wei-Hsiang Tsai, Ying Ding, Rui Chen, Zhou Fang, Zhiguang Huo, SungHwan Kim, Tianzhou Ma, Ting-Yu Chang, Nolan Michael Priedigkeit, et al. Comprehensive evaluation of fusion transcript detection algorithms and a meta-caller to combine top performing methods in paired-end rna-seq data. Nucleic acids research, 44(5):e47–e47, 2016. [Man14] Ananya Mandal. What is Molecular Biology? Available at http://www. news-medical.net/life-sciences/What-is-Molecular-Biology. aspx, accessed on June 2016, October 2014. [Mar08] Elaine R. Mardis. The impact of next-generation sequencing technology on genetics. Trends in Genetics, 24(3):133 – 141, 2008. [MHZ+11] Andrew McPherson, Fereydoun Hormozdiari, Abdalnasser Zayed, Ryan Giuliany, Gavin Ha, Mark GF Sun, Malachi Griffith, Alireza Heravi Moussavi, Janine Senz, Nataliya Melnyk, et al. defuse: an algorithm for gene fusion discovery in tumor rna-seq data. PLoS Comput Biol, 7(5):e1001138, 2011. [MJFM15] Fredrik Mertens, Bertil Johansson, Thoas Fioretos, and Felix Mitelman. The emerging complexity of gene fusions in cancer. Nature Reviews Cancer, 15(6):371–381, 2015. 50
REFERENCES [MJM07] Felix Mitelman, Bertil Johansson, and Fredrik Mertens. The impact of translocations and gene fusions on cancer causation. Nature Reviews Cancer, 7(4):233–245, 2007. [NCB] NCBI. Web BLAST page options. Available at http://blast.ncbi.nlm.nih. gov/blastcgihelp.shtml, accessed on June 2016. [QH10] Aaron R Quinlan and Ira M Hall. Bedtools: a flexible suite of utilities for comparing genomic features. Bioinformatics, 26(6):841–842, 2010. [Rei] Reid J. Robinson. How big is the human genome? Available at https://medium.com/precision-medicine/ how-big-is-the-human-genome-e90caa3409b0, accessed on June 2016. [Sch07] Stephan C Schuster. Next-generation sequencing transforms today’s biology. Nature, 200(8):16–18, 2007. [SPL+14] Shihao Shen, Juw W. Park, Zhi-xiang Lu, Lan Lin, Michael D. Henry, Ying N. Wu, Qing Zhou, and Yi Xing. rMATS: Robust and flexible detection of differential alternative splicing from replicate RNA-Seq data. Proceedings of the National Academy of Sciences, 111(51):E5593–E5601, December 2014. [TPS09] Cole Trapnell, Lior Pachter, and Steven L Salzberg. Tophat: discovering splice junctions with rna-seq. Bioinformatics, 25(9):1105–1111, 2009. [TRG+12] Cole Trapnell, Adam Roberts, Loyal Goff, Geo Pertea, Daehwan Kim, David R Kelley, Harold Pimentel, Steven L Salzberg, John L Rinn, and Lior Pachter. Differential gene and transcript expression analysis of rna-seq experiments with tophat and cufflinks. Nature protocols, 7(3):562–578, 2012. [Ven04] Julian P Venables. Aberrant and alternative splicing in cancer. Cancer research, 64(21):7647–7654, 2004. [WGS09] Zhong Wang, Mark Gerstein, and Michael Snyder. Rna-seq: a revolutionary tool for transcriptomics. Nature Reviews Genetics, 10(1):57–63, 2009. [Wol13] Jochen BW Wolf. Principles of transcriptome analysis and gene expression quantification: an rna-seq tutorial. Molecular ecology resources, 13(4):559–572, 2013. 51
REFERENCES 52
Appendix A R Analysis This document contains the R script developed to analyse the data generated by Junctions Comparer for the case study described in Chapter 5. The script’s dependencies are also listed. A.1 Dependencies In order to run the script in the next section, the following R dependencies should be installed: •reshape21- an R package to flexibly rearrange, reshape and aggregate data •ggplot22- an implementation of the grammar of graphics in R Additionally, the absolute paths present in the script should be changed to match those in the system being used for the analysis. A.2 Script Code 1library(reshape2) 2library(ggplot2) 3 4gene_ids = readLines("D:\\FEUP\\5o_ano\\2o_semestre\\DISS\\AltSplicing\\geneids_new .txt") 5alt_data = read.csv("D:\\FEUP\\5o_ano\\2o_semestre\\DISS\\junctions_comparer\\ sj_out\\results.filtered.csv", header = TRUE, sep = ",") 6samp1 = subset(alt_data, sample_1 > 50) 7samp2 = subset(alt_data, sample_2 > 50) 8samp3 = subset(alt_data, sample_3 > 50) 9samp4 = subset(alt_data, sample_4 > 50) 10 samp1_alt = subset(samp1, type != "C|C") 1https://cran.r-project.org/web/packages/reshape2/reshape2.pdf 2https://cran.r-project.org/web/packages/ggplot2/ggplot2.pdf 53
R Analysis 11 samp2_alt = subset(samp2, type != "C|C") 12 samp3_alt = subset(samp3, type != "C|C") 13 samp4_alt = subset(samp4, type != "C|C") 14 15 sample1_events = vector(mode="integer",length(gene_ids)) 16 i=0 17 for (gen_id in gene_ids) { 18 sample1_events[i] <- sum(grepl(gen_id, samp1_alt$gene_ids..start.) | grepl( gen_id, samp1_alt$gene_ids..end.)) 19 i<-i+1 20 } 21 22 sample2_events = vector(mode="integer",length(gene_ids)) 23 i=0 24 for (gen_id in gene_ids) { 25 sample2_events[i] <- sum(grepl(gen_id, samp2_alt$gene_ids..start.) | grepl( gen_id, samp2_alt$gene_ids..end.)) 26 i<-i+1 27 } 28 29 sample3_events = vector(mode="integer",length(gene_ids)) 30 i=0 31 for (gen_id in gene_ids) { 32 sample3_events[i] <- sum(grepl(gen_id, samp3_alt$gene_ids..start.) | grepl( gen_id, samp3_alt$gene_ids..end.)) 33 i<-i+1 34 } 35 36 sample4_events = vector(mode="integer",length(gene_ids)) 37 i=0 38 for (gen_id in gene_ids) { 39 sample4_events[i] <- sum(grepl(gen_id, samp4_alt$gene_ids..start.) | grepl( gen_id, samp4_alt$gene_ids..end.)) 40 i<-i+1 41 } 42 43 44 sample1_events = (sample1_events-min(sample1_events))/(max(sample1_events)-min( sample1_events)) 45 sample2_events = (sample2_events-min(sample2_events))/(max(sample2_events)-min( sample2_events)) 46 sample3_events = (sample3_events-min(sample3_events))/(max(sample3_events)-min( sample3_events)) 47 sample4_events = (sample4_events-min(sample4_events))/(max(sample4_events)-min( sample4_events)) 48 49 gen_alt_splice = data.frame(gene_ids, sample1_events, sample2_events, sample3_events, sample4_events) 50 54
R Analysis 51 gen_alt_splice[, "max12"] <- apply(gen_alt_splice[, 2:3], 1, max) 52 gen_alt_splice[, "max34"] <- apply(gen_alt_splice[, 4:5], 1, max) 53 gen_alt_splice[, "min12"] <- apply(gen_alt_splice[, 2:3], 1, min) 54 gen_alt_splice[, "min34"] <- apply(gen_alt_splice[, 4:5], 1, min) 55 gen_alt_splice[, "diff1"] <- abs(gen_alt_splice[, 9] - gen_alt_splice[, 6]) 56 gen_alt_splice[, "diff2"] <- abs(gen_alt_splice[, 8] - gen_alt_splice[, 7]) 57 gen_alt_splice[, "diff"] <- apply(gen_alt_splice[, 10:11], 1, min) 58 largest_diffs = gen_alt_splice[order(gen_alt_splice[,12],decreasing=T), ] 59 60 melted <- melt(largest_diffs[1:20,1:5], "gene_ids") 61 melted$cat <- ’’ 62 melted[melted$variable == ’sample4_events’,]$cat <- "4" 63 melted[melted$variable == ’sample3_events’,]$cat <- "3" 64 melted[melted$variable == ’sample2_events’,]$cat <- "2" 65 melted[melted$variable == ’sample1_events’,]$cat <- "1" 66 67 ggplot(melted, aes(x = cat, y = value, fill = variable)) + 68 geom_bar(stat = ’identity’,position = ’stack’) + 69 facet_wrap(~ gene_ids) + 70 labs(title="Normalized Alternative Splicing Events per Gene and Sample", y=" Number of Non-Canonical Events", x="Sample", fill="Samples") 55
R Analysis 56
Appendix B Experiment Results This document contains additional experiment data such as gene descriptions for the genes identified in each analysis performed for the case study. B.1 Gene Expression Results’ Descriptions gene symbol Gene Info ATP1A3 encodes protein belonging to the family of P-type cation transport ATPases, and to the subfamily of Na+/K+ -ATPases NXPH4 encodes protein which may be signaling molecules that resemble neuropeptides and that act by binding to alpha-neurexins and possibly other receptors EDN1 encodes a preproprotein that is proteolytically processed to generate a secreted peptide that belongs to the endothelin/sarafotoxin family. This peptide is a potent vasoconstrictor and its cognate receptors are therapeutic targets in the treatment of pulmonary arterial hypertension. Aberrant expression of this gene may promote tumorigenesis ASXL3 codes PcG proteins which act by forming multiprotein complexes, which are required to maintain the transcriptionally repressive state of homeotic genes throughout development RP11-146G7.2 known antisense RP11-742D12.2 known processed transcript MAG encodes protein which is a type I membrane protein and member of the immunoglobulin superfamily. It is thought to be involved in the process of myelination. It is a lectin that binds to sialylated glycoconjugates and mediates certain myelin-neuron cell-cell interactions 57