plotHeatmapByGene: plot methylation heatmap by genes

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/heatmapByChromosome.R

Description

plot methylation heatmap by genes

Usage

1
2
3
4
plotHeatmapByGene(selGene, genoSet,  phenoData = NULL, sortBy=c(NA, 'phenoData', 'data'), includeGeneBody = FALSE, 
	sortByTx = FALSE, CpGInfo = NULL, genomicFeature = NULL, phenoColor = list(gradient=c("green", "black", "red")),
	title.suffix = NULL, addLegend = TRUE, genoSetLegendTitle = NULL, gradient = c("blue", "white", "red"), 
	ncolor = 16, main = NULL, newPlot = TRUE, ylim = NULL, ...)

Arguments

selGene

a Entrez Gene ID

genoSet

a GenoSet object or a list of GenoSet objects

phenoData

a data.frame for phenotype information

sortBy

whether to sort samples based on the phenoData, cluster of genoSet data or NA (no sorting)

includeGeneBody

if FALSE, then only shows the promoter region

sortByTx

if TRUE, sort the genoset columns based on Gene Model track. (only valid when the genoset column names are matching transcript IDs.)

CpGInfo

a bed file or GRanges for CpG island information

genomicFeature

used by buildAnnotationTracks function

phenoColor

a list of colors corresponding to phenotype

title.suffix

a string attached to the end of the title

addLegend

whether to add a legend or not

genoSetLegendTitle

title for methylation colorbar legend

gradient

the gradient color to show the DataTrack

ncolor

the number of color levels

main

title of the plot. If it is null, then the Gene Symbol will be the plot title

newPlot

whether to create a new plot or add it to previous plot

ylim

ylim for the genoSet data, which is also used for plotting the legend.

...

other parameters used by heatmapByChromosome

Details

Function, plotHeatmapByGene, is specifically designed for the methylation data. It plots one gene or genomic range each time. Users can add phenotypes or matched gene expression data to the right panel of the plot. Figure legends can be also added. By default, the plotHeatmapByGene plots methylation Beta-values (in the range of 0 to 1) instead of M-values. Users can set useBetaValue as FALSE if they want to change to M-values.

Value

returns the grid viewport information

Author(s)

Pan Du

See Also

See also heatmapByChromosome

Examples

1
2
3
4
5
6
data('exampleMethyGenoSet') 
if (require(TxDb.Hsapiens.UCSC.hg19.knownGene)) {
  genomicFeature <- 'TxDb.Hsapiens.UCSC.hg19.knownGene'
  selGene <- '1826'
  plotHeatmapByGene(selGene, genoSet=exampleMethyGenoSet, phenoData=colData(exampleMethyGenoSet), genomicFeature=genomicFeature)
}

methyAnalysis documentation built on Nov. 8, 2020, 8:09 p.m.