summaryrefslogtreecommitdiff
path: root/examples/phylogenies/tree_reconciliation.py
diff options
context:
space:
mode:
Diffstat (limited to 'examples/phylogenies/tree_reconciliation.py')
-rw-r--r--examples/phylogenies/tree_reconciliation.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/examples/phylogenies/tree_reconciliation.py b/examples/phylogenies/tree_reconciliation.py
index 58122ec..e24f162 100644
--- a/examples/phylogenies/tree_reconciliation.py
+++ b/examples/phylogenies/tree_reconciliation.py
@@ -7,7 +7,7 @@ gene_tree_nw = '((Dme_001,Dme_002),(((Cfa_001,Mms_001),((Hsa_001,Ptr_001),Mmu_00
species_tree_nw = "((((Hsa, Ptr), Mmu), (Mms, Cfa)), Dme);"
genetree = PhyloTree(gene_tree_nw)
sptree = PhyloTree(species_tree_nw)
-print genetree
+print(genetree)
# /-Dme_001
# /--------|
# | \-Dme_002
@@ -32,14 +32,14 @@ print genetree
recon_tree, events = genetree.reconcile(sptree)
# a new "reconcilied tree" is returned. As well as the list of
# inferred events.
-print "Orthology and Paralogy relationships:"
+print("Orthology and Paralogy relationships:")
for ev in events:
if ev.etype == "S":
- print 'ORTHOLOGY RELATIONSHIP:', ','.join(ev.inparalogs), "<====>", ','.join(ev.orthologs)
+ print('ORTHOLOGY RELATIONSHIP:', ','.join(ev.inparalogs), "<====>", ','.join(ev.orthologs))
elif ev.etype == "D":
- print 'PARALOGY RELATIONSHIP:', ','.join(ev.inparalogs), "<====>", ','.join(ev.outparalogs)
+ print('PARALOGY RELATIONSHIP:', ','.join(ev.inparalogs), "<====>", ','.join(ev.outparalogs))
# And we can explore the resulting reconciled tree
-print recon_tree
+print(recon_tree)
# You will notice how the reconcilied tree is the same as the gene
# tree with some added branches. They are inferred gene losses.
#