def test_assemble(self): sequences = ['ABCD', 'BCDE', 'CDEF', 'ABCDE', 'DEFG'] c = assemble( sequences, 3, min_edge_trim_weight=1, remap_min_exact_match=1 ) self.assertEqual(1, len(c)) self.assertEqual('ABCDEFG', c[0].seq) self.assertEqual(5, c[0].remap_score())
def test_deterministic_assembly(self): contig_sequences = set() for i in range(20): random.shuffle(self.seq) contigs = assemble(self.seq, 111, min_edge_trim_weight=3, assembly_max_paths=8, assembly_min_uniq=0.1, min_complexity=0.1) self.assertEqual(1, len(contigs)) contig_sequences.add(contigs[0].seq) self.assertEqual(1, len(contig_sequences))
def test_deterministic_assembly(self, assembly_sequences): contig_sequences = set() for i in range(20): random.shuffle(assembly_sequences) contigs = assemble( assembly_sequences, 111, min_edge_trim_weight=3, assembly_max_paths=8, assembly_min_uniq=0.1, min_complexity=0.1, ) assert len(contigs) == 1 contig_sequences.add(contigs[0].seq) assert len(contig_sequences) == 1
def test_repeat_region_assembly(self): rep = 'ABCDEF' seqs = kmers(rep + rep, len(rep)) contigs = assemble(seqs, len(rep) - 1, remap_min_exact_match=1) self.assertEqual(0, len(contigs))
def test_assemble_empty_list(self): self.assertEqual([], assemble([], 1))
def test_assemble_empty_list(self): assert assemble([], 1) == []
def test_assemble(self): sequences = ['ABCD', 'BCDE', 'CDEF', 'ABCDE', 'DEFG'] c = assemble(sequences, 3, min_edge_trim_weight=1, remap_min_exact_match=1) assert len(c) == 1 assert c[0].seq == 'ABCDEFG' assert c[0].remap_score() == 5