Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
create GO term links for jbrowse
fmtDetailValue_Ontology_term : function(goterm) {
if (typeof goterm != 'string') {
return goterm;
}
var dbid = goterm.split(':');
var prefix = '';
switch (dbid[0]) {
case 'GO':
prefix = 'http://amigo.geneontology.org/amigo/medial_search?q=GO:';
break;
default:
return goterm;
};
return '<a href=\"'+ prefix + dbid[1] + '\">' + goterm + '</a>';
}
@sestaton

This comment has been minimized.

Copy link
Owner Author

commented May 12, 2016

minified for trackList.json:

"fmtDetailValue_Ontology_term" : "function(goterm) { if (typeof goterm != 'string') { return goterm; } var dbid = goterm.split(':'); var prefix = ''; switch (dbid[0]) { case 'GO': prefix = 'http://amigo.geneontology.org/amigo/medial_search?q=GO:'; break; default: return goterm; }; return '<a href=\"'+ prefix + dbid[1] + '\">' + goterm + '</a>'; }"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.