def test_removal(self): record = Record(Seq("acg-ta--")) record = record_processing.sanitise_sequence(record) assert record.seq == "ACGTA" # test modified in place record = Record(Seq("acg-ta--")) record_processing.sanitise_sequence(record) assert record.seq == "ACGTA"
def test_no_conversion_required(self): gaps = "acgtNacgtN" no_gaps = "acgtacgt" records = [Record(Seq(gaps)), Record(Seq(no_gaps))] records = [record_processing.sanitise_sequence(record) for record in records] assert len(records) == 2 assert records[0].seq == gaps.upper() assert records[1].seq == no_gaps.upper()
def test_conversion(self): for seq in ("acgtZacgtX", "acgtxacgtz", "acgtoacgtf"): record = Record(Seq(seq)) record = record_processing.sanitise_sequence(record) assert record.seq == "ACGTNACGTN"
def test_mix(self): record = Record(Seq("acg-ta-F-x")) record = record_processing.sanitise_sequence(record) assert record.seq == "ACGTANN"