Beispiel #1
0
 def _parse_read_barcode(self, read):
     for barcode in self.barcodes:
         barcode_len = len(barcode)
         read_barcode = read[1][0:barcode_len]
         if seq_match(barcode, read_barcode, mismatches=self.mismatches):
             if self.write_to_header:
                 read[0] += " bcd:%s desc:%s" % (barcode,
                                                 self.barcodes[barcode])
             read[1] = read[1][barcode_len:]
             read[3] = read[3][barcode_len:]
             self.writer.write((barcode, read))
Beispiel #2
0
 def __call__(self):
     for barcode in self.barcodes:
         barcode_len = len(barcode)
         read_barcode = self.read[1][0:barcode_len]
         if seq_match(barcode, read_barcode, mismatches=self.mismatches):
             if self.write_to_header:
                 self.read[0] += " bcd:%s desc:%s" % (
                     barcode, str(self.barcodes[barcode]))
             self.read[1] = self.read[1][barcode_len:]
             self.read[3] = self.read[3][barcode_len:]
             return (barcode, self.read)
     return (None, self.read)
Beispiel #3
0
 def _parse_read_barcode(self, read):
     for barcode in self.barcodes:
         barcode_len = len(barcode)
         read_barcode = read[1][0:barcode_len]
         if seq_match(barcode, read_barcode, mismatches=self.mismatches):
             if self.write_to_header:
                 read[0] += " bcd:%s desc:%s" % (
                         barcode,
                         self.barcodes[barcode]
                         )
             read[1] = read[1][barcode_len:]
             read[3] = read[3][barcode_len:]
             self.writer.write((barcode, read))
Beispiel #4
0
 def __call__(self):
     for barcode in self.barcodes:
         barcode_len = len(barcode)
         read_barcode = self.read[1][0:barcode_len]
         if seq_match(barcode, read_barcode, mismatches=self.mismatches):
             if self.write_to_header:
                 self.read[0] += " bcd:%s desc:%s" % (
                         barcode,
                         str(self.barcodes[barcode])
                         )
             self.read[1] = self.read[1][barcode_len:]
             self.read[3] = self.read[3][barcode_len:]
             return (barcode, self.read)
     return (None, self.read)