def setUp(self): self.cigar_text = "3D2M3D6MDM2D3MD" self.aln_seq = DNA.make_seq("---AA---GCTTAG-A--CCT-") self.aln_seq1 = DNA.make_seq("CCAAAAAA---TAGT-GGC--G") self.map, self.seq = self.aln_seq.parse_out_gaps() self.map1, self.seq1 = self.aln_seq1.parse_out_gaps() self.slices = [(1, 4), (0, 8), (7, 12), (0, 1), (3, 5)] self.aln = make_aligned_seqs( {"FAKE01": self.aln_seq, "FAKE02": self.aln_seq1}, array_align=False ) 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