size.position.heatmap: Produce a heatmap of counts from the results of...

Description Usage Arguments Value Author(s) Examples

View source: R/viRome_functions.R View source: R/size.position.heatmap.R

Description

A heatmap will be drawn, the rows being read lengths, the columns being position in the genome, and the colours related to counts of read lengths mapping to those locations

Usage

1
size.position.heatmap(dm = NULL, minlen = 1, maxlen = 37, start = 1, end = 1e+07, scale = TRUE, col.fun = colorRampPalette(c("black", "red"), space = "rgb"), log = FALSE, mar = c(5, 4, 4, 2), main = NULL)

Arguments

dm

The output of summarise.by.length. A data.frame, the columns will be read lengths, the rows will be genome position and the values counts

minlen

The minimum length of aligned read to consider

maxlen

The maximum length of aligned read to consider

start

The minimum start position to consider

end

The maximum start position to consider

scale

Whether to scale the data for each genome position

col.fun

A function that will provide colours; could be rainbow or heat.colors etc. Defaults to colorRampPalette scaling from black to red

log

Whether to log() the data first (prior to scaling)

mar

The margins for the plot. See par. A numerical vector of the form c(bottom, left, top, right) which gives the number of lines of margin to be specified on the four sides of the plot.

main

A title for the plot

Value

A heatmap is drawn on the current graphical device

Author(s)

Mick Watson <mick.watson@roslin.ed.ac.uk>

Examples

1
2
3
4
5
6
7
8
9
 ## Not run: infile <- system.file("data/SRR389184_vs_SINV_sorted.bam", package="viRome")
 ## Not run: bam <- read.bam(bamfile=infile, chr="SINV", start=1, end=11703, removeN=TRUE)
 ## Not run: bamc <- clip.bam(bam)
## Not run: dm <- summarise.by.length(bamc)
## Not run: dmp <- summarise.by.length(bamc, strand="pos")
## Not run: dmn <- summarise.by.length(bamc, strand="neg")

## Not run: size.position.heatmap(dm)
## Not run: size.position.heatmap(dm, log=TRUE, scale=FALSE)

mw55309/viRome_legacy documentation built on Dec. 21, 2021, 11:05 p.m.