subtree corresponding to ev.etype
2
0
Entering edit mode
8.1 years ago

Hello,

I tried to extract the orthologs and paralogs based on get_my_evol_events(). One of my speciation node (#7, for example), i.e one inferred as ev.etype =="S" contains a paralog in a deeper node. The out_seq generates a list that includes all the species of node #7. Instead, is there a way to extract corresponding subtree of node #7 and further process it for split by duplication ?. Can anyone suggest a way to achieve this ?

Thanks in advance.

Arun

ETEtoolkit python2.7 subtree • 1.7k views
ADD COMMENT
0
Entering edit mode
8.1 years ago
Brice Sarver ★ 3.8k

You can do this in R using extract.clade() in the ape package. More here.

In Python, you can use the DendroPy library.

ADD COMMENT
0
Entering edit mode
8.1 years ago
jhc ★ 3.0k

the event instance obtained when calling 'get_my_evol_events()' or 'get_descendant_evol_events' contains a pointer to the corresponding internal node:

an example based on the tutorial:

from ete3 import PhyloTree
nw = "((Dme_001,Dme_002),(((Cfa_001,Mms_001),((Hsa_001,Ptr_001),Mmu_001)),(Ptr_002,(Hsa_002,Mmu_002))));"
t = PhyloTree(nw)
events = t.get_descendant_evol_events()
for ev in events: 
  print ev.etype
  print ev.node
  print ev.node.write()
ADD COMMENT

Login before adding your answer.

Traffic: 1665 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6