Last data update: 2014.03.03

R: heatmap with chromosome location as x axis
heatmapByChromosomeR Documentation

heatmap with chromosome location as x axis

Description

heatmap with chromosome location as x axis and plot together with other gene annotation information

Usage

heatmapByChromosome(genoSet, gene, annotationTracks = NULL, otherTrackList = NULL, phenoData = NULL,  
	phonoColorMap = NULL, extendRange = c(2000, 2000), includeGeneBody = TRUE, showFullModel = FALSE, sortSample = TRUE,  
	cytobandInfo = NULL, CpGInfo = NULL, genomeAxis = TRUE, dataTrackName = "Methylation Profile", lib = "org.Hs.eg.db", 
	genome = "hg19", genomicFeature = "TxDb.Hsapiens.UCSC.hg19.knownGene", gradient = c("blue", "white", "red"), 
	ncolor = 16, ylim = NULL, th = 0.99, main = "", selSample = NULL, ...)

Arguments

genoSet

a GenoSet object keeping the methylation data as the "exprs" numeric matrix in the AssayData

gene

a Entrez Gene ID, or a GRanges object to define the chromosome range of the plot.

annotationTracks

A annotation tracks list returned by buildAnnotationTracks

otherTrackList

A list of other tracks supported by plotTracks function

phenoData

a data matrix with the same number of rows or columns as the columns of genoSet.

phonoColorMap

the colormap for expression heatmap

extendRange

extended range on each side of the gene

includeGeneBody

whether to include genebody of the provided gene

showFullModel

whether to show full gene model track when includeGeneBody = FALSE

sortSample

whether to sort samples or not

cytobandInfo

cytoband information

CpGInfo

CpG-island information, GRanges or bed file are supported

genomeAxis

whether to add genome axis or not

dataTrackName

the title of the data track

lib

the Entrez annotation library

genome

genome name

genomicFeature

genomic features: "TxDb" library or object, "Mart" object

gradient

the gradient color used by data track heatmap

ncolor

the number of color levels

ylim

the range for plotting the data.

th

the quantile threshold used to remove outlier, which affects the plot color ranges.

main

the title of the plot

selSample

subset of samples for plotting. It is designed for BigMatrix, which have to extract the data at the last moment.

...

other parameters used by plotTracksWithDataTrackInfo

Details

This function plots heatmap with chromosome location as x axis and together with other gene annotation information. It is adapted based on the plotTracks function in Gviz package. Users can also provide a GRanges object to specify a plot region.

Value

returns the grid viewport layout information

Author(s)

Pan Du

See Also

plotTracks, plotTracksWithDataTrackInfo, plotMethylationHeatmapByGene

Examples


	data(exampleMethyGenoSet)
	if (require(TxDb.Hsapiens.UCSC.hg19.knownGene) && require(Gviz)) {
		## define data track
		exampleMethyGenoSet <- checkChrName(exampleMethyGenoSet)

		## build annotation tracks
		selGene <- '1826'
		annotationTracks <- buildAnnotationTracks(selGene, includeGeneBody = FALSE, genomicFeature = "TxDb.Hsapiens.UCSC.hg19.knownGene", cytobandInfo=NA, CpGInfo=NA)
		heatmapByChromosome(exampleMethyGenoSet, selGene, annotationTracks = annotationTracks)
	}

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(methyAnalysis)
Loading required package: grid
Loading required package: BiocGenerics
Loading required package: parallel

Attaching package: 'BiocGenerics'

The following objects are masked from 'package:parallel':

    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
    clusterExport, clusterMap, parApply, parCapply, parLapply,
    parLapplyLB, parRapply, parSapply, parSapplyLB

The following objects are masked from 'package:stats':

    IQR, mad, xtabs

The following objects are masked from 'package:base':

    Filter, Find, Map, Position, Reduce, anyDuplicated, append,
    as.data.frame, cbind, colnames, do.call, duplicated, eval, evalq,
    get, grep, grepl, intersect, is.unsorted, lapply, lengths, mapply,
    match, mget, order, paste, pmax, pmax.int, pmin, pmin.int, rank,
    rbind, rownames, sapply, setdiff, sort, table, tapply, union,
    unique, unsplit

Loading required package: IRanges
Loading required package: S4Vectors
Loading required package: stats4

Attaching package: 'S4Vectors'

The following objects are masked from 'package:base':

    colMeans, colSums, expand.grid, rowMeans, rowSums

Loading required package: GenomeInfoDb
Loading required package: GenomicRanges
Loading required package: Biobase
Welcome to Bioconductor

    Vignettes contain introductory material; view with
    'browseVignettes()'. To cite Bioconductor, see
    'citation("Biobase")', and for packages 'citation("pkgname")'.

Loading required package: org.Hs.eg.db
Loading required package: AnnotationDbi

Setting options('download.file.method.GEOquery'='auto')
Setting options('GEOquery.inmemory.gpl'=FALSE)
No methods found in "GenomicRanges" for requests: overlapsAny
No methods found in "genoset" for requests: rowRanges, rowRanges<-, toGenomeOrder
Warning messages:
1: multiple methods tables found for 'colMeans' 
2: multiple methods tables found for 'colSums' 
3: multiple methods tables found for 'rowMeans' 
4: multiple methods tables found for 'rowSums' 
> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/methyAnalysis/heatmapByChromosome.Rd_%03d_medium.png", width=480, height=480)
> ### Name: heatmapByChromosome
> ### Title: heatmap with chromosome location as x axis
> ### Aliases: heatmapByChromosome
> ### Keywords: methods hplot
> 
> ### ** Examples
> 
> 
> 	data(exampleMethyGenoSet)
> 	if (require(TxDb.Hsapiens.UCSC.hg19.knownGene) && require(Gviz)) {
+ 		## define data track
+ 		exampleMethyGenoSet <- checkChrName(exampleMethyGenoSet)
+ 
+ 		## build annotation tracks
+ 		selGene <- '1826'
+ 		annotationTracks <- buildAnnotationTracks(selGene, includeGeneBody = FALSE, genomicFeature = "TxDb.Hsapiens.UCSC.hg19.knownGene", cytobandInfo=NA, CpGInfo=NA)
+ 		heatmapByChromosome(exampleMethyGenoSet, selGene, annotationTracks = annotationTracks)
+ 	}
Loading required package: TxDb.Hsapiens.UCSC.hg19.knownGene
Loading required package: GenomicFeatures
Loading required package: Gviz
> 
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>