The RNA Centric Analysis System Report

Bora Uyar, Dilmurat Yusuf, Ricardo Wurmus, Altuna Akalin

2020-04-27

library(RCAS)

Warning: In this vignette, due to space limitations, we demonstrate the functions of RCAS using static images. In order to see how an interactive report from RCAS looks see RCAS::runReport().

For the most up-to-date functionality, usage and installation instructions, and example outputs, see our github repository here.

Introduction

RCAS is an automated system that provides dynamic genome annotations for custom input files that contain transcriptomic regions. Such transcriptomic regions could be, for instance, peak regions detected by CLIP-Seq analysis that detect protein-RNA interactions, RNA modifications (alias the epitranscriptome), CAGE-tag locations, or any other collection of target regions at the level of the transcriptome.

RCAS is designed as a reporting tool for the functional analysis of RNA-binding sites detected by high-throughput experiments. It takes as input a BED format file containing the genomic coordinates of the RNA binding sites and a GTF file that contains the genomic annotation features usually provided by publicly available databases such as Ensembl and UCSC. RCAS performs overlap operations between the genomic coordinates of the RNA binding sites and the genomic annotation features and produces in-depth annotation summaries such as the distribution of binding sites with respect to gene features (exons, introns, 5’/3’ UTR regions, exon-intron boundaries, promoter regions, and whole transcripts) along with functionally enriched term for targeted genes. Moreover, RCAS can darry out discriminative motif discovery in the query regions. The final report of RCAS consists of high-quality dynamic figures and tables, which are readily applicable for publications or other academic usage.

Data input

RCAS minimally requires as input a BED file and a GTF file. The BED file should contain coordinates/intervals of transcriptomic regions which are located via transcriptomics methods such as Clip-Seq. The GTF file should provide reference annotation. The recommended source of GTF files is the ENSEMBLE database.

For this vignette, in order to demonstrate RCAS functionality, we use sample BED and GTF data that are built-in the RCAS library, which can be imported using a common R function: data(). To import custom BED and GTF files, the user should execute two RCAS functions called importBed() and importGtf().

Importing sample data

Importing custom data

To use importBed() and importGtf(), the user should provide file paths to the respective BED file and GTF file. To reduce memory usage and time consumption, we advise the user to set sampleN=10000 to avoid huge input of intervals.

Summarizing Overlaps of Query Regions with Genomic Annotation Features

Querying the annotation file

Extending the annotation feature space

GTF files contain some annotation features (e.g. exons, transcripts) that are usually explicitly defined, however, some transcript features such as introns, exon-intron boundaries, promoter regions are only implicitly defined. Such implicit features can be extracted from a GTF file using makeTxDb family of functions from the GenomicFeatures library.

First we create a list of GRanges objects, where each list element contains all the available coordinates of transcript features such as transcripts, exons, introns, 5’/3’ UTRs, exon-intron boundaries, and promoter regions.

Obtaining a table of overlap counts between query regions and genes

To find out which genes overlap with how many queries and categorise overlaps by transcript features; we use getTargetedGenesTable function, which returns a data.frame object.

tx_name transcripts exons promoters fiveUTRs introns cds threeUTRs
ENST00000317713 33 28 0 0 5 24 4
ENST00000361689 33 28 0 0 5 24 4
ENST00000372915 33 28 0 0 5 24 4
ENST00000539005 33 28 0 0 5 24 4
ENST00000545844 33 28 0 0 5 24 4
ENST00000564288 33 28 0 0 5 24 4
ENST00000567887 33 28 0 0 5 24 4
ENST00000372925 28 23 0 0 5 19 4
ENST00000289893 27 22 0 0 5 18 4
ENST00000367142 14 14 0 0 0 3 12

Profiling the coverage of query regions across transcript features

Coverage profile of query regions at feature boundaries

