[BioRuby] [GSoC][NeXML and RDF API] Tree with Multiple rootings.
Rutger Vos
rutgeraldo at gmail.com
Fri Jun 4 10:21:27 EDT 2010
Hi Anurag,
in practice I haven't actually seen trees with multiple rootings being
used much, so it might not be urgent that this moves to the bioruby
core. My main worry would be in picking the "right" root node to
expose to the core api. I think that it should be the node from which
all other nodes can be visited in a recursive traversal (which I
expect client code to do), as opposed to a node that has been
indicated using an XML attribute to be the root, but isn't in terms of
the actual topology that emerges from the node and edge tables.
However, I'm curious to hear other people's opinions whether a flag
(e.g. "is_root") might be added Bio::Tree::Node, and a "get_roots"
method in Bio::Tree that returns a list of roots that typically only
holds the value of the "root" attribute, but could potentially have
multiple rootings.
Rutger
On Fri, Jun 4, 2010 at 9:39 AM, Anurag Priyam <anurag08priyam at gmail.com> wrote:
> Hello all,
>
> NeXML allows for trees with multiple rootings. In the NeXML lib trees are
> represented by Bio::NeXML::Tree which inherits from Bio::Tree. This allows
> for the usage of the excellent Bio::Tree framework for manipulating NeXML
> trees. However, Bio::Tree class supports only one root node.
>
> There are a couple of functions that require the presence of a root node:
> parent, children, descendants, ancestors, lowest_common_ancestor. Now, these
> functions can take a root node as a parameter. So it is possible to extend
> the current framework to work with trees with multiple root nodes.
>
> Though this may not be required, a possibility is to add the multiple root
> functionality to Bio::Tree class itself. Currently, I am adding multiple
> root support to Bio::NeXML::Tree class. If need be we can move the
> functionality to Bio::Tree.
>
> Anything?
>
> --
> Anurag Priyam,
> 2nd Year Undergraduate,
> Department of Mechanical Engineering,
> IIT Kharagpur.
> +91-9775550642
>
--
Dr. Rutger A. Vos
School of Biological Sciences
Philip Lyle Building, Level 4
University of Reading
Reading
RG6 6BX
United Kingdom
Tel: +44 (0) 118 378 7535
http://www.nexml.org
http://rutgervos.blogspot.com
More information about the BioRuby
mailing list