Import samtools 'pileup' files.
Import files created by evaluation of samtools' pileup -cv
command.
readPileup(file, ...) ## S4 method for signature 'connection' readPileup(file, ..., variant=c("SNP", "indel", "all"))
file |
The file name, or
|
... |
Additional arguments, passed to methods. For instance,
specify |
variant |
Type of variant to parse; select one. |
readPileup
returns a GRanges
object.
The value returned by variant="SNP"
or variant="all"
contains:
The chromosome names (fastq ids) of the reference sequence
The nucleotide position (base 1) of the variant.
The nucleotide in the reference sequence.
The consensus nucleotide, as determined by samtools pileup.
The phred-scaled consensus quality.
The phred-scaled SNP quality (probability of the consensus being identical to the reference).
The root mean square mapping quality of reads overlapping the site.
The number of reads covering the site.
The value returned by variant="indel"
contains space, position,
reference, consensus, consensusQuality, snpQuality, maxMappingQuality,
and coverage fields, and:
The first (typically, in the reference sequence) and second allelic variants.
The number of reads supporting each allele.
The number of additional indels present.
Sean Davis
fl <- system.file("extdata", "pileup.txt", package="Rsamtools", mustWork=TRUE) (res <- readPileup(fl)) xtabs(~referenceBase + consensusBase, mcols(res))[DNA_BASES,] ## Not run: ## uses a pipe, and arguments passed to read.table ## three successive piles of 100 records each cmd <- "samtools pileup -cvf human_b36_female.fa.gz na19240_3M.bam" p <- pipe(cmd, "r") snp <- readPileup(p, nrow=100) # variant="SNP" indel <- readPileup(p, nrow=100, variant="indel") all <- readPileup(p, nrow=100, variant="all") ## End(Not run)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.