コード例 #1
0
ファイル: test_alb_api.py プロジェクト: cbird808/BuddySuite
def test_order_ids2(alb_resources, hf):
    alignbuddy = alb_resources.get_one("o p n")
    Alb.rename(alignbuddy, "Mle-Panxα4", "Mle004-Panxα4")
    Alb.rename(alignbuddy, "Mle-Panxα5", "Mle05-Panxα5")
    Alb.rename(alignbuddy, "Mle-Panxα9", "aMle-PanxαBlahh")
    Alb.order_ids(alignbuddy)
    assert hf.buddy2hash(alignbuddy) == "5c1316e18205432b044101e720646cd5"
コード例 #2
0
def test_phylip_sequential_out(alb_resources, sb_resources):
    buddy = alb_resources.get_one("o d n")
    output = br.phylip_sequential_out(buddy)
    assert string2hash(output) == '0379295eb39370bdba17c848ec9a8b73'

    cloned_rec = buddy.alignments[0][3]
    buddy.alignments[0].append(cloned_rec)
    with pytest.raises(br.PhylipError):
        br.phylip_sequential_out(buddy)

    buddy = alb_resources.get_one("o d n")
    buddy = Alb.rename(buddy, "Mle", "M")
    output = br.phylip_sequential_out(buddy, relaxed=False)
    assert string2hash(output) == '830f75901a9e69a91679629613dc0a57'

    buddy = Alb.rename(buddy, "M", "Mleeeeeeeeeeeeeeeee")
    print(buddy.alignments[0])
    with pytest.raises(br.PhylipError):
        br.phylip_sequential_out(buddy, relaxed=False)

    buddy = sb_resources.get_one("d f")
    with pytest.raises(br.PhylipError):
        br.phylip_sequential_out(buddy, _type="seq")
コード例 #3
0
ファイル: test_alb_api.py プロジェクト: cbird808/BuddySuite
def test_rename_ids(key, next_hash, alb_resources, hf):
    alignbuddy = alb_resources.get_one(key)
    Alb.rename(alignbuddy, 'Panx', 'Test', 0)
    assert hf.buddy2hash(alignbuddy) == next_hash, alignbuddy.write("error_files%s%s" % (next_hash, os.path.sep))