[Bioc-devel] phred qualities

Kasper Daniel Hansen kasperdanielhansen at gmail.com
Wed Jun 27 17:02:10 CEST 2012


Phred qualities are usually presented as ascii-encode numbers with an
offset of either 32 or 64.  Some packages returns this as a
BStringSet.  I can convert a character vector "charvec" to a list of
integers using code like
  sapply(charvec, function(xx) charToRaw(xx) - 33L)

Do we have fast(er) ways of doing this, when charvec is really long
and not necessarily with the same number of chars in each string?  I
am thinking of implementing the sapply() above in C (directly
vectorizing it), but surely someone has done something like that
somewhere.

Kasper



More information about the Bioc-devel mailing list