One-to-many:
taxon ---> node
---> node
---> sequence
---> sequence
One-to-one:
node ---> taxon
One-to-one:
sequence ---> taxon
####
my @nodes = $taxon->get_nodes;
my @sequences = $taxon->get_sequences;
my $taxon = $node->get_taxon;
$taxon = $sequence->get_taxon;
##
##
$node->set_taxon( $taxon );
##
##
sub set_taxon {
my ( $node, $taxon ) = @_;
$node->{'_taxon'} = $taxon;
# check if taxon already knows about me
for my $known ( $taxon->get_nodes ) {
return $node if $known == $node;
}
$taxon->add_node( $node );
return $node;
}