import-bcf {AllelicImbalance} | R Documentation

## Import Bcf Selection

### Description

Imports a selection of a bcf file or files specified by a GenomicRanges object as search area.

### Usage

    impBcfGRL(UserDir, ...)

    ## S4 method for signature 'character'
    impBcfGRL(UserDir, searchArea = NULL,
      verbose = TRUE, ...)

    impBcfGR(UserDir, ...)

    ## S4 method for signature 'character'
    impBcfGR(UserDir, searchArea = NULL,
      verbose = TRUE, ...)

### Arguments

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

### Details

A wrapper to import bcf files into R in the form of GenomicRanges objects.

### Value

`BcfImpGRList` returns a GRangesList object. `BcfImpGR` returns one GRanges object of all unique entries from one or more bcf files.

### Note

Make sure there is a complementary index file `*.bcf.csi` for each bcf file in `UserDir`. If there is not, then the functions `impBcfGRL` and `impBcfGR` will try to create them.

### Author(s)

Jesper R. Gadin, Lasse Folkersen

### See Also

- The impBamGRL for importing bam files

- The `getAlleleCounts` for how to get allele(SNP) counts

- The `scanForHeterozygotes` for how to find possible heterozygote positions

### Examples

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

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

    #import
    reads <- impBcfGRL(pathToFiles, searchArea, verbose=FALSE)

[Package AllelicImbalance version 1.22.0 Index]