sampleBamFiles-class: Class '"sampleBamFiles"': Data on multiple BAM files from an...

Description Objects from the Class Slots Methods Author(s) Examples

Description

The object contains data on location of BAM files, experimental group assignment and number of aligns per BAM file. The align-numbers are used for normalisation when alignment depth is plotted for single genes.

Objects from the Class

Objects can be created by calls of the form bs<-sampleBamFiles(object) where object is a numeric vector of length1.

Slots

bamFiles:

"character": Location of BAM files

bamIdxFiles:

"character": Location of BAM index files

nAligns:

"numeric": Total number of alignments in each BAM file.

group:

"factor": Group assignment

label

"character": Short textual identifier for each sample.

length

"integer": Vector length for bamFiles, bamIdxFiles, nAligns, group and label.

ev

"environment": Contains additional data (e.g. group table).

Methods

show

signature(object="sampleBamFiles"): Prints a short message with some summarizing data.

bamFiles

signature(object="sampleBamFiles": Returns names of BAM files.

bamIdxFiles

signature(object="sampleBamFiles"): Returns names of BAM index files.

length

signature(object="sampleBamFiles"): Returns number of BAM files.

nAligns

signature(object="sampleBamFiles"): Returns total number of aligns in BAM files.

sampleLabels

signature(object="sampleBamFiles"): Returns sample labels for BAM files.

sampleGroups

signature(object="sampleBamFiles"): Returns group assignment for BAM files.

groupTable

signature(object="sampleBamFiles"): Returns group table (if present).

Author(s)

Wolfgang Kaisers

Examples

1
2
3
4
5
6
7
bam<-system.file("extdata", "accepted_hits.bam", package="rbamtools")
bs <- sampleBamFiles(bam)
sampleLabels(bs) <- "s1"
sampleGroups(bs) <- "g1"
checkBamFiles(bs)
nAligns(bs) <- bamCountAll(bs)
bs

Example output

Loading required package: refGenome
Loading required package: doBy
Loading required package: RSQLite
[checkBamFiles] File check ok
[checkBamFiles] 1  BAM Files OK.
[checkBamFiles] 1  RefData   OK.
[checkBamFiles] BAM + RefData content OK.
[checkBamFiles] Check OK.
An object of class "sampleBamFiles"
Number of Files : 1 
Groups          : g1 
Group table:
g1 
 1 

rbamtools documentation built on Nov. 11, 2019, 5:09 p.m.