plotCDS: Plots average ribosome footprint alignment to coding...

Description Usage Arguments Value Author(s) Examples

View source: R/plotCodons.R

Description

For each sample, the average (normalised by translation abundance over transcript) of the ribosome footprints of a given length alignments at the 5' and 3' ends of all specified transcripts beginning at each base relative to coding start/end are plotted. The bases are colour coded relative to start codon.

Usage

1
2
plotCDS(coordinates, riboDat, lengths = 27, min5p = -20, max5p = 200,
min3p = -200, max3p = 20, cap, main = "", plot = TRUE, ...)

Arguments

coordinates

Coordinates (as a GRanges object) of the coding sequences.

riboDat

riboData object containing ribosome footprint data.

lengths

Lengths of footprints to be plotted. May be given as a vector, in which case multiple plots will be produced.

min5p

The distance upstream of the translation start to be plotted.

max5p

The distance downstream of the translation start to be plotted.

min3p

The distance upstream of the translation end to be plotted.

max3p

The distance downstream of the translation end to be plotted.

cap

If given, caps the height of plotted values.

main

Title of the plot.

plot

Should the acquired matrix of mean expression be plotted? Defaults to TRUE.

...

Additional arguments to be passed to 'plot' and 'axes'.

Value

Invisibly returns lists of lists of matrices containing weighted averages plotted for each sample/length combination.

Author(s)

Thomas J. Hardcastle

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
27
28
29
30
#ribosomal footprint data
datadir <- system.file("extdata", package = "riboSeqR")
ribofiles <- paste(datadir, 
                   "/chlamy236_plus_deNovo_plusOnly_Index", c(17,3,5,7), sep = "")
rnafiles <- paste(datadir, 
                  "/chlamy236_plus_deNovo_plusOnly_Index", c(10,12,14,16), sep = "")

riboDat <- readRibodata(ribofiles, rnafiles, replicates = c("WT", "WT",
"M", "M")) 

# CDS coordinates
chlamyFasta <- paste(datadir, "/rsem_chlamy236_deNovo.transcripts.fa", sep = "")
fastaCDS <- findCDS(fastaFile = chlamyFasta, 
                    startCodon = c("ATG"), 
                    stopCodon = c("TAG", "TAA", "TGA"))

# frame calling
fCs <- frameCounting(riboDat, fastaCDS)

# analysis of frame shift for 27 and 28-mers.
fS <- readingFrame(rC = fCs, lengths = 27:28)

# filter coding sequences. 27-mers are principally in the 1-frame,
# 28-mers are principally in the 0-frame relative to coding start (see
# readingFrame function).

ffCs <- filterHits(fCs, lengths = c(27, 28), frames = list(0, 2), 
                   hitMean = 50, unqhitMean = 10, fS = fS)

plotCDS(coordinates = ffCs@CDS, riboDat = riboDat, lengths = 27)

riboSeqR documentation built on Nov. 8, 2020, 8:23 p.m.