Description Usage Arguments Details Value Author(s) Examples
This function summarize reads from bam files for nucleotides on single base unit in a given region, this allows the downstream mismatch summary analysis.
1 | pileupAsGRanges(bams, regions, DNABases=c("A", "C", "G", "T", "N"), ...)
|
bams |
A character which specify the bam file path. |
regions |
A GRanges object specifying the region to be
summarized. This passed to |
DNABases |
Nucleotide type you want to summarize in the result and in specified order. It must be one or more of A,C,G,T,N. |
... |
Extra parameters passed to |
It's a wrapper around applyPileup
function in Rsamtools
package, more detailed control could be found under manual of
ApplyPileupsParam function in Rsamtools. pileupAsGRanges
function
return a GRanges object which including summary of nucleotides,
depth, bam file path. This object could be read directly into
pileupGRangesAsVariantTable
function for mismatch
summary.
A GRanges object, each row is one single base unit. and
elementMetadata contains summary about this position about all
nucleotides specified by DNABases. and depth
for total
reads, bam
for file path.
Michael Lawrence, Tengfei Yin
1 2 3 4 5 6 7 8 9 10 11 | ## Not run:
library(Rsamtools)
data(genesymbol)
library(BSgenome.Hsapiens.UCSC.hg19)
bamfile <- system.file("extdata", "SRR027894subRBM17.bam", package="biovizBase")
test <- pileupAsGRanges(bamfile, region = genesymbol["RBM17"])
test.match <- pileupGRangesAsVariantTable(test, Hsapiens)
head(test[,-7])
head(test.match[,-5])
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.