plotTopTags: Coverage plots

Description Usage Arguments Value Author(s) Examples

Description

Using genomic coordinates and BAM files this function is useful for make coverage plots

Usage

1
plotTopTags(auxdf, genome, targetsPlot, output.dir)

Arguments

auxdf

A data frame: row.naMes=bin names, gene coordinates, bin coordinates and event name columns

genome

TxDb genome

targetsPlot

A dataframe containting: bam files name, condition (y axe tag), color for each condition

output.dir

Name of directory where plots are supossed to be exported

Value

Coverage plots in png format of selected events

Author(s)

Estefania Mancini, Marcelo Yanovsky, Ariel Chernomoretz

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
library(RNAseqData.HNRNPC.bam.chr14)
chr14 <- system.file("extdata","chr14.sqlite", package="ASpli")
genome <- loadDb(chr14)
features <- binGenome(genome) 
targets <- data.frame(bam=RNAseqData.HNRNPC.bam.chr14_BAMFILES,
                       condition=c(rep("CT",4),rep("KD",4)))
bam <- loadBAM(targets)
counts <- readCounts(features, bam, l=100L, maxISize = 50000)
pair <- c("CT","KD")
group <- c(rep("CT", 4),rep("KD", 4))
du_HNRNPC <- DUreport(counts, targets, pair, group)  
bins <- binsDU(du_HNRNPC)
topTagsBins <- which(bins$bin.fdr <= 0.1 & 
                     abs(bins$logFC) >=0.58)
targetsPlot <- data.frame(bam=targets$bam, 
                        sample=targets$condition, 
                        color=c(rep("blue", 4),rep("red", 4)), 
                        stringsAsFactors=FALSE)

auxdf<-bins[topTagsBins,]
#for simplicity, just one: LRR1:E005

plotTopTags(auxdf["LRR1:E005",], 
            genome, 
            targetsPlot, 
            output.dir="testPlots")

estepi/ASpli documentation built on May 16, 2019, 8:53 a.m.