readsEndPlot: Plot start/stop windows

Description Usage Arguments Value Examples

View source: R/readsEndPlot.R

Description

Plot the reads shifted from start/stop position of CDS.

Usage

1
2
3
4
5
6
7
8
9
readsEndPlot(
  bamfile,
  CDS,
  toStartCodon = TRUE,
  fiveEnd = TRUE,
  shift = 0,
  window = c(-29, 30),
  readLen = 25:30
)

Arguments

bamfile

A BamFile object.

CDS

Output of prepareCDS

toStartCodon

What to search: start or end codon

fiveEnd

Search from five or three ends of the reads.

shift

number(1). Search from 5' end or 3' end of given number. if fiveEnd set to false, please set the shift as a negative number.

window

The window of CDS region to plot

readLen

The reads length used to plot

Value

The invisible counts numbers.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
library(Rsamtools)
bamfilename <- system.file("extdata", "RPF.WT.1.bam",
                           package="ribosomeProfilingQC")
yieldSize <- 10000000
bamfile <- BamFile(bamfilename, yieldSize = yieldSize)
#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)
CDS <- readRDS(system.file("extdata", "CDS.rds",
                           package="ribosomeProfilingQC"))
readsEndPlot(bamfile, CDS, toStartCodon=TRUE)
#readsEndPlot(bamfile, CDS, toStartCodon=TRUE, fiveEnd=FALSE)
#readsEndPlot(bamfile, CDS, toStartCodon=FALSE)
#readsEndPlot(bamfile, CDS, toStartCodon=FALSE, fiveEnd=FALSE)
readsEndPlot(bamfile, CDS, shift=13)
#readsEndPlot(bamfile, CDS, fiveEnd=FALSE, shift=-16)

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