Skip to content

Commit

Permalink
bugfixes for BGsync
Browse files Browse the repository at this point in the history
  • Loading branch information
jweile committed Jun 28, 2018
1 parent 237ff24 commit 15e0f3f
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 9 deletions.
5 changes: 2 additions & 3 deletions docker/cgi/mavevis.js
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ $(document).ready(function(){

resetMost();

ssid = items.ssid;
ssid = items.urn;

$("#molecule").val(items.value);
//if a uniprot ID is available, automatically fill it in
Expand Down Expand Up @@ -525,7 +525,6 @@ $(document).ready(function(){
function processURLParameters() {
//get URL parameters
params = getURLParameters();
console.log(params);
//if there are any, process them
if (params && ("ssid" in params)) {
//query the backend to find matching datasets
Expand All @@ -538,7 +537,7 @@ $(document).ready(function(){
//(even though there should be at most one match)
$.each(data,function(i,items) {
//if this is the matching entry, select it.
if (items["ssid"] == params["ssid"]) {
if (items["urn"] == params["ssid"]) {
selectScoreset(items);
}
})
Expand Down
2 changes: 1 addition & 1 deletion docker/cgi/searchScoresets.R
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ tryCatch({

#if a search term was provided, filter the index by it
if (("term" %in% names(input))) {
is <- which(grepl(tolower(input$term),tolower(idx$label)) | idx$ssid == input$term)
is <- which(grepl(tolower(input$term),tolower(idx$label)) | idx$urn == input$term)
if (length(is) == 0) {
respondJSON(list())
quit(save="no",status=0)
Expand Down
5 changes: 2 additions & 3 deletions docker/searchIndex.csv
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
value,label,ssid,uniprot,syn,stop,offset,wt
"SCS000001A.1: YAP65 WW-domain","YAP65 WW-domain",SCS000001A.1,P46937,manual,auto,170,GACGTTCCACTGCCGGCTGGTTGGGAAATGGCTAAAACTAGTTCTGGTCAGCGTTACTTCCTGAACCACATCGACCAGACCACCACGTGGCAGGACCCGCGT
"SCS000002A.1: UBE2I imputed & refined","UBE2I imputed & refined",SCS000002A.1,P63279,manual,manual,0,
"value","label","urn","target","uniprot","syn","stop","offset","wt"
"urn:mavedb:00000001-a-1: UBE2I imputed & refined","UBE2I imputed & refined","urn:mavedb:00000001-a-1","UBE2I","P63279","auto","manual",0,"ATGTCGGGGATCGCCCTCAGCAGACTCGCCCAGGAGAGGAAAGCATGGAGGAAAGACCACCCATTTGGTTTCGTGGCTGTCCCAACAAAAAATCCCGATGGCACGATGAACCTCATGAACTGGGAGTGCGCCATTCCAGGAAAGAAAGGGACTCCGTGGGAAGGAGGCTTGTTTAAACTACGGATGCTTTTCAAAGATGATTATCCATCTTCGCCACCAAAATGTAAATTCGAACCACCATTATTTCACCCGAATGTGTACCCTTCGGGGACAGTGTGCCTGTCCATCTTAGAGGAGGACAAGGACTGGAGGCCAGCCATCACAATCAAACAGATCCTATTAGGAATACAGGAACTTCTAAATGAACCAAATATCCAAGACCCAGCTCAAGCAGAGGCCTACACGATTTACTGCCAAAACAGAGTGGAGTACGAGAAAAGGGTCCGAGCACAAGCCAAGAAGTTTGCGCCCTCATAA"
4 changes: 2 additions & 2 deletions docker/sync.R
Original file line number Diff line number Diff line change
Expand Up @@ -125,11 +125,11 @@ tryCatch({
mutCacheFile <- paste0(cache.dir,urn,"_muts.csv")
if (!file.exists(mutCacheFile)) {
#if not, do so
if (!exists(scoreTable)) {
if (!exists("scoreTable")) {
scoreTable <- read.csv(scoreCacheFile)
}
if (!all(is.na(scoreTable$hgvs_pro))) {
varInfo <- parseHGVS(scoreTable$hgvs_pro)
varInfo <- parseHGVS(scoreTable$hgvs_pro,aacode=1)
write.table(varInfo,mutCacheFile,sep=",",row.names=FALSE)
} else {
logger(paste("WARNING: Scoreset",urn,"has no protein-level variant descriptors."))
Expand Down

0 comments on commit 15e0f3f

Please sign in to comment.