[BioRuby] Bioruby PhyloXML: method for iterating to the next tree, without returning anything
Christian M Zmasek
czmasek at burnham.org
Mon Jun 15 16:57:01 UTC 2009
Hi, Diana:
I think this is a good idea.
Although, it will only be useful if the order of the trees is known
beforehand (i.e. you know you want the 5th tree).
Something to think about (if you have enough time): Since trees in
phyloxml can have names and/or ids -- what about having the parser
return trees with a matching name/id? E.g. from a file with 100 trees
return those named "erk gene tree".
Great work!
Christian
Diana Jaunzeikare wrote:
> Hi all,
>
> Now I have a method next_tree which parses the phylogeny element and
> all its sub elements and returns a tree. I propose to have a method
> for iterating to the next tree (maybe call it skip_tree), without
> actually parsing it, but advancing the libxml reader to the next
> phylogeny element.
>
> The reason I think this might be useful is because, for example, in my
> unit tests I work with one tree at a time. To get to specific tree I
> call next_tree several times, but don't use any of the returned data.
> Maybe other people also will need such functionality. Having a method
> skip_tree would make the process faster since it would not actually
> parse the elements and would not create objects.
>
> What do you think?
>
> Diana
More information about the BioRuby
mailing list