예제 #1
0
def test_sequential_phy__with_flag():
    expected = \
"""2 15 S

seq1
ACGTTGATAA  CCAGG
seq2
TGCAGAGTAC  GACGT"""
    assert_equal(sequential_phy(_MSA_SHORT_SEQUENCES, add_flag = True), expected)
예제 #2
0
def test_sequential_phy__short_sequences():
    expected = \
"""2 44

seq1
ACGTTGATAA  CCAGGAGGGA  TTCGCGATTG  GTGGTAACGT  AGCC
seq2
TGCAGAGTAC  GACGTCTCCT  AGATCCTGGA  CAATTTAAAC  CGAA"""
    assert_equal(sequential_phy(_MSA_MEDIUM_SEQUENCES), expected)
예제 #3
0
def test_sequentual_phy__long_names():
    expected = \
"""2 15

A_really_long_sequence_name_th
ACGTTGATAA  CCAGG
Another_really_long_sequence_n
TGCAGAGTAC  GACGT"""
    assert_equal(sequential_phy(_MSA_LONG_NAMES), expected)
예제 #4
0
def test_sequential_phy__short_sequences():
    expected = \
"""2 44

seq1
ACGTTGATAA  CCAGGAGGGA  TTCGCGATTG  GTGGTAACGT  AGCC
seq2
TGCAGAGTAC  GACGTCTCCT  AGATCCTGGA  CAATTTAAAC  CGAA"""
    assert_equal(sequential_phy(_MSA_MEDIUM_SEQUENCES), expected)
예제 #5
0
def test_sequential_phy__with_flag():
    expected = \
"""2 15 S

seq1
ACGTTGATAA  CCAGG
seq2
TGCAGAGTAC  GACGT"""
    assert_equal(sequential_phy(_MSA_SHORT_SEQUENCES, add_flag=True), expected)
예제 #6
0
def test_sequentual_phy__long_names():
    expected = \
"""2 15

A_really_long_sequence_name_th
ACGTTGATAA  CCAGG
Another_really_long_sequence_n
TGCAGAGTAC  GACGT"""
    assert_equal(sequential_phy(_MSA_LONG_NAMES), expected)
예제 #7
0
파일: formats.py 프로젝트: CarlesV/paleomix
    def _run(self, _config, temp):
        # Read and check that MSAs share groups
        msas = [MSA.from_file(filename) for filename in sorted(self.input_files)]
        MSA.validate(*msas)

        blocks = []
        for msa in msas:
            blocks.append(sequential_phy(msa, add_flag = self._add_flag))

        with open(reroot_path(temp, self._out_phy), "w") as output:
            output.write("\n\n".join(blocks))
예제 #8
0
    def _run(self, _config, temp):
        # Read and check that MSAs share groups
        msas = [read_msa(filename) for filename in sorted(self.input_files)]
        join_msa(*msas)

        blocks = []
        for msa in msas:
            blocks.append(sequential_phy(msa, add_flag = self._add_flag))

        with open(reroot_path(temp, self._out_phy), "w") as output:
            output.write("\n\n".join(blocks))
예제 #9
0
def test_sequential_phy__multi_line_sequences():
    expected = \
"""2 140

seq1
CGGATCTGCT  CCTCCACTGG  CCACGTTTAC  TGTCCCCCAA  CCGTTCGTCC  CGACCTAGTT
ATACTTCTTA  GCAAGGTGTA  AAACCAGAGA  TTGAGGTTAT  AACGTTCCTA  ATCAGTTATT
AAATTACCGC  GCCCCGACAG
seq2
AGTTGAAGAG  GCGGAACGTT  TGTAAACCGC  GCTAACGTAG  TTCTACAACC  AGCCACCCGG
TTCGAAGGAA  CAACTGGTCG  CCATAATTAG  GCGAAACGAT  AGTGCACTAA  GGTCAGGTGC
GCCCCTGTAA  ATAATTAGAT"""
    assert_equal(sequential_phy(_MSA_LONG_SEQUENCES), expected)
예제 #10
0
def test_sequential_phy__multi_line_sequences():
    expected = \
"""2 140

seq1
CGGATCTGCT  CCTCCACTGG  CCACGTTTAC  TGTCCCCCAA  CCGTTCGTCC  CGACCTAGTT
ATACTTCTTA  GCAAGGTGTA  AAACCAGAGA  TTGAGGTTAT  AACGTTCCTA  ATCAGTTATT
AAATTACCGC  GCCCCGACAG
seq2
AGTTGAAGAG  GCGGAACGTT  TGTAAACCGC  GCTAACGTAG  TTCTACAACC  AGCCACCCGG
TTCGAAGGAA  CAACTGGTCG  CCATAATTAG  GCGAAACGAT  AGTGCACTAA  GGTCAGGTGC
GCCCCTGTAA  ATAATTAGAT"""
    assert_equal(sequential_phy(_MSA_LONG_SEQUENCES), expected)
예제 #11
0
def test_sequential_phy__different_lengths():
    _mock = flexmock(MSA).should_receive('validate').at_least.once
    sequential_phy(_MSA_MEDIUM_NAMES)
예제 #12
0
def test_sequential_phy__different_lengths():
    _mock = flexmock(MSA).should_receive('validate').at_least.once
    sequential_phy(_MSA_MEDIUM_NAMES)