clean
[sgn.git] / lib / SGN / Controller / Ontology.pm
blob36c38ea02db1638373bc09d57bb6c8d096b2ab42
2 package SGN::Controller::Ontology;
4 use CXGN::Chado::Cvterm;
6 use Moose;
8 BEGIN { extends 'Catalyst::Controller' };
9 with 'Catalyst::Component::ApplicationAttribute';
13 sub onto_browser : Path('/tools/onto') :Args(0) {
14 my $self = shift;
15 my $c = shift;
17 my $root_nodes = $c->config->{onto_root_namespaces};
18 my @namespaces = split ",", $root_nodes;
19 foreach my $n (@namespaces) {
20 $n =~ s/\s*(\w+)\s*\(.*\)/$1/g;
21 print STDERR "Adding node $n\n";
23 #$c->stash->{root_nodes} = $c->req->param("root_nodes");
24 $c->stash->{root_nodes} = join " ", @namespaces;
25 $c->stash->{db_name} = $c->req->param("db_name");
26 $c->stash->{expand} = $c->req->param("expand");
28 $c->stash->{template} = '/ontology/standalone.mas';