coverageHeatMap {ORFik} | R Documentation |
Rows: Position in region Columns: Read length Index intensity: (color) coverage scoring per index.
coverageHeatMap( coverage, output = NULL, scoring = "zscore", legendPos = "right", addFracPlot = FALSE )
coverage |
a data.table, e.g. output of scaledWindowCoverage |
output |
character string (NULL), if set, saves the plot as pdf or png to path given. If no format is given, is save as pdf. |
scoring |
character vector (zscore), either of zScore, transcriptNormalized, sum, mean, median, NULL. Set NULL if already scored. |
legendPos |
a character, Default "right". Where should the fill legend be ? ("top", "bottom", "right", "left") |
addFracPlot |
Add plot on top of heatmap with fractions per positions |
Coverage rows in heat map is fraction, usually fractions is divided into unique read lengths (standard Illumina is 76 unique widths, with some minimum cutoff like 15.) Coverage column in heat map is score, default zscore of counts. These are the relative positions you are plotting to. Like +/- relative to TIS or TSS.
Colors: Remember if you want to change anything like colors, just return the ggplot object, and reassign like: obj + scale_color_brewer() etc. Standard colors are: 0 reads in whole readlength: gray few reads in position: white medium reads in position: yellow many reads in position: dark blue
a ggplot object of the coverage plot, NULL if output is set, then the plot will only be saved to location.
Other coveragePlot:
pSitePlot()
,
savePlot()
,
windowCoveragePlot()
# An ORF grl <- GRangesList(tx1 = GRanges("1", IRanges(1, 6), "+")) # Ribo-seq reads range <- IRanges(c(rep(1, 3), 2, 3, rep(4, 2), 5, 6), width = 1 ) reads <- GRanges("1", range, "+") reads$size <- c(rep(28, 5), rep(29, 4)) # read size coverage <- windowPerReadLength(grl, reads = reads, upstream = 0, downstream = 5) coverageHeatMap(coverage) # See vignette for more examples