def setUp(self): self.cigar_text = '3D2M3D6MDM2D3MD' self.aln_seq = DNA.makeSequence('---AA---GCTTAG-A--CCT-') self.aln_seq1 = DNA.makeSequence('CCAAAAAA---TAGT-GGC--G') self.map, self.seq = self.aln_seq.parseOutGaps() self.map1, self.seq1 = self.aln_seq1.parseOutGaps() self.slices = [(1, 4), (0, 8), (7, 12), (0, 1), (3, 5)] self.aln = LoadSeqs(data = {"FAKE01": self.aln_seq, "FAKE02": self.aln_seq1}) self.cigars = {"FAKE01": self.cigar_text, "FAKE02": map_to_cigar(self.map1)} self.seqs = {"FAKE01": str(self.seq), "FAKE02": str(self.seq1)}
def test_map_to_cigar(self): """convert a Map to cigar string""" assert map_to_cigar(self.map) == self.cigar_text