decodeQuality {ChIPsim} | R Documentation |
These functions convert an ASCII encoded sequence of read qualities into a numeric vector of error probabilities and vice versa.
decodeQuality(quality, type = c("Illumina", "Sanger", "Solexa")) encodeQuality(quality, type = c("Illumina", "Sanger", "Solexa"))
quality |
For |
type |
Type of encoding to use. |
See extractQuality
for a description of the currently supported encodings.
Either a numeric vector of error probabilities or a character string of encoded read quality scores. Each entry in the vector corresponds to one character in the input.
Peter Humburg
## decodeQuality and encodeQualty are the inverse operations ## of each other as one might expect quality <- "IIIIIIIIIIIIICIIGIIIIGII95III6II-II0" errorProb <- decodeQuality(quality, type="Sanger") qualitySanger <- encodeQuality(errorProb, type="Sanger") all.equal(quality, qualitySanger) ## They can also be used to convert between encodings qualityIllumina <- encodeQuality(errorProb, type="Illumina")