readMergedBamGaps {spliceSites} | R Documentation

## Reads an object of type `gapSites` using a vector of BAM file names.

### Description

The function takes a vector of BAM-file names and corresponding BAM-index file names. For each given filename, the BAM-file will be opened. The functions uses the `bamGapList` function (rbamtools) to obtain a `data.frame` from an `bamReader`. Values for 'gptm' and 'rpmg' are added. Both are rounded to the number of given digits. The function tests for open connection to BAM-file and for initialized index.

### Usage

    readMergedBamGaps(infiles,idxInfiles=paste(infiles,".bai",sep=""),digits=3)

### Arguments

`infiles` | character. Name of BAM-files to be opened.
`idxInfiles` | character. Name of corresponding BAM-index files. Default: paste(infiles,".bai",sep="")
`digits` | numeric. `gptm` and `rpmg` values will be rounded to the number of decimal places given.

### Value

gapSites

### Author(s)

Wolfgang Kaisers

### Examples

    bam<-character(2)
    bam[1]<-system.file("extdata","rna_fem.bam",package="spliceSites")
    bam[2]<-system.file("extdata","rna_mal.bam",package="spliceSites")
    mbg<-readMergedBamGaps(bam)

[Package spliceSites version 1.31.0 Index]