plotTracksWithDataTrackInfo {methyAnalysis} | R Documentation

## plot Tracks with additional DataTrack information added to the left of the plot

### Description

plot Tracks with additional DataTrack information added to the left of the plot

### Usage

    plotTracksWithDataTrackInfo(trackList, labels = NULL, grange2show = NULL, dataTrackName = NULL, dataInfo = NULL, dataColorMap = NULL,
    	dataInfoRange = NULL, dataBackground = gray(0.9), minHeatmapColumnWidth = 2, labelWidth = 0.1,
    	gradient = c("blue", "white", "red"), ncolor = 16, main = "", newPlot = FALSE, sizes = NULL, ...)

### Arguments

`trackList` | a list of tracks supported by `plotTracks` function
`labels` | the sample labels. By default, it will use the rownames of dataTrack. It can also be a list if there are multiple dataTracks. And the list names should be consistent with dataTrack names. Providing a subset of dataTrack labels is allowed.
`grange2show` | a GRanges to indicate the plot range
`dataTrackName` | the name of the DataTrack
`dataInfo` | a data matrix or data.frame to show the related sample information, e.g. its expression profile
`dataColorMap` | the color map to plot the dataInfo
`dataInfoRange` | the range of dataInfo to control the range of color map
`dataBackground` | the background color for the data tracks
`minHeatmapColumnWidth` | the minimum width (points) of the heatmap data column
`labelWidth` | the width of the label, which is the ratio of the entire plot width
`gradient` | the gradient color to show the DataTrack
`ncolor` | the number of color levels
`main` | the title of the plot
`newPlot` | whether to create a new plot or add it to previous plot
`sizes` | the track sizes used by plotTracks function
`...` | other parameters used by plotTracks

### Details

This function is adapted based on the `plotTracks` function in Gviz package. It adds sample labels to the heatmap dataTracks.

### Value

Grid viewport layout information

### Author(s)

Pan Du

### See Also

See Also `plotTracks`, `heatmapByChromosome`

### Examples

    	data(exampleMethyGenoSet)
    	if (require(TxDb.Hsapiens.UCSC.hg19.knownGene) && require(Gviz)) {
    		## define data track
    		exampleMethyGenoSet <- checkChrName(exampleMethyGenoSet)
    		dTrack <- DataTrack(range=suppressWarnings(as(rowRanges(exampleMethyGenoSet), 'GRanges')), data=t(exprs(exampleMethyGenoSet)),
    			chromosome='chr21', type='heatmap')

    		## build annotation tracks
    		annotationTracks <- buildAnnotationTracks('1826', includeGeneBody = FALSE, genomicFeature = "TxDb.Hsapiens.UCSC.hg19.knownGene", cytobandInfo=NA, CpGInfo=NA)
    		trackList <- c(annotationTracks, list(dTrack))
    		plotTracksWithDataTrackInfo(trackList, labels=colnames(exampleMethyGenoSet), grange2show = attr(annotationTracks, 'grange2show'))
    	}

[Package methyAnalysis version 1.22.0 Index]