Last data update: 2014.03.03

R: Heatmap for meta-region profiles
heatMetaR Documentation

Heatmap for meta-region profiles

Description

Function calculates meta-profile(s) from a ScoreMatrix or a ScoreMatrixList, then produces a heatmap or a set of stacked heatmaps for meta-region profiles

Usage

heatMeta(mat, centralTend = "mean", profile.names = NULL, xcoords = NULL,
  col = NULL, meta.rescale = FALSE, winsorize = c(0, 100),
  legend.name = NULL, cex.legend = 1, xlab = NULL, main = "",
  cex.lab = 1, cex.axis = 1)

Arguments

mat

ScoreMatrix or ScoreMatrixList to be plotted

centralTend

a character that determines central tendency of meta-profile(s). It takes "mean" (default) or "median".

profile.names

a character vector for names of profiles. If NULL, the names will be taken from names(mat) if mat is a ScoreMatrixList object.

xcoords

a vector of numbers showing relative positions of the bases or windows. It must match the number of columns in the ScoreMatrix For example: if there are 2001 elements in the matrices which are base-pair resolution and they are centered around an anchor point like TSS, the xcoords argument should be -1000:1000. This argument is used to plot accurate x-axis labels for the plots.If NULL it will be equal to 1:ncol(mat).

col

a vector of color pallete. color scheme to be used. If NULL, a version of jet colors will be used.

meta.rescale

if TRUE meta-region profiles are scaled to 0 to 1 range by subracting the min from profiles and dividing them by max-min.

winsorize

Numeric vector of two, defaults to c(0,100). This vector determines the upper and lower percentile values to limit the extreme values. For example, c(0,99) will limit the values to only 99th percentile, everything above the 99 percentile will be equalized to the value of 99th percentile. This is useful for visualization of matrices that have outliers.

legend.name

a character label plotted next to the legend

cex.legend

A numerical value giving the amount by which legend axis marks should be magnified relative to the default

xlab

label a character string for x-axis

main

a character string for the plot title

cex.lab

A numerical value giving the amount by which axis labels (including 'legend.name') should be magnified relative to the default.

cex.axis

A numerical value giving the amount by which axis marks should be magnified relative to the default

Value

returns meta-profile matrix invisibly.

Examples

data(cage)
 data(promoters)
 scores1=ScoreMatrix(target=cage,windows=promoters,strand.aware=TRUE)
 data(cpgi)
 scores2=ScoreMatrix(target=cpgi,windows=promoters,strand.aware=TRUE)

 x=new("ScoreMatrixList",list(scores1,scores2))
 
 heatMeta(mat=x,legend.name="fg",cex.legend=0.8,main="fdf",cex.lab=6,
          cex.axis=0.9)
 

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(genomation)
Loading required package: grid
> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/genomation/heatMeta.Rd_%03d_medium.png", width=480, height=480)
> ### Name: heatMeta
> ### Title: Heatmap for meta-region profiles
> ### Aliases: heatMeta
> 
> ### ** Examples
> 
> data(cage)
>  data(promoters)
>  scores1=ScoreMatrix(target=cage,windows=promoters,strand.aware=TRUE)
>  data(cpgi)
>  scores2=ScoreMatrix(target=cpgi,windows=promoters,strand.aware=TRUE)
> 
>  x=new("ScoreMatrixList",list(scores1,scores2))
>  ## No test: 
>  heatMeta(mat=x,legend.name="fg",cex.legend=0.8,main="fdf",cex.lab=6,
+           cex.axis=0.9)
>  
> ## End(No test)
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>