thanks! On Mon, Feb 22, 2010 at 2:57 PM, Martin Morgan <[email protected]> wrote:
> On 02/22/2010 02:36 AM, Johannes Rainer wrote: > > hi, > > > > I'm just wondering of there is a "apply" function for the classes defined > in > > the ShortRead package. > > Or is there a nice and fast way to e.g. calculate the mean Phred quality > for > > each aligned sequence? note, I can not use the as( quality( AlignedReads > ), > > "matrix" ), because the lengths of the alignments (i.e. aligned > sequences) > > differs in my data set. > > An approximate way is ?alphabetScore, which calculates the sum of the > _encodings_ (not quite quality scores) of each read. Another way is > > char2phred <- function(p) -10*log10(as.integer(charToRaw(p))) > phred = lapply(as.character(quality(quality(aln))), char2phred) > > One might also try > > lapply(quality(quality(aln)), char2phred) > > which is more memory efficient but slow. > > Martin > > > > > thanks! > > > > cheers, jo > > > > > -- > Martin Morgan > 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 > -- Johannes Rainer, PhD Bioinformatics Group, Division Molecular Pathophysiology, Biocenter, Medical University Innsbruck, Fritz-Pregl-Str 3/IV, 6020 Innsbruck, Austria and Tyrolean Cancer Research Institute Innrain 66, 6020 Innsbruck, Austria Tel.: +43 512 570485 13 Email: [email protected] [email protected] URL: http://bioinfo.i-med.ac.at [[alternative HTML version deleted]] _______________________________________________ Bioc-sig-sequencing mailing list [email protected] https://stat.ethz.ch/mailman/listinfo/bioc-sig-sequencing
