Description Usage Arguments Details Value Author(s) References See Also Examples
Function to extract integer Phred score values from FastQ data.
1 | intPhred(x, method="Sanger", returnType="list")
|
x |
object of class |
method |
string; one of 'Sanger', 'Solexa' or 'previousSolexa'. See details below. |
returnType |
string; in which format should the result be returned, either as a 'list' or as a 'matrix'. |
There are different standards for encoding read qualities in Fastq files. The 'Sanger' format encodes a Phred quality score from 0 to 93 using ASCII 33 to 126. The current 'Solexa'/llumina format (1.3 and higher) encodes a Phred quality score from 0 to 40 using ASCII 64 to 104. The 'previous Solexa'/Illumina format (1.0) encodes a custom Solexa/Illumina quality score from -5 to 40 using ASCII 59 to 104. This custom Solexa quality score is approximately equal to the Phred scores for high qualities, but differs in the low quality range.
If returnType
is equal to ‘list’:
A list of integer Phred quality values of the same length as the
number of reads in the object x
.
If returnType
is equal to ‘matrix’:
A matrix of integer Phred quality values. The number of rows is the
number of reads in the object x
. The number of columns is the
maximum length (width) over all reads in object x
. The last
entries for reads that are shorter than this maximum width are
'NA'.
Joern Toedling
http://maq.sourceforge.net/fastq.shtml
1 2 3 4 5 6 7 8 9 | exDir <- system.file("extdata", package="girafe")
ra <- readFastq(dirPath=exDir, pattern=
"aravinSRNA_23_plus_adapter_excerpt.fastq")
ra.quals <- intPhred(ra, method="Sanger",
returnType="matrix")
ra.qmed <- apply(ra.quals, 2, median)
if (interactive())
plot(ra.qmed, type="h", ylim=c(0,42), xlab="Base postion",
ylab="Median Phred Quality Score", lwd=2, col="steelblue")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.