ASEsetFromBam {AllelicImbalance} | R Documentation

## ASEset from bam file

### Description

count alleles and create an ASEset direct from bam file instead of reading into R first.

### Usage

    ASEsetFromBam(gr, ...)

    ## S4 method for signature 'GRanges'
    ASEsetFromBam(gr, pathToDir, PE = TRUE,
      flagsMinusStrand = c(83, 163), flagsPlusStrand = c(99, 147),
      strandUnknown = FALSE, ...)

### Arguments

`gr` | GenomicRanges of SNPs to create ASEset for
`...` | passed on to ASEsetFromBam function
`pathToDir` | Directory of bam files with index in same directory
`PE` | if paired end or not (default: TRUE)
`flagsMinusStrand` | flags that mark reads coming from minus strand
`flagsPlusStrand` | flags that mark reads coming from plus strand
`strandUnknown` | default: FALSE

### Details

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

### Author(s)

Jesper R. Gadin

### Examples

    data(GRvariants)
    gr <- GRvariants

    ##no execution at the moment
    #pathToDir <- system.file('inst/extdata/ERP000101_subset', package='AllelicImbalance')
    #a <- ASEsetFromBam(gr, pathToDir)

[Package AllelicImbalance version 1.22.0 Index]