Biostar Beta. Not for public use.
subtree corresponding to ev.etype
0
Entering edit mode
4.3 years ago
@arunprasanna8326938

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 • 639 views
ADD COMMENTlink
0
Entering edit mode
4.3 years ago
Brice Sarver ♦ 2.6k
@Brice Sarver13598

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

In Python, you can use the DendroPy library.

ADD COMMENTlink
0
Entering edit mode
4.3 years ago
jhc ♦ 2.8k
@jhc4370

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 COMMENTlink

Login before adding your answer.

Similar Posts
Loading Similar Posts
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.3