countAllelesFromBam: alleleCounts from bam file

Description Usage Arguments Details Author(s) Examples

Description

count alleles before creating ASEse.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
countAllelesFromBam(gr, ...)

## S4 method for signature 'GRanges'
countAllelesFromBam(
  gr,
  pathToDir,
  flag = NULL,
  scanBamFlag = NULL,
  return.class = "array",
  verbose = TRUE,
  ...
)

Arguments

gr

GRanges that contains SNPs of interest

...

arguments to pass on

pathToDir

path to directory of bam files

flag

specify one flag to use as filter, default is no filtering. allowed flags are 99, 147, 83 and 163

scanBamFlag

set a custom flag to use as filter

return.class

type of class for the returned object

verbose

makes funciton more talkative

Details

counts the alleles in a bam file based on GRanges positions.

Important excerpt from the details section of the internal applyPileups function: Regardless of 'param' values, the algorithm follows samtools by excluding reads flagged as unmapped, secondary, duplicate, or failing quality control.

Author(s)

Jesper R. Gadin

Examples

1
2
3
4
5
6
data(GRvariants)
gr <- GRvariants

##not run at the moment
#pathToDir <- system.file('inst/extdata/ERP000101_subset', package='AllelicImbalance')
#ar <- countAllelesFromBam(gr, pathToDir)

AllelicImbalance documentation built on Nov. 8, 2020, 6:52 p.m.