import-bam-2 {AllelicImbalance} | R Documentation

## Import Bam-2

### Description

Imports bla bal bal a specified genomic region from a bam file using a GenomicRanges object as search area.

### Usage

    impBamGRL.old(UserDir, searchArea, verbose = TRUE)

### Arguments

`UserDir` | The relative or full path of folder containing bam files.
`searchArea` | A `GenomicRanges object` that contains the regions of interest
`verbose` | Setting `verbose=TRUE` gives details of procedure during function run.

### Details

These functions are right on tahea wrappers to import bam files into R and store them into either GRanges, GAlignments or GappedAlignmentpairs objects.

It is recommended to use the impBamGAL() which takes information of gaps into account. It is also possible to use the other variants as well, but then pre-filtering becomes important keps to understand because gapped, intron-spanning reads will cause problems. This is because the GRanges objects can not handle if gaps are present and will then give a wrong result when calculating the allele (SNP) count table.

### Value

`impBamGRL` returns a GRangesList object containing the RNA-seq reads in the region defined by the `searchArea` argument. `impBamGAL` returns a list with GAlignments objects containing the RNA-seq reads in the region defined by the `searchArea` argument. `funImpBamGAPL` returns a list with GappedAlignmentPairs object containing the RNA-seq reads in the region defined by the `searchArea` argument.

### Author(s)

Jesper R. Gadin, Lasse Folkersen

### Examples

    #Declare searchArea
    searchArea <- GRanges(seqnames=c('17'), ranges=IRanges(79478301,79478361))

    #Relative or full path
    pathToFiles <- system.file('extdata/ERP000101_subset', package='AllelicImbalance')

[Package AllelicImbalance version 1.30.0 Index]