It may be useful to look at the distribution of query regions at the boundaries of transcript features. For instance, it may be important to see the relative signal at transcript ends (transcription start sites versus transcription end sites). Or, it may be important to see how the signal is distributed at exon boundaries, which may give an idea about the regulation of the transcript. Here we demonstrate how to get such signal distributions at transcription start/end sites. The same approach can be done for any other collection of transcript features (exons, introns, promoters, UTRs etc.)

Coverage profile of query regions for all transcript features

Coverage profiles can be obtained for a single type of transcript feature or a list of transcript features. Here we demonstrate how to get coverage profile of query regions across all available transcript features. It might be a good idea to use sampleN parameter to randomly downsample the target regions to speed up the calculations.

Discriminative Motif Discovery

Calculating enriched motifs

We build a classifier based on k-mer frequencies (allowing for mismatches) to find the most informative motifs that help discriminate the query sequences from the background distribution.

motif analysis: getting motif summary statistics

A summary table from the motif analysis results can be obtained

patterns queryHits controlHits querySeqs controlSeqs queryFraction controlFraction oddsRatio pvalue
GGAGAT GGAGAT 446 213 358 171 0.36 0.17 2.70 0
GGAGAA GGAGAA 574 282 425 225 0.42 0.22 2.54 0

Functional enrichment analysis

RCAS makes use of gprofiler2 package enriched functions in genes that overlap the query regions.

targetedGenes <- unique(overlaps$gene_id)

res <- RCAS::findEnrichedFunctions(targetGenes = targetedGenes, species = 'hsapiens')
res <- res[order(res$p_value),]
resGO <- res[grep('GO:BP', res$source),]
knitr::kable(subset(resGO[1:10,], select = c('p_value', 'term_name', 'source')))
p_value term_name source
0.0000071 mRNA metabolic process GO:BP
0.0000681 mRNA catabolic process GO:BP
0.0000786 organonitrogen compound biosynthetic process GO:BP
0.0001758 RNA catabolic process GO:BP
0.0003826 organic substance biosynthetic process GO:BP
0.0004481 biosynthetic process GO:BP
0.0031768 cellular biosynthetic process GO:BP
0.0039002 RNA processing GO:BP
0.0070340 regulation of mRNA metabolic process GO:BP
0.0072015 cellular metabolic process GO:BP

Generating a full report

The users can use the runReport() function to generate full custom reports including all the analysis modules described above. There are four main parts of the analysis report.

By default, runReport() function aims to run all three modules, while the user can turn off these individual modules.

Below are example commands to generate reports using these functionalities.

A test run for human

runReport()

A custom run for human

runReport( queryFilePath = 'input.BED',
            gffFilePath = 'annotation.gtf')

To turn off certain modules of the report

runReport( queryFilePath = 'input.BED',
            gffFilePath = 'annotation.gtf',
            motifAnalysis = FALSE,
            goAnalysis = FALSE )

To run the pipeline for species other than human

You can run RCAS for any of the genome versions available in the BSgenome package.
See BSgenome::available.genomes.

runReport( queryFilePath = 'input.mm9.BED',
            gffFilePath = 'annotation.mm9.gtf',
            genomeVersion = 'mm9' )

To turn off verbose output and progress bars

runReport(quiet = TRUE)

Printing raw data generated by the runReport function

One may be interested in printing the raw data used to make the plots and tables in the HTML report output of runReport function. Such tables could be used for meta-analysis of multiple analysis results. In order to activate this function, printProcessedTables argument must be set to TRUE.

runReport(printProcessedTables = TRUE)

Acknowledgements

RCAS is developed in the group of Altuna Akalin (head of the Scientific Bioinformatics Platform) by Bora Uyar (Bioinformatics Scientist), Dilmurat Yusuf (Bioinformatics Scientist) and Ricardo Wurmus (System Administrator) at the Berlin Institute of Medical Systems Biology (BIMSB) at the Max-Delbrueck-Center for Molecular Medicine (MDC) in Berlin.

RCAS is developed as a bioinformatics service as part of the RNA Bioinformatics Center, which is one of the eight centers of the German Network for Bioinformatics Infrastructure (de.NBI).