diff --git a/perl/lib/AmiGO/WebApp/HTMLClient.pm b/perl/lib/AmiGO/WebApp/HTMLClient.pm index 9d2c626d..155de856 100644 --- a/perl/lib/AmiGO/WebApp/HTMLClient.pm +++ b/perl/lib/AmiGO/WebApp/HTMLClient.pm @@ -1588,6 +1588,24 @@ sub mode_term_details { #$self->set_template_parameter('NEIGHBORHOOD_INFO', Dumper($nay_info)); $self->set_template_parameter('NEIGHBORHOOD_INFO', $nay_info); + ### + ### Taxon constraints. + ### + + my $tc = []; + foreach my $parent (@{$nay_info->{parents}}){ + if( $parent->{acc} =~ /^NCBITaxon/ ){ + push @$tc, + { + taxon_rel_acc => $parent->{rel}, + taxon_name => $parent->{name}, + taxon_acc => $parent->{acc}, + taxon_link => $parent->{link} + }; + } + } + $self->set_template_parameter('TAXON_CONSTRAINTS', $tc); + ### ### Bridge variables from old system. ### diff --git a/templates/html/bs3/common/term_details_main.tmpl b/templates/html/bs3/common/term_details_main.tmpl index 2376e643..4785b0ae 100644 --- a/templates/html/bs3/common/term_details_main.tmpl +++ b/templates/html/bs3/common/term_details_main.tmpl @@ -118,6 +118,27 @@ title="See term history.">history for [% TERM_INFO.acc %] at QuickGO [% END %] + +
Taxon info
+ [% IF TAXON_CONSTRAINTS.size == 0 %] +
None
+ [% ELSE %] + [% FOREACH xtrain = TAXON_CONSTRAINTS %] +
+ [% IF xtrain.taxon_rel_acc == 'RO:0002160' %] + only in taxon + [% ELSIF xtrain.taxon_rel_acc == 'RO:0002161' %] + never in taxon + [% ELSIF xtrain.taxon_rel_acc == 'RO:0002162' %] + in taxon + [% ELSE %] + [% xtrain.taxon_rel_acc %] + [% END %] + [% xtrain.taxon_name %] +
+ [% END %] + [% END %] +
Subset
[% IF TERM_INFO.subsets.size != 0 %]