Description Usage Arguments Details Value Author(s) Examples
getQualDf
takes a bamRange
and returns a data.frame
(128 rows, number of columns=length of the longest sequence in range).
getQualDf
counts occurrences for every sequence position (column) and
every phred value (row).
getQualQuantiles
takes a bamReader
and a vector of quantiles
(must be between 0 and 1) and returns a data.frame.
The data.frame contains one row for each quantile and also as many columns
as the maximum sequence length. plotQualQuant
plots the values
for quanties 0.1,0.25,0.5,0.75 and 0.9.
1 |
object |
bamRange. |
prob |
logical. When TRUE each column is divided by its sum.
The column sums are added as names attribute |
... |
(currently unused) |
Phred values are truncated by 127 (the maximum which can be represented by ASCII values). The function runs down each colum (sequence position) and returns the row index where the quantile exceeds the cumlated column values.
data.frame
Wolfgang Kaisers
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | # A) Read bamRange
bam<-system.file("extdata","accepted_hits.bam",package="rbamtools")
reader<-bamReader(bam,idx=TRUE)
coords<-as.integer(c(0,0,249250621))
range<-bamRange(reader,coords)
bamClose(reader)
# B) getQualDf
qdf<-getQualDf(range)
qdf[32:38,1:15]
qdr<-getQualDf(range,prob=TRUE)
# C) getQualQuantiles
quantiles<-c(0.1,0.25,0.5,0.75,0.9)
qt<-getQualQuantiles(range,quantiles)
# D) Plot
plotQualQuant(range)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.