Skip to content

Commit

Permalink
fix: show only a set of genes filtered by a list of biotypes
Browse files Browse the repository at this point in the history
  • Loading branch information
mkarmona committed Mar 12, 2019
1 parent 08ad67f commit ecd7798
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 3 deletions.
7 changes: 5 additions & 2 deletions app/models/Backend.scala
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ class Backend @Inject()(@NamedDatabase("default") protected val dbConfigProvider
config.get[Int]("ot.elasticsearch.port"))
val esQ = HttpClient(esUri)

val geneExclusionList = config.get[Seq[String]]("ot.genes.exclude")

def buildPheWASTable(variantID: String, pageIndex: Option[Int], pageSize: Option[Int]):
Future[Entities.PheWASTable] = {
val limitClause = parsePaginationTokens(pageIndex, pageSize)
Expand Down Expand Up @@ -485,8 +487,9 @@ class Backend @Inject()(@NamedDatabase("default") protected val dbConfigProvider
} else {
val geneIdsInLoci = genes.filter(r =>
(r.chromosome === chr) &&
(r.start >= start && r.start <= end) ||
(r.end >= start && r.end <= end))
((r.start >= start && r.start <= end) ||
(r.end >= start && r.end <= end)) &&
!(r.bioType inSet geneExclusionList))
.map(_.id)

val assocsQ = d2v2gScored.filter(r => (r.leadChromosome === chr) && (
Expand Down
51 changes: 51 additions & 0 deletions conf/application.conf
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,57 @@ ot.elasticsearch {
port = 9200
}

//"3prime_overlapping_ncrna"
//"antisense"
//"IG_C_gene"
//"IG_C_pseudogene"
//"IG_D_gene"
//"IG_J_gene"
//"IG_J_pseudogene"
//"IG_V_gene"
//"IG_V_pseudogene"
//"lincRNA"
//"miRNA"
//"misc_RNA"
//"Mt_rRNA"
//"Mt_tRNA"
//"polymorphic_pseudogene"
//"processed_transcript"
//"protein_coding"
//"pseudogene"
//"rRNA"
//"sense_intronic"
//"sense_overlapping"
//"snoRNA"
//"snRNA"
//"TR_C_gene"
//"TR_D_gene"
//"TR_J_gene"
//"TR_J_pseudogene"
//"TR_V_gene"
//"TR_V_pseudogene"
ot.genes {
exclude = [
"IG_C_pseudogene",
"IG_J_pseudogene",
"IG_pseudogene",
"IG_V_pseudogene",
"polymorphic_pseudogene",
"processed_pseudogene",
"pseudogene",
"rRNA",
"rRNA_pseudogene",
"snoRNA",
"snRNA",
"transcribed_processed_pseudogene",
"transcribed_unitary_pseudogene",
"transcribed_unprocessed_pseudogene",
"TR_J_pseudogene",
"TR_V_pseudogene",
"unitary_pseudogene",
"unprocessed_pseudogene"]
}

play.filters.disabled += play.filters.csrf.CSRFFilter
play.filters.enabled += play.filters.cors.CORSFilter

Expand Down
2 changes: 1 addition & 1 deletion deploy_gcloud.bash
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

gcloud --project=open-targets-genetics beta app deploy \
gcloud --project=open-targets-genetics app deploy \
--no-promote \
-v $(git describe --abbrev=0 \
--tags | sed "s:\.:-:g")

0 comments on commit ecd7798

Please sign in to comment.