knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
We start by loading the RNAModR
library, along with the convenience library magrittr
.
library(RNAModR) library(magrittr)
We read in data for the mRNA modification N1-methyladenosine (m¹A) from Dominissini et al., which is included in the RNAModR
package. Data is provided in the BED6 format, which we can map to transcriptome coordinates using SmartMap
and select those sites that lie within the CDS and 3'UTR. Note that if we have data in a different format (e.g. GTF), we first need to convert from GTF to BED6.
m1A <- system.file( "extdata", "MeRIPseq_m1A_Dominissini2016_hg38.bed", package = "RNAModR") %>% ReadBED() %>% SmartMap(id = "m1A", refGenome = "hg38", showPb = FALSE) %>% FilterTxLoc(filter = c("CDS", "3'UTR"))
We can get a quick summary overview of the number of sites per transcript region with
m1A
We now generate a distribution of null sites
null <- GenerateNull(m1A, nt = "A", showPb = FALSE) null
The null sites are all nucleotides nt
in all transcript regions that contain at least one m¹A site. Consequently, the number of null sites is signficantly larger than the number of m¹A sites. It may make sense to downsample the number of null sites to match the number of m¹A sites in every transcript region, see ?DownsampleTxLoc
.
We explore the spatial distribution of m¹A sites relative to the null sites within the CDS and 3'UTR and perform an enrichment analysis to characterise enrichment/depletion of m¹A sites within bins along the transcript regions.
PlotSpatialEnrichment(m1A, null)
We read in eIF4AIII HITSCLIP data from Saulière et al., which is included in the RNAModR
package.
eif4 <- system.file("extdata", "HITSCLIP_eIF4A3_Sauliere2012_hg38.bed", package = "RNAModR") %>% ReadBED() %>% SmartMap(id = "eif4", refGenome = "hg38", showPb = FALSE) %>% FilterTxLoc(filter = c("CDS", "3'UTR")) eif4
We can now calculate relative distances between the m¹A and null sites to the nearest eIF4AIII target site; we then perform an enrichment analysis of the two binned distance distributions to characterise enrichment/depletion of m¹A sites relative to null sites as a function of the distance to the nearest eIF4AIII site. Negative distances correspond to an m¹A/null site upstream of the eIF4AIII site; positive distances correspond to m¹A/null sites downstream of the eIF4AIII site.
PlotRelDistEnrichment(m1A, null, eif4, flank = 155, binWidth = 10)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.