Compare to reference genome and compute mismatch summary for certain region of reads.
A GRanges object, with nucleotides summary, each base
take one column in elementMetadata or user can simply passed the
returned result from
BSgenome object, need to be the reference genome.
Nucleotide types contained in passed GRanges object. Default is A/C/G/T/N, it tries to match the column names in elementMetadata to those default nucleotides. And treat the matched column as base names.
User need to make sure to pass the right reference genome to this function to get the right summary. This function drop the position has no reads and only keep the region with coverage in the summary. The result could be used to show stacked barchart for mismatch summary.
A GRanges object. Containing the following elementMetadata
refNucleotide in reference genome.
readNucleotide contained in the reads at particular position, if multiple nucleotide, either matched or unmatched are found, they will be summarized in different rows.
countCount for read column.
matchLogical value, whether matched to reference genome or not
bamCharacter indicate bam 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.