[Bioperl-l] Deep recursion on subroutine

Jonathan Arthur jarthur at med.usyd.edu.au
Wed Nov 30 17:39:41 EST 2005


Hello Qunfeng,

I have not seen this specifically with bioperl, but have had it occur 
once or twice in my own code and have always traced the problem back to 
an error in the tree where one node is its own ancestor, thereby causing 
an infinite recursion when you attempt to find all descendants from that 
node.

If each node has a unique identifier, and if the tree is not too large, 
you could find the offedning node with a small script to traverse the 
tree, testing the unique identifer of each node against a list of all 
the nodes seen before and dying when it sees offending node again.

Cheers,

Jonathan

Qunfeng wrote:

> Hi,
>
> I am using bioperl (5.8.0, linux) to work on a UPGMA tree (newick 
> format, generated by PHYLIP).  My code works well on a small tree. 
> However, when I applied it to a big (ugly) tree, it produces the 
> following error msg. Has anybody encountered a similar problem? Is 
> this triggered by any invalid part of my tree? Thanks!
>
> Qunfeng
> ===========Error message begins =====================
> Deep recursion on subroutine "Bio::Tree::NodeI::get_all_Descendents" 
> at /usr/lib/perl5/site_perl/5.8.0/Bio/Tree/NodeI.pm line 172, <GEN0> 
> line 1.
> Deep recursion on subroutine "Bio::Tree::NodeI::get_all_Descendents" 
> at /usr/lib/perl5/site_perl/5.8.0/Bio/Tree/NodeI.pm line 172, <GEN0> 
> line 1.
> Deep recursion on subroutine "Bio::Tree::NodeI::get_all_Descendents" 
> at /usr/lib/perl5/site_perl/5.8.0/Bio/Tree/NodeI.pm line 172, <GEN0> 
> line 1.
> Deep recursion on subroutine "Bio::Tree::NodeI::get_all_Descendents" 
> at /usr/lib/perl5/site_perl/5.8.0/Bio/Tree/NodeI.pm line 172, <GEN0> 
> line 1.
> Deep recursion on subroutine "Bio::Tree::NodeI::get_all_Descendents" 
> at /usr/lib/perl5/site_perl/5.8.0/Bio/Tree/NodeI.pm line 172, <GEN0> 
> line 1.
> Deep recursion on subroutine "Bio::Tree::NodeI::get_all_Descendents" 
> at /usr/lib/perl5/site_perl/5.8.0/Bio/Tree/NodeI.pm line 172, <GEN0> 
> line 1.
> Deep recursion on subroutine "Bio::Tree::NodeI::get_all_Descendents" 
> at /usr/lib/perl5/site_perl/5.8.0/Bio/Tree/NodeI.pm line 172, <GEN0> 
> line 1.
> Deep recursion on subroutine "Bio::Tree::NodeI::get_all_Descendents" 
> at /usr/lib/perl5/site_perl/5.8.0/Bio/Tree/NodeI.pm line 172, <GEN0> 
> line 1.
> Deep recursion on subroutine "Bio::Tree::NodeI::get_all_Descendents" 
> at /usr/lib/perl5/site_perl/5.8.0/Bio/Tree/NodeI.pm line 172, <GEN0> 
> line 1.
> Deep recursion on subroutine "Bio::Tree::NodeI::get_all_Descendents" 
> at /usr/lib/perl5/site_perl/5.8.0/Bio/Tree/NodeI.pm line 172, <GEN0> 
> line 1.
> Deep recursion on subroutine "Bio::Tree::Node::each_Descendent" at 
> /usr/lib/perl5/site_perl/5.8.0/Bio/Tree/Node.pm line 495, <GEN0> line 1.
> Deep recursion on subroutine "Bio::Tree::Node::height" at 
> /usr/lib/perl5/site_perl/5.8.0/Bio/Tree/Node.pm line 201, <GEN0> line 1.
> Deep recursion on subroutine "Bio::Tree::Node::height" at 
> /usr/lib/perl5/site_perl/5.8.0/Bio/Tree/Node.pm line 201, <GEN0> line 1.
> Deep recursion on subroutine "Bio::Tree::Node::height" at 
> /usr/lib/perl5/site_perl/5.8.0/Bio/Tree/Node.pm line 496, <GEN0> line 1.
> Deep recursion on subroutine "Bio::Tree::Node::height" at 
> /usr/lib/perl5/site_perl/5.8.0/Bio/Tree/Node.pm line 496, <GEN0> line 1.
> Deep recursion on subroutine "Bio::Tree::Node::each_Descendent" at 
> /usr/lib/perl5/site_perl/5.8.0/Bio/Tree/Node.pm line 495, <GEN0> line 1.
> Deep recursion on subroutine "Bio::Tree::Node::height" at 
> /usr/lib/perl5/site_perl/5.8.0/Bio/Tree/Node.pm line 201, <GEN0> line 1.
> Deep recursion on subroutine "Bio::Tree::Node::height" at 
> /usr/lib/perl5/site_perl/5.8.0/Bio/Tree/Node.pm line 201, <GEN0> line 1.
> Deep recursion on subroutine "Bio::Tree::Node::height" at 
> /usr/lib/perl5/site_perl/5.8.0/Bio/Tree/Node.pm line 496, <GEN0> line 1.
> Deep recursion on subroutine "Bio::Tree::Node::height" at 
> /usr/lib/perl5/site_perl/5.8.0/Bio/Tree/Node.pm line 496, <GEN0> line 1.
> Deep recursion on subroutine "Bio::Tree::Node::each_Descendent" at 
> /usr/lib/perl5/site_perl/5.8.0/Bio/Tree/Node.pm line 495, <GEN0> line 1.
> Deep recursion on subroutine "Bio::Tree::Node::height" at 
> /usr/lib/perl5/site_perl/5.8.0/Bio/Tree/Node.pm line 201, <GEN0> line 1.
> Deep recursion on subroutine "Bio::Tree::Node::height" at 
> /usr/lib/perl5/site_perl/5.8.0/Bio/Tree/Node.pm line 201, <GEN0> line 1.
> Deep recursion on subroutine "Bio::Tree::Node::height" at 
> /usr/lib/perl5/site_perl/5.8.0/Bio/Tree/Node.pm line 496, <GEN0> line 1.
> Deep recursion on subroutine "Bio::Tree::Node::height" at 
> /usr/lib/perl5/site_perl/5.8.0/Bio/Tree/Node.pm line 496, <GEN0> line 1.
> Deep recursion on subroutine "Bio::Tree::Node::each_Descendent" at 
> /usr/lib/perl5/site_perl/5.8.0/Bio/Tree/Node.pm line 495, <GEN0> line 1.
> Deep recursion on subroutine "Bio::Tree::Node::height" at 
> /usr/lib/perl5/site_perl/5.8.0/Bio/Tree/Node.pm line 201, <GEN0> line 1.
> Deep recursion on subroutine "Bio::Tree::Node::height" at 
> /usr/lib/perl5/site_perl/5.8.0/Bio/Tree/Node.pm line 201, <GEN0> line 1.
> Deep recursion on subroutine "Bio::Tree::Node::height" at 
> /usr/lib/perl5/site_perl/5.8.0/Bio/Tree/Node.pm line 496, <GEN0> line 1.
> Deep recursion on subroutine "Bio::Tree::Node::height" at 
> /usr/lib/perl5/site_perl/5.8.0/Bio/Tree/Node.pm line 496, <GEN0> line 1.
> Deep recursion on subroutine "Bio::Tree::Node::each_Descendent" at 
> /usr/lib/perl5/site_perl/5.8.0/Bio/Tree/Node.pm line 495, <GEN0> line 1.
> Deep recursion on subroutine "Bio::Tree::Node::height" at 
> /usr/lib/perl5/site_perl/5.8.0/Bio/Tree/Node.pm line 201, <GEN0> line 1.
> Deep recursion on subroutine "Bio::Tree::Node::height" at 
> /usr/lib/perl5/site_perl/5.8.0/Bio/Tree/Node.pm line 201, <GEN0> line 1.
> Deep recursion on subroutine "Bio::Tree::Node::height" at 
> /usr/lib/perl5/site_perl/5.8.0/Bio/Tree/Node.pm line 496, <GEN0> line 1.
> Deep recursion on subroutine "Bio::Tree::Node::height" at 
> /usr/lib/perl5/site_perl/5.8.0/Bio/Tree/Node.pm line 496, <GEN0> line 1.
> Deep recursion on subroutine "Bio::Tree::NodeI::get_all_Descendents" 
> at /usr/lib/perl5/site_perl/5.8.0/Bio/Tree/NodeI.pm line 172, <GEN0> 
> line 1.
> Deep recursion on subroutine "Bio::Tree::NodeI::get_all_Descendents" 
> at /usr/lib/perl5/site_perl/5.8.0/Bio/Tree/NodeI.pm line 172, <GEN0> 
> line 1.
> Deep recursion on subroutine "Bio::Tree::NodeI::get_all_Descendents" 
> at /usr/lib/perl5/site_perl/5.8.0/Bio/Tree/NodeI.pm line 172, <GEN0> 
> line 1.
> Deep recursion on subroutine "Bio::Tree::NodeI::get_all_Descendents" 
> at /usr/lib/perl5/site_perl/5.8.0/Bio/Tree/NodeI.pm line 172, <GEN0> 
> line 1.
> Deep recursion on subroutine "Bio::Tree::NodeI::get_all_Descendents" 
> at /usr/lib/perl5/site_perl/5.8.0/Bio/Tree/NodeI.pm line 172, <GEN0> 
> line 1.
> Deep recursion on subroutine "Bio::Tree::NodeI::get_all_Descendents" 
> at /usr/lib/perl5/site_perl/5.8.0/Bio/Tree/NodeI.pm line 172, <GEN0> 
> line 1.
> Deep recursion on subroutine "Bio::Tree::NodeI::get_all_Descendents" 
> at /usr/lib/perl5/site_perl/5.8.0/Bio/Tree/NodeI.pm line 172, <GEN0> 
> line 1.
> Deep recursion on subroutine "Bio::Tree::NodeI::get_all_Descendents" 
> at /usr/lib/perl5/site_perl/5.8.0/Bio/Tree/NodeI.pm line 172, <GEN0> 
> line 1.
> Deep recursion on subroutine "Bio::Tree::NodeI::get_all_Descendents" 
> at /usr/lib/perl5/site_perl/5.8.0/Bio/Tree/NodeI.pm line 172, <GEN0> 
> line 1.
> Deep recursion on subroutine "Bio::Tree::NodeI::get_all_Descendents" 
> at /usr/lib/perl5/site_perl/5.8.0/Bio/Tree/NodeI.pm line 172, <GEN0> 
> line 1.
> Deep recursion on subroutine "Bio::Root::Root::DESTROY" at 
> /usr/lib/perl5/site_perl/5.8.0/Bio/Root/Root.pm line 407, <GEN0> line 1.
> Deep recursion on subroutine "Bio::Root::Root::DESTROY" at 
> /usr/lib/perl5/site_perl/5.8.0/Bio/Root/Root.pm line 407, <GEN0> line 1.
> Deep recursion on subroutine "Bio::Root::Root::DESTROY" at 
> /usr/lib/perl5/site_perl/5.8.0/Bio/Root/Root.pm line 407, <GEN0> line 1.
> Deep recursion on subroutine "Bio::Root::Root::DESTROY" at 
> /usr/lib/perl5/site_perl/5.8.0/Bio/Root/Root.pm line 407, <GEN0> line 1.
> Deep recursion on subroutine "Bio::Root::Root::DESTROY" at 
> /usr/lib/perl5/site_perl/5.8.0/Bio/Root/Root.pm line 407, <GEN0> line 1.
> Deep recursion on subroutine "Bio::Root::Root::DESTROY" at 
> /usr/lib/perl5/site_perl/5.8.0/Bio/Root/Root.pm line 407, <GEN0> line 1.
> Deep recursion on subroutine "Bio::Root::Root::DESTROY" at 
> /usr/lib/perl5/site_perl/5.8.0/Bio/Root/Root.pm line 407, <GEN0> line 1.
> Deep recursion on subroutine "Bio::Root::Root::DESTROY" at 
> /usr/lib/perl5/site_perl/5.8.0/Bio/Root/Root.pm line 407, <GEN0> line 1.
> Deep recursion on subroutine "Bio::Root::Root::DESTROY" at 
> /usr/lib/perl5/site_perl/5.8.0/Bio/Root/Root.pm line 407, <GEN0> line 1.
> Deep recursion on subroutine "Bio::Root::Root::DESTROY" at 
> /usr/lib/perl5/site_perl/5.8.0/Bio/Root/Root.pm line 407, <GEN0> line 1.
> Deep recursion on subroutine "Bio::Root::Root::DESTROY" at 
> /usr/lib/perl5/site_perl/5.8.0/Bio/Root/Root.pm line 407, <GEN0> line 1.
> Deep recursion on subroutine "Bio::Root::Root::DESTROY" at 
> /usr/lib/perl5/site_perl/5.8.0/Bio/Root/Root.pm line 407, <GEN0> line 1.
> =========Error msg ends==============================================
>
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at portal.open-bio.org
> http://portal.open-bio.org/mailman/listinfo/bioperl-l



-- 
Dr Jonathan Arthur
Sesqui Lecturer in Bioinformatics
Central Clinical School, Faculty of Medicine and SUBIT
Medical Foundation Building, K25
University of Sydney
Ph: +61 2 9036 3132
Email: jarthur at med.usyd.edu.au




More information about the Bioperl-l mailing list