Skip to content

Commit

Permalink
Merge pull request #41 from opentargets/mk-fix-studies
Browse files Browse the repository at this point in the history
fix studies
  • Loading branch information
mkarmona authored Oct 3, 2018
2 parents 1d93351 + 3adab49 commit 3bfa2d2
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ RUN unzip ot-genetics-api-latest.zip
RUN echo "${CH_URL} ${PLAY_SECRET}"

RUN chmod +x ot-genetics-api-latest/bin/ot-genetics-api
ENTRYPOINT ot-genetics-api-latest/bin/ot-genetics-api -Dconfig.file=/srv/app/production.conf
ENTRYPOINT ot-genetics-api-latest/bin/ot-genetics-api -J-Xms2g -J-Xmx4g -J-server -Dconfig.file=/srv/app/production.conf
# -Dplay.http.secret.key=${PLAY_SECRET}
# -Dslick.dbs.default.db.url=${CH_URL}
23 changes: 22 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,28 @@ http.port = 8080
# sbt command playGenerateSecret
play.http.secret.key = "changeme"
slick.dbs.default.db.url = "jdbc:clickhouse://clickhouseinternalnodename:8123/ot"
slick.dbs {
default {
profile = "clickhouse.ClickHouseProfile$"
db {
driver = "ru.yandex.clickhouse.ClickHouseDriver"
url = "jdbc:clickhouse://clickhouseinternalnodename1:8123/ot"
}
}
sumstats {
profile = "clickhouse.ClickHouseProfile$"
db {
driver = "ru.yandex.clickhouse.ClickHouseDriver"
url = "jdbc:clickhouse://clickhouseinternalnodename2:8123/sumstats"
}
}
}
ot.elasticsearch {
host = "clickhouseinternalnodename3.c.open-targets-genetics.internal"
port = 9200
}
# slick.dbs.default.db.url = "jdbc:clickhouse://clickhouseinternalnodename:8123/ot"
```

# Copyright
Expand Down
14 changes: 7 additions & 7 deletions app/models/GQLSchema.scala
Original file line number Diff line number Diff line change
Expand Up @@ -401,9 +401,9 @@ object GQLSchema {
val overlappedVariantsStudies = ObjectType("OverlappedVariantsStudies",
"This element represent a overlap between two stduies",
fields[Backend, OverlappedVariantsStudy](
Field("study", study,
Field("study", OptionType(study),
Some("A study object"),
resolve = rsl => studiesFetcher.defer(rsl.value.studyId)),
resolve = rsl => studiesFetcher.deferOpt(rsl.value.studyId)),
Field("overlaps", ListType(overlap),
Some("Orig variant id which is been used for computing the " +
"overlap with the referenced study"),
Expand All @@ -413,9 +413,9 @@ object GQLSchema {
val topOverlappedStudies = ObjectType("TopOverlappedStudies",
"This element represent a overlap between two stduies",
fields[Backend, OverlappedLociStudy](
Field("study", study,
Field("study", OptionType(study),
Some("A study object"),
resolve = rsl => studiesFetcher.defer(rsl.value.studyId)),
resolve = rsl => studiesFetcher.deferOpt(rsl.value.studyId)),
Field("topStudiesByLociOverlap", ListType(overlappedStudy),
Some("Top N studies ordered by loci overlap"),
resolve = _.value.topOverlappedStudies)
Expand All @@ -430,9 +430,9 @@ object GQLSchema {

val overlappedInfoForStudy = ObjectType("OverlappedInfoForStudy", "",
fields[Backend, (String, Seq[String])](
Field("study", study,
Field("study", OptionType(study),
Some("A study object"),
resolve = rsl => studiesFetcher.defer(rsl.value._1)),
resolve = rsl => studiesFetcher.deferOpt(rsl.value._1)),
Field("overlappedVariantsForStudies", ListType(overlappedVariantsStudies),
Some(""),
resolve = rsl => rsl.ctx.getOverlapVariantsForStudies(rsl.value._1, rsl.value._2)),
Expand All @@ -447,7 +447,7 @@ object GQLSchema {
Field("associations", ListType(manhattanAssociation),
Some("A list of associations"),
resolve = _.value.associations),
Field("topOverlappedStudies", topOverlappedStudies,
Field("topOverlappedStudies", OptionType(topOverlappedStudies),
Some("A list of overlapped studies"),
arguments = pageIndex :: pageSize :: Nil,
resolve = ctx => ctx.ctx.getTopOverlappedStudies(ctx.value.studyId, ctx.arg(pageIndex), ctx.arg(pageSize)))
Expand Down

0 comments on commit 3bfa2d2

Please sign in to comment.