[Biopython] phylo loop through nodes in tree

Peter Cock p.j.a.cock at googlemail.com
Tue Aug 26 14:02:03 UTC 2014


On Tue, Aug 26, 2014 at 7:42 PM,  <def87 at gmx.de> wrote:
> Hi,
>
> I am trying to do a tree traversal with the phylo package (just loop over
> every node). I have read the tree into a Newick tree object. Now the class
> docu of TreeMixin shows me the available methods: _filter_search seems to be
> what I need because it says that it's for tree traversals.

In python methods and variables starting with a single underscore
are by convention private, meaning an internal implementation
detail not intended as part of the public interface. i.e. Don't use
this ;)

I think you want the tree's .find_any(...) method which internally
does actually call the _filter_search code.

Peter


More information about the Biopython mailing list