+ def _format_flowcell_id(self):
+ """
+ Return formatted flowcell ID
+ """
+ return self.flowcell_id+"_"
+
+ def _convert_illumina_quality(self, illumina_quality):
+ """
+ Convert an Illumina ASCII encoded quality score to a Phred ASCII quality score.
+ """
+ # Illumina scores are Phred + 64
+ # Fastq scores are Phread + 33
+ # the following code grabs the string, converts to short ints and
+ # subtracts 31 (64-33) to convert between the two score formats.
+ # The numpy solution is twice as fast as some of my other
+ # ideas for the conversion.
+ # sorry about the uglyness in changing from character, to 8-bit int
+ # and back to a character array
+ quality = numpy.asarray(illumina_quality,'c')
+ quality.dtype = numpy.uint8
+ quality -= 31
+ quality.dtype = '|S1' # I'd like to know what the real numpy char type is
+ return quality
+