Ejemplo n.º 1
0
    def test_invalid(self):
        dirname = 'bad'
        dirpath = self.get_data_path(dirname)
        transformer = self.get_transformer(EMPSingleEndDirFmt,
                                           BarcodeSequenceFastqIterator)
        with self.assertRaises(ValidationError):
            transformer(EMPSingleEndDirFmt(dirpath, mode='r'))

        transformer = self.get_transformer(EMPSingleEndCasavaDirFmt,
                                           EMPSingleEndDirFmt)
        with self.assertRaises(ValidationError):
            transformer(EMPSingleEndCasavaDirFmt(dirpath, 'r'))
Ejemplo n.º 2
0
 def test_emp_se_multiplexed_format_barcode_sequence_iterator(self):
     transformer1 = self.get_transformer(EMPSingleEndCasavaDirFmt,
                                         EMPSingleEndDirFmt)
     transformer2 = self.get_transformer(EMPSingleEndDirFmt,
                                         BarcodeSequenceFastqIterator)
     dirname = 'emp_multiplexed_single_end'
     dirpath = self.get_data_path(dirname)
     emp_demultiplexed = \
         transformer1(EMPSingleEndCasavaDirFmt(dirpath, mode='r'))
     bsi = transformer2(EMPSingleEndDirFmt(emp_demultiplexed, mode='r'))
     bsi = list(bsi)
     self.assertEqual(len(bsi), 250)
     self.assertEqual(bsi[0][0],
                      ('@M00176:17:000000000-A0CNA:1:1:15487:1773 1:N:0:0',
                       'TTAGGCATCTCG', '+', 'B@@FFFFFHHHH'))
     self.assertEqual(
         bsi[0][1],
         ('@M00176:17:000000000-A0CNA:1:1:15487:1773 1:N:0:0',
          'GCTTAGGGATTTTATTGTTATCAGGGTTAATCGTGCCAAGAAAAGCGGCATGGTCAATATAAC'
          'CAGTAGTGTTAACAGTCGGGAGAGGAGTGGCATTAACACCATCCTTCATGAACTTAATCCACT'
          'GTTCACCATAAACGTGACGATGAGG', '+',
          'C@CFFFFFHHFHHGIJJ?FFHEIIIIHGEIIFHGIIJHGIGBGB?DHIIJJJJCFCHIEGIGG'
          'HGFAEDCEDBCCEEA.;>?BB=288A?AB709@:3:A:C88CCD@CC444@>>34>>ACC:?C'
          'CD<CDCA>A@A>:<?B@?<((2(>?'))