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

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

Description

Objects of this class combine data from geneAlignDepth. During construction, the align depth matrix is segmentized, so that only (unified) exonic regions are represented in align depth matrix.

Objects from the Class

Objects can be created by calls of the form exonAlignDepth(sal).

Slots

ald

"matrix": Matrix containing alignment depth data.

aldRatio

"data.frame": Contains mean alignment depth and alignment-depth-ratio data. nr is the ratio between the in-place and next alignment depth. pr is the ratio between in-place and previous alignment depth.

junctions

"data.frame": Contains alignment-gap-sites which had been generated when reading geneAlignDepth data.

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

nAligns:

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

group:

"factor": Group assignment

label

"character": Short textual identifier for each sample.

Methods

show

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

exonAlignDepth

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

plot

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

aldRatio

signature(object="exonAlignDepth"): Returns data.frame containing alignment-depth-ratio data used for identification of exon junctions.

junctionSites

signature(object="exonAlignDepth"): Returns data.frame containing junction positions.

getNormFactor

signature(object="exonAlignDepth"): Returns numeric value which will be uses for plotting and groupAldMatrix and groupAldTable.

groupAldMatrix

signature(object="exonAlignDepth"): Returns matrix containing mean alignment depth values. Data for each sample is stored in one column. Data for each genomic position is stored in one row. A summarizing function f may be given (Default is mean).

groupAldTable

signature(object="exonAlignDepth"): Returns data.frame containing three columns. The first column contains genomic positions, the second position contains group assignment and the third position contains (normalized) alignment dept values. A summarizing function f may be given (Default is mean).

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
23
24
25
26
27
28
## - - - - - - - - - - - - - - - - - - - - - - ##
# 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)
## - - - - - - - - - - - - - - - - - - - - - - ##
# Extract exonAlignDepth object
ead <- exonAlignDepth(gad, ratioLim=5, infVal=1000)
ald <- aldRatio(ead)
jc <- junctionSites(ead)
getNormFactor(ead)
cead <- cutFlatAlignDepth(ead, ratio=0.1)

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