def test_linked_adapter(): linked_adapter = LinkedAdapter('AAAA', 'TTTT') sequence = Sequence(name='seq', sequence='AAAACCCCCTTTT') match = linked_adapter.match_to(sequence) trimmed = linked_adapter.trimmed(match) assert trimmed.name == 'seq' assert trimmed.sequence == 'CCCCC'
def test_linked_matches_property(): """Accessing matches property of non-anchored linked adapters""" # Issue #265 front_adapter = FrontAdapter("GGG") back_adapter = BackAdapter("TTT") la = LinkedAdapter(front_adapter, back_adapter, front_required=False, back_required=False, name='name') assert la.match_to("AAAATTTT").matches == 3
def test_issue_265(): """Crash when accessing the matches property of non-anchored linked adapters""" s = Sequence('name', 'AAAATTTT') front_adapter = Adapter('GGG', where=Where.FRONT) back_adapter = Adapter('TTT', where=Where.BACK) la = LinkedAdapter(front_adapter, back_adapter, front_required=False, back_required=False, name='name') assert la.match_to(s).matches == 3
def test_issue_265(): """Crash when accessing the matches property of non-anchored linked adapters""" s = Sequence('name', 'AAAATTTT') front_adapter = SingleAdapter('GGG', where=Where.FRONT) back_adapter = SingleAdapter('TTT', where=Where.BACK) la = LinkedAdapter(front_adapter, back_adapter, front_required=False, back_required=False, name='name') assert la.match_to(s).matches == 3
def test_issue_265(): """Crash when accessing the matches property of non-anchored linked adapters""" s = Sequence('name', 'AAAATTTT') la = LinkedAdapter('GGG', 'TTT', front_restriction=None, back_restriction=None) assert la.match_to(s).matches == 3
def test_linked_adapter(): linked_adapter = LinkedAdapter('AAAA', 'TTTT', min_overlap=4) assert linked_adapter.front_adapter.min_overlap == 4 assert linked_adapter.back_adapter.min_overlap == 4 sequence = Sequence(name='seq', sequence='AAAACCCCCTTTT') trimmed = linked_adapter.match_to(sequence).trimmed() assert trimmed.name == 'seq' assert trimmed.sequence == 'CCCCC'
def test_linked_adapter(): front_adapter = PrefixAdapter('AAAA', min_overlap=4) back_adapter = BackAdapter('TTTT', min_overlap=3) linked_adapter = LinkedAdapter( front_adapter, back_adapter, front_required=True, back_required=False, name='name') assert linked_adapter.front_adapter.min_overlap == 4 assert linked_adapter.back_adapter.min_overlap == 3 read = Sequence(name='seq', sequence='AAAACCCCCTTTT') trimmed = linked_adapter.match_to(read.sequence).trimmed(read) assert trimmed.name == 'seq' assert trimmed.sequence == 'CCCCC'
def test_linked_adapter(): front_adapter = Adapter('AAAA', where=Where.PREFIX, min_overlap=4) back_adapter = Adapter('TTTT', where=Where.BACK, min_overlap=3) linked_adapter = LinkedAdapter( front_adapter, back_adapter, front_required=True, back_required=False, name='name') assert linked_adapter.front_adapter.min_overlap == 4 assert linked_adapter.back_adapter.min_overlap == 3 sequence = Sequence(name='seq', sequence='AAAACCCCCTTTT') trimmed = linked_adapter.match_to(sequence).trimmed() assert trimmed.name == 'seq' assert trimmed.sequence == 'CCCCC'
def test_linked_adapter(): front_adapter = SingleAdapter('AAAA', where=Where.PREFIX, min_overlap=4) back_adapter = SingleAdapter('TTTT', where=Where.BACK, min_overlap=3) linked_adapter = LinkedAdapter( front_adapter, back_adapter, front_required=True, back_required=False, name='name') assert linked_adapter.front_adapter.min_overlap == 4 assert linked_adapter.back_adapter.min_overlap == 3 sequence = Sequence(name='seq', sequence='AAAACCCCCTTTT') trimmed = linked_adapter.match_to(sequence).trimmed() assert trimmed.name == 'seq' assert trimmed.sequence == 'CCCCC'