Ejemplo n.º 1
0
def test_msa_from_lines__two_entries_with_meta():
    lines = [">seq1", "ACG", ">seq2 Second meta", "TGA"]
    expected = MSA(
        [FASTA("seq1", None, "ACG"),
         FASTA("seq2", "Second meta", "TGA")])
    result = MSA.from_lines(lines)
    assert_equal(result, expected)
Ejemplo n.º 2
0
def test_msa_from_lines__empty_name():
    MSA.from_lines([">", "ACG", ">seq1", "TGAN"])
Ejemplo n.º 3
0
def test_msa_from_lines__mismatched_lengths():
    MSA.from_lines([">seq1", "ACG", ">seq2", "TGAN"])
Ejemplo n.º 4
0
def test_msa_from_lines__duplicate_names():
    MSA.from_lines([">seq1", "ACG", ">seq1", "TGA"])
Ejemplo n.º 5
0
def test_msa_from_lines__two_entries_with_meta():
    lines = [">seq1", "ACG", ">seq2 Second meta", "TGA"]
    expected = MSA([FASTA("seq1", None, "ACG"),
                    FASTA("seq2", "Second meta", "TGA")])
    result = MSA.from_lines(lines)
    assert_equal(result, expected)
Ejemplo n.º 6
0
def test_msa_from_lines__single_entry_with_meta():
    lines = [">seq1 Meta info", "ACG"]
    expected = MSA([FASTA("seq1", "Meta info", "ACG")])
    result = MSA.from_lines(lines)
    assert_equal(result, expected)
Ejemplo n.º 7
0
def test_msa_from_lines__single_entry():
    lines = [">seq1", "ACG"]
    result = MSA([FASTA("seq1", None, "ACG")])
    assert_equal(MSA.from_lines(lines), result)
Ejemplo n.º 8
0
def test_msa_from_lines__empty_name():
    MSA.from_lines([">", "ACG", ">seq1", "TGAN"])
Ejemplo n.º 9
0
def test_msa_from_lines__mismatched_lengths():
    MSA.from_lines([">seq1", "ACG", ">seq2", "TGAN"])
Ejemplo n.º 10
0
def test_msa_from_lines__duplicate_names():
    MSA.from_lines([">seq1", "ACG", ">seq1", "TGA"])
Ejemplo n.º 11
0
def test_msa_from_lines__single_entry_with_meta():
    lines = [">seq1 Meta info", "ACG"]
    expected = MSA([FASTA("seq1", "Meta info", "ACG")])
    result = MSA.from_lines(lines)
    assert_equal(result, expected)
Ejemplo n.º 12
0
def test_msa_from_lines__single_entry():
    lines = [">seq1", "ACG"]
    result = MSA([FASTA("seq1", None, "ACG")])
    assert_equal(MSA.from_lines(lines), result)
Ejemplo n.º 13
0
def test_msa_from_lines__empty_name():
    with pytest.raises(FASTAError):
        MSA.from_lines([">", "ACG", ">seq1", "TGAN"])
Ejemplo n.º 14
0
def test_msa_from_lines__mismatched_lengths():
    with pytest.raises(MSAError):
        MSA.from_lines([">seq1", "ACG", ">seq2", "TGAN"])
Ejemplo n.º 15
0
def test_msa_from_lines__duplicate_names():
    with pytest.raises(MSAError):
        MSA.from_lines([">seq1", "ACG", ">seq1", "TGA"])
Ejemplo n.º 16
0
def test_msa_from_lines__two_entries():
    lines = [">seq1", "ACG", ">seq2", "TGA"]
    expected = MSA([FASTA("seq1", None, "ACG"), FASTA("seq2", None, "TGA")])
    result = MSA.from_lines(lines)
    assert result == expected