Learn R Programming

rbamtools (version 2.16.17)

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

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.

Arguments

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).

%

Examples

Run this code
# NOT RUN {
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
# }

Run the code above in your browser using DataLab