rangeByGeneName {spliceSites} | R Documentation

## Reads a bamRange object for a given `bamReader`, `refGenome` and gene name.

### Description

Locates gene in genome via `refGenome` and reads a `bamRange` from the determined region.

### Usage

    rangeByGeneName(reader,genome,gene,complex=TRUE)

### Arguments

`reader` | Object of class (rbamtools) `bamReader`. The reader must pass `isOpen` and `index.initialized` test.
`genome` | Object of class (refgenome) `refGenome`.
`gene` | Single gene name (character)
`complex` | Logical. Passed to 'bamRange' function. When TRUE, only aligns with nCigar>1 are counted.

### Value

bamRange

### Author(s)

Wolfgang Kaisers

### Examples

    bam<-system.file("extdata","rna_fem.bam",package="spliceSites")
    reader<-bamReader(bam,idx=TRUE)
    ucf<-system.file("extdata","uc_small.RData",package="spliceSites")
    uc<-loadGenome(ucf)
    range<-rangeByGeneName(reader,uc,"WASH7P")
    size(range)

[Package spliceSites version 1.30.0 Index]