Description Usage Arguments Details Value Author(s) Examples
View source: R/plotCorrelation.R
plot PCA or heatmap for multiple bamfiles. The correlation is calculated by the counts in promoter regions.
1 2 3 4 5 6 7 8 9 |
objs |
an object of GAlignmentsList |
txs |
GRanges of transcripts |
seqlev |
A vector of characters indicates the sequence levels. |
upstream |
numeric(1) or integer(1). Start position of promoter. Default is 2000 |
downstream |
numeric(1) or integer(1). End position of promoter. Default is 500 |
type |
Figure type, heatmap or PCA plot. |
... |
parameters could be passed to downstream functions such as plot for pca or heatmap for heatmap. |
The correlation will be calculated by the correlation of insertion sites within promoter regions. Even the sequencing is paired-end, please treat it as single ends.
A invisible object of GRanges with counts
Jianhong Ou
1 2 3 4 5 6 7 8 9 10 11 12 | library(GenomicRanges)
library(GenomicAlignments)
path <- system.file("extdata", package="ATACseqQC", mustWork=TRUE)
bamfiles <- dir(path, "*.bam$", full.name=TRUE)
gals <- lapply(bamfiles, function(bamfile){
readBamFile(bamFile=bamfile, tag=character(0),
which=GRanges("chr1", IRanges(1, 1e6)),
asMates=FALSE)
})
library(TxDb.Hsapiens.UCSC.hg19.knownGene)
txs <- transcripts(TxDb.Hsapiens.UCSC.hg19.knownGene)
plotCorrelation(GAlignmentsList(gals), txs, seqlev="chr1")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.