metagenePlot | R Documentation |
Bar plot for distance to features
metagenePlot(
peaks,
AnnotationData,
PeakLocForDistance = c("middle", "start", "end"),
FeatureLocForDistance = c("TSS", "middle", "geneEnd"),
upstream = 1e+05,
downstream = 1e+05
)
peaks |
peak list, GRanges object or a GRangesList. |
AnnotationData |
A GRanges object or a TxDb object. |
PeakLocForDistance |
Specify the location of peak for calculating distance,i.e., middle means using middle of the peak to calculate distance to feature, start means using start of the peak to calculate the distance to feature. To be compatible with previous version, by default using start |
FeatureLocForDistance |
Specify the location of feature for calculating distance,i.e., middle means using middle of the feature to calculate distance of peak to feature, TSS means using start of feature when feature is on plus strand and using end of feature when feature is on minus strand, geneEnd means using end of feature when feature is on plus strand and using start of feature when feature is on minus strand. |
upstream , downstream |
numeric(1). Upstream or downstream region of features to plot. |
the bar heatmap is indicates the peaks around features.
path <- system.file("extdata", package="ChIPpeakAnno")
files <- dir(path, "broadPeak")
peaks <- sapply(file.path(path, files), toGRanges, format="broadPeak")
peaks <- GRangesList(peaks)
names(peaks) <- sub(".broadPeak", "", basename(names(peaks)))
library(TxDb.Hsapiens.UCSC.hg19.knownGene)
metagenePlot(peaks, TxDb.Hsapiens.UCSC.hg19.knownGene)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.