strandPlot: Plot the distribution of reads in sense and antisense strand

Description Usage Arguments Value Examples

View source: R/strandPlot.R

Description

Plot the distribution of reads in sense and antisense strand to check the mapping is correct.

Usage

1
strandPlot(reads, CDS, col = c("#009E73", "#D55E00"), ...)

Arguments

reads

Output of getPsiteCoordinates

CDS

Output of prepareCDS

col

Coloar for sense and antisense strand.

...

Parameter passed to barplot

Value

A ggplot object.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
library(Rsamtools)
bamfilename <- system.file("extdata", "RPF.WT.1.bam",
                           package="ribosomeProfilingQC")
yieldSize <- 10000000
bamfile <- BamFile(bamfilename, yieldSize = yieldSize)
pc <- getPsiteCoordinates(bamfile, bestpsite=11)
pc.sub <- pc[pc$qwidth %in% c(29, 30)]
library(GenomicFeatures)
library(BSgenome.Drerio.UCSC.danRer10)
txdb <- makeTxDbFromGFF(system.file("extdata",
          "Danio_rerio.GRCz10.91.chr1.gtf.gz",
          package="ribosomeProfilingQC"),
          organism = "Danio rerio",
          chrominfo = seqinfo(Drerio)["chr1"],
          taxonomyId = 7955)
CDS <- prepareCDS(txdb)
strandPlot(pc.sub, CDS)

ribosomeProfilingQC documentation built on March 13, 2021, 2:01 a.m.