Description Usage Arguments Details Value Author(s) See Also Examples
Converts the read qualities encoded in fastq formatted files into error probabilities.
1 2 | extractQuality(reads, minLength = 25, dir,
type = c("Illumina", "Sanger", "Solexa"))
|
reads |
Either the name of a fastq file or a |
minLength |
Minimum read length required. |
dir |
Directory of fastq file. |
type |
Character string indicating the format the qualities are encoded in (see Details). |
If reads
and dir
are character strings it is assumed that ‘dir/reads’ is the name
of a fastq file. Otherwise reads
should be a ShortReadQ
object in which
case dir
is ignored.
Currently three different encodings of read qualities are supported. The encoding has to be selected via the
type
argument. The supported formats are
The format currently used by Illumina (version 1.3). This is a phred score between 0 and 40 encoded as ASCII characters 64 to 104. [default]
The Sanger format uses a phred quality score between 0 and 93 encoded as ASCII characters 33 to 126.
The old Solexa format previously used by Solexa/Illumina uses a quality score between -5 and 40 encoded as ASCII characters 59 to 104.
A list with a vector of error probabilities for each read in reads
that is at least minLength
nucleotides long.
Peter Humburg
decodeQuality
, readQualitySample
1 2 3 4 5 6 7 8 9 10 11 12 | ## Not run:
## load reads from a fastq file with Sanger encoding
qualities <- extractQuality("test.fastq", dir=".", type="Sanger")
## extract error probabilities for first 25bp of each read
qualities25 <- sapply(qualities, "[", 1:25)
## plot average quality for each position
plot(rowMeans(qualities25), type='b', xlab="Read position",
ylab="Error probability")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.