Description Usage Arguments Value Author(s) Examples
Converts FASTQ quality scores encoded as ASCII characters to numeric probability that base was correctly called.
1 |
x |
a vector of quality scores represented as ASCII characters from
|
phred.scale |
scale of PHRED encoding. Can be :
|
simplify |
if there is only one set of quality scores, simplify resulting list to a vector? |
List of probabilities that each base represented by the characters in
x
was correctly called. List has one element for each set of
quality scores in x
.
Eric Archer eric.archer@noaa.gov
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | # each element is a single quality score
quality.1 <- sapply(sample(33:126, 15, rep = TRUE), intToUtf8)
prob.1 <- qual2prob(quality.1)
quality.1
prob.1
# each element is a string of quality scores
quality.2 <- replicate(5, {
num.sites <- sample(5:10, 1)
chars <- sapply(sample(33:126, num.sites, rep = TRUE), intToUtf8)
paste(chars, collapse = "")
}, simplify = "vector")
prob.2 <- qual2prob(quality.2)
quality.2
prob.2
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.