[BioC] shortread base quality

Martin Morgan mtmorgan at fhcrc.org
Mon Aug 27 17:37:54 CEST 2012


On 08/27/2012 07:53 AM, David Vilanova wrote:
> Excellent Martin,
> Works well.
>
> One quick question, my scores range from -29 to 8. This is normally an
> illumina 1.9 format (as detected by fastqc program) .
> Is there a quick way to ckeck within shortread which encoding has been
> used by shortRead and which version of illumina was recognized (like
> what fastqc does).

the class of quality(rfq) reflects the encoding ShortRead decided on, 
FastqQuality or SFastqQuality. Clearly wrong for your file. The 
heuristic is like

                 alf <- alphabetFrequency(head(quality, 1000),
                   collapse = TRUE)
                 if (any(alf) && min(which(alf != 0)) < 59) {
                   FastqQuality
                 } else SFastqQuality

Martin

>
> On 08/27/2012 03:44 PM, Martin Morgan wrote:
>> q = quality(rfq)
>> w = width(q)
>> m = matrix(NA_integer_, length(q), max(width(q)))
>> for (i in seq(min(w), max(w)))
>>     m[w==i, 1:i] = as(q[w==i], "matrix")
>


-- 
Computational Biology / Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N.
PO Box 19024 Seattle, WA 98109

Location: Arnold Building M1 B861
Phone: (206) 667-2793



More information about the Bioconductor mailing list