Last active
July 4, 2018 04:56
-
-
Save sestaton/ff9424f28b165e761e934f078f07249f to your computer and use it in GitHub Desktop.
create dbxref links for jbrowse
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fmtDetailValue_Dbxref : function(dbxref) { | |
if (typeof dbxref != 'string') { | |
return dbxref; | |
} | |
var dbid = dbxref.split(':'); | |
var prefix = ''; | |
switch (dbid[0]) { | |
case 'InterPro': | |
prefix = 'http://www.ebi.ac.uk/interpro/entry/'; | |
break; | |
case 'Pfam': | |
prefix = 'http://pfam.sanger.ac.uk/family/'; | |
break; | |
case 'Reactome': | |
prefix = 'http://www.reactome.org/content/detail/'; | |
break; | |
case 'UniPathway': | |
prefix = 'http://www.grenoble.prabi.fr/obiwarehouse/unipathway/upa?upid='; | |
break; | |
case 'KEGG': | |
prefix = 'http://www.genome.jp/kegg-bin/show_pathway?ec'; | |
break; | |
case 'ProSitePatterns': | |
prefix = 'http://prosite.expasy.org/'; | |
break; | |
case 'ProSiteProfiles': | |
prefix = 'http://prosite.expasy.org/cgi-bin/prosite/PSView.cgi?ac='; | |
break; | |
case 'SMART': | |
prefix = 'http://smart.embl-heidelberg.de/smart/do_annotation.pl?BLAST=DUMMY&DOMAIN='; | |
break; | |
case 'SUPERFAMILY': | |
prefix ='http://supfam.org/SUPERFAMILY/cgi-bin/scop.cgi?sunid='; | |
dbid[1] = dbid[1].replace("SSF", ""); | |
break; | |
case 'Gene3D': | |
prefix ='http://www.cathdb.info/version/latest/superfamily/'; | |
dbid[1] = dbid[2]; | |
break; | |
case 'PIRSF': | |
prefix = 'http://pir.georgetown.edu/cgi-bin/ipcSF?id='; | |
break; | |
case 'ProDom': | |
prefix = 'http://prodom.prabi.fr/prodom/current/cgi-bin/request.pl?question=DBEN&query='; | |
break; | |
case 'TIGRFAM': | |
prefix = 'http://www.jcvi.org/cgi-bin/tigrfams/HmmReportPage.cgi?acc='; | |
break; | |
default: | |
return dbxref; | |
}; | |
return '<a href=\"'+ prefix + dbid[1] + '\">' + dbxref + '</a>'; | |
} |
this is great :) exactly the type of thing the (clumsily designed, I can say that since I sort of made it lol) fmtDetailValues thing was intended for
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
minified for trackList.json: