Skip to content

Commit

Permalink
various small fix before release
Browse files Browse the repository at this point in the history
  • Loading branch information
tamerh committed Sep 12, 2019
1 parent 1015bfc commit 3b22ae6
Show file tree
Hide file tree
Showing 20 changed files with 3,959 additions and 5,726 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ notes.txt
test_data/usecases/*
test_data/vegeta/input.txt
test_data/vegeta/results.bin
test_data/postman/*test_run.json
genomes_ensembl_bacteria.json
genomes_ensembl.json
conf/ensembl/*.json
Expand Down
8 changes: 4 additions & 4 deletions biobtree.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ import (
"github.com/urfave/cli"
)

const version = "1.1.0-rc3"
const versionTag = "v1.1.0-rc3"
const version = "1.1.0-rc4"
const versionTag = "v1.1.0-rc4"

// for now they are static
var webuicssfiles = []string{"app.042a53a9.css", "chunk-vendors.1f68ba2f.css"}
var webuijsfiles = []string{"app.60410bbb.js", "app.60410bbb.js.map", "chunk-vendors.cee4d7e8.js", "chunk-vendors.cee4d7e8.js.map"}
var webuicssfiles = []string{"app.2d1c9110.css", "chunk-vendors.1f68ba2f.css"}
var webuijsfiles = []string{"app.d58e3cc2.js", "app.d58e3cc2.js.map", "chunk-vendors.cee4d7e8.js", "chunk-vendors.cee4d7e8.js.map"}

var config *conf.Conf

Expand Down
5 changes: 5 additions & 0 deletions conf/default.dataset.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,11 @@
"name": "Transcript",
"id": "42",
"url": "https://www.ensembl.org/Multi/Search/Results?q=£{id};site=ensembl_all",
"bacteriaUrl": "http://bacteria.ensembl.org/Multi/Search/Results?species=all;idx=;q=£{id};;site=ensemblunit",
"fungiUrl": "http://fungi.ensembl.org/Multi/Search/Results?species=all;idx=;q=£{id};;site=ensemblunit",
"metazoaUrl": "http://metazoa.ensembl.org/Multi/Search/Results?species=all;idx=;q=£{id};;site=ensemblunit",
"plantsUrl": "http://plants.ensembl.org/Multi/Search/Results?species=all;idx=;q=£{id};;site=ensemblunit",
"protistsUr": "http://protists.ensembl.org/Multi/Search/Results?species=all;idx=;q=£{id};;site=ensemblunit",
"hasFilter": "yes"
},
"expressionatlas": {
Expand Down
5 changes: 5 additions & 0 deletions conf/source.dataset.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@
"id": "2",
"name": "Ensembl",
"url": "https://www.ensembl.org/Multi/Search/Results?q=£{id};site=ensembl_all",
"bacteriaUrl": "http://bacteria.ensembl.org/Multi/Search/Results?species=all;idx=;q=£{id};;site=ensemblunit",
"fungiUrl": "http://fungi.ensembl.org/Multi/Search/Results?species=all;idx=;q=£{id};;site=ensemblunit",
"metazoaUrl": "http://metazoa.ensembl.org/Multi/Search/Results?species=all;idx=;q=£{id};;site=ensemblunit",
"plantsUrl": "http://plants.ensembl.org/Multi/Search/Results?species=all;idx=;q=£{id};;site=ensemblunit",
"protistsUr": "http://protists.ensembl.org/Multi/Search/Results?species=all;idx=;q=£{id};;site=ensemblunit",
"path": "homo_pretty.json",
"useLocalFile": "no",
"hasFilter": "yes"
Expand Down
22 changes: 16 additions & 6 deletions service/web.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,25 +47,35 @@ func (web *Web) Start(c *conf.Conf) {
var b strings.Builder
b.WriteString("{")
keymap := map[string]bool{}
optionalFields := []string{"bacteriaUrl", "fungiUrl", "metazoaUrl", "plantsUrl", "protistsUr"}
for k := range config.Dataconf {
if config.Dataconf[k]["_alias"] == "" { // not send the alias
id := config.Dataconf[k]["id"]
if _, ok := keymap[id]; !ok {
b.WriteString("\"" + id + "\":{")
b.WriteString(`"` + id + `":{`)

if len(config.Dataconf[k]["name"]) > 0 {
b.WriteString("\"name\":\"" + config.Dataconf[k]["name"] + "\",")
b.WriteString(`"name":"` + config.Dataconf[k]["name"] + `",`)
} else {
b.WriteString("\"name\":\"" + k + "\",")
b.WriteString(`"name":"` + k + `",`)
}

if len(config.Dataconf[k]["linkdataset"]) > 0 {
b.WriteString("\"linkdataset\":\"" + config.Dataconf[k]["linkdataset"] + "\",")
b.WriteString(`"linkdataset":"` + config.Dataconf[k]["linkdataset"] + `",`)
}

b.WriteString("\"id\":\"" + k + "\",")
b.WriteString(`"id":"` + k + `",`)

b.WriteString(`"url":"` + config.Dataconf[k]["url"] + `"`)

for _, field := range optionalFields {
if _, ok := config.Dataconf[k][field]; ok {
b.WriteString(`,`)
b.WriteString(`"` + field + `":"` + config.Dataconf[k][field] + `"`)
}
}
b.WriteString(`},`)

b.WriteString("\"url\":\"" + config.Dataconf[k]["url"] + "\"},")
keymap[id] = true
}
}
Expand Down
Loading

0 comments on commit 3b22ae6

Please sign in to comment.