|
#!/usr/local/bin/perl -w
n_tests(4);
my $apph = get_readonly_apph();
stmt_ok;
my $t = $apph ->get_term({ acc =>3677});
stmt_note( "got term " . $t ->description. "\n" );
stmt_ok;
my $graph = $apph ->get_graph( $t ->acc, 3);
$graph ->to_text_output;
stmt_note( "Graph has nodes :" . $graph ->node_count);
stmt_ok;
my $n = 0;
my @nodes = (3677);
while ( @nodes ) {
$n ++;
my $node = shift @nodes ;
my @children = map { $_ ->{acc}} @{ $graph ->get_child_terms( $node )};
stmt_note( "node:$node has " . join ( ";" , @children ). " as children\n" );
push ( @nodes , map { $_ ->{acc}} @{ $graph ->get_child_terms( $node )});
}
$apph ->disconnect;
stmt_ok;
|