def test_checkalignment_arg_maxgaps(self): # check maxgaps argument (proportion of internal gaps) # check with good alignment res = atools.checkAlignment(test_alignment, maxgaps=0.5, minoverlap=1, minlen=1, logger=self.logger) self.assertTrue(res) # check with bad alignment # this sequence has a large internal gap covering # 50% of the alignment bad_seq = '-A' * 50 bad_seq = SeqRecord(Seq(bad_seq), id='bad') bad_alignment = test_alignment[:] bad_alignment.append(bad_seq) res = atools.checkAlignment(bad_alignment, maxgaps=0.1, minoverlap=50, minlen=1, logger=self.logger) self.assertFalse(res)
def test_checkalignment_arg_minoverlap(self): # check minoverlap argument (minimum number of # overlapping nucleotides) # bad seq has a large external gap -- the first 51 # nucleotides are missing bad_seq = '-' * 51 + 'A' * 49 bad_seq = SeqRecord(Seq(bad_seq), id='bad') bad_alignment = test_alignment[:] bad_alignment.append(bad_seq) res = atools.checkAlignment(bad_alignment, maxgaps=0.5, minoverlap=50, minlen=1, logger=self.logger) self.assertFalse(res)
def test_checkalignment_arg_minlen(self): # check minlen argument res = atools.checkAlignment(test_alignment, maxgaps=0.5, minoverlap=1, minlen=101, logger=self.logger) self.assertFalse(res)