readsEndPlot {ribosomeProfilingQC} | R Documentation |
Plot the reads shifted from start/stop position of CDS.
readsEndPlot( bamfile, CDS, toStartCodon = TRUE, fiveEnd = TRUE, shift = 0, window = c(-29, 30), readLen = 25:30 )
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 |
The invisible counts numbers.
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)