Example #1
0
 def test_pslx_row_to_pysam_duplication(self):
     reference = {
         '14':
         MockObject(seq=MockLongString(
             'TTCTTCCATGCCCCCTAATCATGGCCACATTGTATCAGCCTGAGCATGAGCAACAGCACCATGGCCACATACGGGAATGGGCCTCATTGGTGTAATATTTGGCAGATTCTCTCCACACCCCCCGTGGCGGTCTGGCTTACTGTTAAGAAGGGTAACCTTAAAAAATACATTTCCCACTCCAGAAAATACTCATATGTGGCCTGTTAGCAGCACAAGAAGGGTGAAAGCAATGCCCATTCCTGCCTCCCTCCCCCTGCTCACCTCCACGTCCCTGTTTGCCCCTTTGTAGGTGAAGTGAGTATATTCAGCGTCTTCATGGCAGGGGAGAGGGTGTATTAATCCGTCTATGTCCGCTGGAAAGGCAGTCTCTGAGCGGGCCACAAGGGTTCAGCCATGGCCCATCCAATAACCTTTTTGATGACTTGGATGAAGAGACAAACATTCCAACCACATTCAAAGATCCAGACCTCCAAAGTGTGGCTCATTTGGTAGATAATGGAATTATATTTGGAAAGCATTTCCCGCAGCTGGGATGATGGGTCAAAAACAGATAGCATTTTACCAGATCATATTTGTGTGTGTGTGTGTGCGCGCGTGTGTGTGTGTGTGTGTGTGTGTTTTAAATTCAGTTTCCCAACTACAGGATG',
             offset=73014463,
         ))
     }
     pslx_row = {
         'block_count': 2,
         'tstarts': [73014606, 73014747],
         'block_sizes': [141, 30],
         'qname': '',
         'tname': '14',
         'qstarts': [0, 239],
         'strand': '+',
         'qseq_full':
         'AAGAAGGGTAACCTTAAAAAATACATTTCCCACTCCAGAAAATACTCATATGTGGCCTGTTAGCAGCACAAGAAGGGTGAAAGCAATGCCCATTCCTGCCTCCCTCCCCCTGCTCACCTCCACGTCCCTGTTTGCCCCTTTACTCATATGTGGCCTGTTAGCAGCACAAGAAGGGTGAAAGCAATGCCCATTCCTGCCTCCCTCCCCCTGCTCACCTCCACGTCCCTGTTTGCCCCTTTGTAGGTGAAGTGAGTATATTCAGCGTCTTC',
         'score': 1,
     }
     read2 = Blat.pslx_row_to_pysam(pslx_row, self.cache, reference)
     self.assertEqual(13, read2.reference_id)
     self.assertEqual(73014606, read2.reference_start)
     self.assertEqual([(CIGAR.M, 141), (CIGAR.I, 98), (CIGAR.M, 30)],
                      _cigar.convert_for_igv(read2.cigar))
     self.assertEqual(Interval(0,
                               len(pslx_row['qseq_full']) - 1),
                      query_coverage_interval(read2))
Example #2
0
 def test_convert_for_igv(self):
     c = [(CIGAR.M, 10), (CIGAR.EQ, 10), (CIGAR.X, 10)]
     self.assertEqual([(CIGAR.M, 30)], convert_for_igv(c))
Example #3
0
 def test_convert_for_igv(self):
     c = [(CIGAR.M, 10), (CIGAR.EQ, 10), (CIGAR.X, 10)]
     assert convert_for_igv(c) == [(CIGAR.M, 30)]