knitr::opts_chunk$set(tidy = FALSE,
                      cache = FALSE,
                      dev = "png",
                      message = FALSE,
                      error = FALSE,
                      warning = TRUE)

This package provides the plotting function plotGeneREUCs that draws heatmaps of the relative exon usage coefficients of a gene. Below, we plot the REUCs for the gene ALAS1 on subset 1 of the GTEx data.

library( HumanDEU )
library( ggplot2 )
library( RColorBrewer )


opt2 <- "ENSG00000023330"
    crossCoefs1, opt2,
    exons=c("E004", "E005", "E006"),
    colLim=3) +
    theme(legend.position="top", legend.direction="horizontal",
          axis.title.y=element_blank()) +
    xlab("Individual") +
    guides(fill = guide_colorbar(barwidth = 7,
               barheight = 0.35, title.position="top"))

We use the same function to plot the RISCs for the same exons of the gene ALAS1.

    crossCoefsJR1, opt2,
    exons=c("E004", "E005", "E006") ) +
    theme( legend.position="right",
          axis.title.y=element_blank() ) +
    xlab("Individual") +
    guides( fill = guide_colorbar(
               title="RSIC", barwidth = .5,
               barheight = 5,
               title.position="top") )

This package contains a function plotSashimi that inputs bam files aligned to the reference genome and plots sashimi plots for a given genomic region. Due to data sharing policies, however, we are not allowed to redistribute GTEx bam files because these are potentially identifiable data. For this reason, the code below is not evaluated during the compilation of this vignette.



sample1 <- "SRR1322163"
sample2 <- "SRR1317344" 
individual <-
    as.character( colData( dxd1 )[ colData(dxd1)$sample %in% sample1,"individual"][1])


transcriptDb <- loadDb( file.path(
    system.file("extdata", package="HumanDEU"),
    "GRCh38.sqlite" ) )

path <- Sys.getenv("gtex")
bamFiles <- sapply( c(sample1, sample2), function(x){
    file.path( path, "alignments", x,
          sprintf("%s_Aligned.sortedByCoord.out.bam", x ) )
    } )

options( ucscChromosomeNames=FALSE )

if(  all( file.exists(bamFiles) ) ){
plotSashimi( bamFiles,
    nameVec=c("Cerebellum", "Cortex"),
    transcriptDb=transcriptDb, geneTrack=geneTrack,
    transcriptIntrons=c("ENST00000469224", "ENST00000484952"),
    coords=GRanges("3", IRanges(start=52198144, end=52199220)) )

areyesq89/HumanTissuesDEU documentation built on May 6, 2019, 9:51 a.m.