Skip to content
Prev 3459 / 21312 Next

[Bioc-devel] phred qualities

On Wed, Jun 27, 2012 at 2:26 PM, Martin Morgan <mtmorgan at fhcrc.org> wrote:
Would also be nice if the as.integer(unlist(x)) knew that x is a
PhredQuality and therefore knew to subtract 33.    From the
PhredQuality docs it seems that this has already happened in the
underlying raw vector, and when you do unlist(x) it converts it back
into a BString.

....

Looking in Biostrings there is .XStringQualityToIntegerMatrix which is used in
  as(x, "matrix")
which does what I want, but assumes that all strings have equal width.

So I guess I should write something like an as(x, "list") method,
which I can do using x at ranges.  But would that conflict with the
unlist(x) command above.  Or should it have another name?

Kasper