geneAlignDepth-class: Class '"geneAlignDepth"': Align-depth data for single genes...

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

Description

Objects of this class combine data from geneModel and from sampleBamFiles objects allowing to read BAM alings for gene defined regions from multiple BAM files. geneAlignDepth object contain an Align depth matrix which can be visualized using a generic plot function.

Objects from the Class

Objects can be created by calls of the form getgeneAlignDepth(gesa, gm) .

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.

ald

"matrix": Matrix containing alignment depth data.

gapSites

"data.frame": Align gap sites data from genetic region.

ev

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

gene_id:

"character": Gene identifier (e.g. Ensembl or UCSC).

gene_name:

"character": Gene name.

seq_name:

"character": Reference sequence (chromosome) name.

strand:

"character": Strand orientation of gene on reference sequence (+, - or *)

coords:

"numeric": Gene coordinates (i.e. start and end position).

Methods

show

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

geneAlignDepth

signature(object=c("sampleBamFiles", "geneModel": Constructs geneAlignDepth object and reads align depth data from BAM files.

plot

signature(object="geneAlignDepth"): Plots align depth data.

Author(s)

Wolfgang Kaisers

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
## - - - - - - - - - - - - - - - - - - - - - - ##
# Construct sampleBamFiles object
bam<-system.file("extdata", "accepted_hits.bam", package="rbamtools")
bs <-sampleBamFiles(1)
bamFiles(bs) <- bam
sampleLabels(bs) <- "s1"
sampleGroups(bs) <- "g1"
checkBamFiles(bs)
nAligns(bs) <- bamCountAll(bs)
bs
## - - - - - - - - - - - - - - - - - - - - - - ##
# Construct geneModel object
library(refGenome)
ucfile<-system.file("extdata", "hs.ucsc.small.RData", package="refGenome")
uc<-loadGenome(ucfile)
gt <- getGeneTable(uc)
gene_id <- as.character(gt$gene_id[1])
gm <- geneModel(uc, gene_id)
## - - - - - - - - - - - - - - - - - - - - - - ##
# Construct geneAlignDepth object
gad <- geneAlignDepth(bs, gm)
plot(gad, col="gray50")

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