Learn R Programming

ChromHeatMap (version 1.26.0)

createChrMatrix: Generate chromosome-based subset matrices from the mapped data structures generated by makeChrStrandData

Description

Given a data object from makeChrStrandData, generate a matrix containing a subset of the data from a given region of a given chromosome strand, with data binned at appropriate intervals along the chromosome. The minimum width of the binning interval is controlled using the "interval" argument, which can therefore be used to control the output resolution of the data.

Usage

createChrMatrix(data, chr, strand = c('forward','reverse','both'), subset = NULL, start=1, end, interval=ceiling((end - start)/500))

Arguments

data
A ChrStrandData object (e.g. generated by makeChrStrandData).
chr
The name of the chromosome to plot.
strand
The chromosome strand to plot (`both' indicates that both strands should be overlaid in a single heatmap).
subset
An optional numeric vector indicating which samples should be plotted.
start
The starting chromosome coordinate from which to plot.
end
The ending chromosome coordinate.
interval
The (optional) size of the data bins to use along the chromosome, in bases.

Value

A ChrStrandMatrix object suitable for use with chrHeatMap and drawMapDendro.

Details

Typically this function will not be called directly, but rather via the wrapper plotChrMap function.

Note that this function may combine data from multiple probes or genes (taking the mean) into a single chromosomal locus based on the size of the specified interval. If this happens the combined probe/gene identifiers are concatenated in the output object, separated by a semicolon.

See Also

plotChrMap, chrHeatMap, drawMapDendro, ChrStrandMatrix-class, ChrStrandData-class

Examples

Run this code
data('demo')
stranddata <- createChrMatrix( chrdata, chr=22, strand='forward', start=21925000, end=24300000 )

Run the code above in your browser using DataLab