Commit 3be7639c authored by Blake Sweeney's avatar Blake Sweeney
Browse files

Initial version of GO annotation table

This is the initial version of the GO annotation table. This does not
yet handle cases where there is no data or the data fails to load. This
only deals with showing data.
parent d631f5b7
......@@ -32,10 +32,10 @@ angular.module("routes", []).service('routes', ['$interpolate', function($interp
'&hlpretag=<span class=text-search-highlights>' +
ebiAutocomplete: '{{ query }}&format=json'
ebiAutocomplete: '{{ query }}&format=json',
apiGoTermsView: '/api/v1/rna/{{ upi }}/go-annotations/{{ taxid }}',
apiGoTermsView: '/api/v1/rna/{{ upi }}/go-annotations/{{ taxid }}';
// apply $interpolate to each route template expression
return Object.keys(routes)
<p>A table of GO annotations</p>
<table class="table table-hover table-condensed" id="go-annotations">
<th>GO Term</th>
<th>Evidence Code</th>
<tr ng-repeat="annotation in $ctrl.go_annotations">
<td>{{ annotation.qualifier }}</td>
<td><a href="{{ annotation.go_term_id }}">{{ annotation.go_term_name }}</a></td>
<td><a href="{{ annotation.evidence_code_id }}">{{ annotation.evidence_code_name }}</a></td>
<td>{{ annotation.assigned_by }}</td>
var go_annotations = {
bindings: {
upi: '=',
taxid: '=',
controller: ['$http', 'routes', function($http, routes) {
var ctrl = this;
ctrl.$onInit = function() {
function(response) {
ctrl.go_terms =;
function(response) {
ctrl.error = "Failed to fetch GO annotations";
ctrl.fetchGoTerms = function() {
return $http.get(
routes.apiGoTermsView({ upi: ctrl.upi, taxid: ctrl.taxid }),
{ timeout: 5000 }
templateUrl: '/static/js/components/sequence/go_annotations/go_annotations.html'
angular.module("rnaSequence").component("go_annotations", go_annotations);
......@@ -185,6 +185,7 @@ limitations under the License.
<script src="{% static "js/components/sequence/xrefs/xrefs.component.js" %}"></script>
<script src="{% static "js/components/sequence/xrefs/xref-publications/xref-publications.component.js" %}"></script>
<script src="{% static "js/components/sequence/2d/2d.component.js" %}"></script>
<script src="{% static "js/components/sequence/go-annotations/go_annotations.component.js" %}"></script>
<script src="{% static "js/components/sequence-search/" %}"></script>
......@@ -187,6 +187,12 @@ limitations under the License.
<h2>Go Annotations</h2>
<go-annotations upi="upi" taxid="taxid"></go-annotations>
Rfam classification
......@@ -365,10 +371,6 @@ limitations under the License.
<secondary-structures upi="upi" taxid="taxid" show-secondary-structure-tab="show2dTab()"></secondary-structures>
<uib-tab index="3" heading="GO Annotations" id="go-annotations" deselect="checkTab($event, $selectedIndex)">
<go-annotations upi="upi" taxid="taxid"></go-annotations>
<uib-tab index="3" class="dropdown pull-right hidden-xs">
<span uib-dropdown>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment