pileupGRangesAsVariantTable: Mismatch summary

Description Usage Arguments Details Value Author(s) Examples

View source: R/pileup.R

Description

Compare to reference genome and compute mismatch summary for certain region of reads.

Usage

1
pileupGRangesAsVariantTable(gr, genome, DNABases=c("A", "C", "G", "T", "N"))

Arguments

gr

A GRanges object, with nucleotides summary, each base take one column in elementMetadata or user can simply passed the returned result from pileupAsGRanges function to this function.

genome

BSgenome object, need to be the reference genome.

DNABases

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.

Details

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.

Value

A GRanges object. Containing the following elementMetadata

Author(s)

Michael Lawrence, Tengfei Yin

Examples

 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)

biovizBase documentation built on Nov. 8, 2020, 8:01 p.m.