subtree corresponding to ev.etype

43 views
Skip to first unread message

Arun Prasanna

unread,
Sep 10, 2016, 8:12:17 AM9/10/16
to The ETE toolkit
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

Jaime Huerta Cepas

unread,
Sep 12, 2016, 4:40:03 AM9/12/16
to eteto...@googlegroups.com
yes, you can process the node labeled as "S" as a separate tree. For instance, you could use "node_7.write()" or "for descendant in node_7.traverse()"
Every node in a tree is another tree. 

--
You received this message because you are subscribed to the Google Groups "The ETE toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to etetoolkit+unsubscribe@googlegroups.com.
To post to this group, send email to eteto...@googlegroups.com.
Visit this group at https://groups.google.com/group/etetoolkit.
For more options, visit https://groups.google.com/d/optout.

Arun Prasanna

unread,
Sep 20, 2016, 8:10:41 AM9/20/16
to The ETE toolkit
Hi,
"for descendant in node_7.traverse():" It does return the corresponding subtree. But when I further want to process it "for get_my_evol_events"  to mark for duplication, I get error with node must have more than 1 child. I am still unable to detect deep paralog. 

For more clarity, please find attached an image, where I was able to obtain the circled subtree as an "S" type through "get_my_evol_events". However, it has a deep paralog. I intend to leave out one of them and pick the node with more species (leave out 850, retain 557, 7147) which is more of a python problem. 

for ev in events:
   
if ev.etype == "S":
       
print 'ORTHOLOGY RELATIONSHIP:', ','.join(ev.out_seqs)
       
for descendant in ev.node.traverse():
           
print "descendant is:", descendant      
            subevent
= descendant.get_my_evol_events()
           
for subev in subevent:
               
if subev.etype =="D":
                     
print "Deep Paralog event:", ','.join(subev.in_seqs), "<==>", ','.join(subev.out_seqs)

What is the reason for error? Please give your suggestions.
Thanks,
Arun


On Monday, September 12, 2016 at 10:40:03 AM UTC+2, Jaime wrote:
yes, you can process the node labeled as "S" as a separate tree. For instance, you could use "node_7.write()" or "for descendant in node_7.traverse()"
Every node in a tree is another tree. 
On 10 September 2016 at 14:12, Arun Prasanna <arunpra...@gmail.com> wrote:
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

--
You received this message because you are subscribed to the Google Groups "The ETE toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to etetoolkit+...@googlegroups.com.
IMG_3528.JPG

Jaime Huerta Cepas

unread,
Sep 21, 2016, 4:09:47 AM9/21/16
to eteto...@googlegroups.com
Hi Arun, 
the deep paralogy relationship shown in your image (Ompol1->Cylto1) does not look as a paralogy to me. I would call it a many-to-one orthology relationship.

To unsubscribe from this group and stop receiving emails from it, send an email to etetoolkit+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages