pileupVariants: Nucleotide pileup from alignments

Description Usage Arguments Value Author(s) See Also Examples

View source: R/pileupVariants.R

Description

This is an alternative to tallyVariants for generating a VRanges from a set of alignments (BAM file) by counting the nucleotides at each position. This function uses the samtools-based applyPileups function, instead of bam_tally. Fewer dependencies, with fewer statistics (none beyond the fixed columns) available in the output.

Usage

1
2
pileupVariants(bams, genome, param = ApplyPileupsParam(), minAltDepth = 1L,
               baseOnly = TRUE, BPPARAM = defaultBPPARAM())

Arguments

bams

A vector/list of BAM files as interpreted by PileupFiles.

genome

An object that provides sequence information via getSeq.

param

A ApplyPileupsParam object that specifies the mode of iteration and various filters.

minAltDepth

Minimal alt depth to be included in the output. The default avoids outputting results for positions/alleles that show no differences.

baseOnly

Whether to drop records with “N” in either the ref or alt.

BPPARAM

Not yet supported.

Value

A VRanges object with read depth information for each position, allele, and sample.

Author(s)

Michael Lawrence

See Also

tallyVariants for more statistics.

Examples

1
2
3
4
5
bams <- LungCancerLines::LungCancerBamFiles()
if (requireNamespace("gmapR")) {
    param <- Rsamtools::ApplyPileupsParam(which=gmapR::TP53Which())
    pileup <- pileupVariants(bams, gmapR::TP53Genome(), param)
}

Bioconductor-mirror/VariantTools documentation built on June 1, 2017, 3:28 a.m.