nucStats: Table nucleotides in whole BAM file(s)

Description Usage Arguments Value Author(s) Examples

Description

The function counts occurrence of the Nucleotides A,C,G,T for whole BAM file from bamReader object or a list of BAM files. Letters different from A,C,G,T are subsumed in the value N. The function returns a data.frame with 8 columns. The names indicate which position contains the count value each nucleotide. The function also calculates GC-content and AT/GC ratio which make up the last two columns. The returned data.frame contains one row for each reference sequence (when used for bamReader) or one row for each given BAM file name.

Usage

1
nucStats(object,...)

Arguments

object

bamReader object. The reader must be opened and have initialized index.

...

Optional name for BAM-index files (argument name=idxInfiles).

Value

data.frame

Author(s)

Wolfgang Kaisers

Examples

1
2
3
4
5
6
7
8
bam<-system.file("extdata","accepted_hits.bam",package="rbamtools")
nucStats(bam)
idx<- system.file("extdata", "accepted_hits.bam.bai", package="rbamtools")
nucStats(bam,idxInfiles=idx)
reader<-bamReader(bam,idx=TRUE)
nucStats(reader)
range<-bamRange(reader,c(0,0,14000))
nucStats(range)

wokai/rbamtools documentation built on May 28, 2017, 5:12 a.m.