From 045e5bedb98cb202d34b241927474b0925e9d78f Mon Sep 17 00:00:00 2001 From: kshefchek Date: Fri, 16 Mar 2018 15:58:15 -0700 Subject: [PATCH 1/3] switch travis back to dev --- .travis.yml | 2 +- lib/monarch/api.js | 10 +--------- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/.travis.yml b/.travis.yml index 54d05e8d..ecdb6883 100644 --- a/.travis.yml +++ b/.travis.yml @@ -61,7 +61,7 @@ install: before_script: - "export DISPLAY=:99.0" - "ls -lhS dist/" - - "USE_LOG_FETCH=1 npm run startprod &" + - "USE_LOG_FETCH=1 npm run startbeta &" - "sleep 20" after_success: diff --git a/lib/monarch/api.js b/lib/monarch/api.js index a05da898..75615547 100644 --- a/lib/monarch/api.js +++ b/lib/monarch/api.js @@ -667,7 +667,6 @@ bbop.monarch.Engine.prototype.fetchOrthologList = function(ids) { ids.forEach(function(id) { var orthoObj = engine.fetchGeneOrthologFromSciGraph(id,'label',true); - //results.orthologs = results.orthologs.concat(orthoObj); orthoObj.forEach(function(homolog) { if (homolog.orthology_class === 'Paralog'){ results.paralogs = results.paralogs.concat(homolog.ortholog.id); @@ -679,7 +678,7 @@ bbop.monarch.Engine.prototype.fetchOrthologList = function(ids) { }); }); - var filter = "^OMIM|NCBI|MGI|ZFIN|ENSEMBL:ENSG\\d+|ENSEMBL:ENSDARG\\d+|ENSEMBL\:ENSMUSG\\d+"; + var filter = "^OMIM|HGNC|NCBI|MGI|ZFIN|ENSEMBL:ENSG\\d+|ENSEMBL:ENSDARG\\d+|ENSEMBL\:ENSMUSG\\d+"; var filtered_regex = new RegExp(filter); results.paralogs = results.paralogs.filter(function(d){ @@ -2304,13 +2303,6 @@ bbop.monarch.Engine.prototype.getPhenotypeGenotypeDistro = function(id,levels,is var taxMap = {}; - /*var taxMap = { - 10090 : "Mouse", - 7955 : "Zebrafish", - 6239 : "Nematode", - 9606 : "Human", - 7227 : "Fruit Fly" - };*/ if (countFn == 'fetchGenoPhenoAsAssociationsBySpecies'){ taxMap = { 10090 : "Mouse" From 231d7abd28677aa1486f098911c0d73fa3cd5a09 Mon Sep 17 00:00:00 2001 From: kshefchek Date: Fri, 23 Mar 2018 10:33:33 -0700 Subject: [PATCH 2/3] fix hyper-beta test --- tests/behave/maui_autocomplete.feature | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/behave/maui_autocomplete.feature b/tests/behave/maui_autocomplete.feature index b3560f1a..d9bd1606 100644 --- a/tests/behave/maui_autocomplete.feature +++ b/tests/behave/maui_autocomplete.feature @@ -37,7 +37,7 @@ Scenario: "ZRS" in the navbar search with a click goes to a gene page Scenario: "hyper-be" in the navbar search with a click goes to a disease page Given I go to page "/" and I type "Hyper-bet" into the navbar search - and I wait until "HYPER-BETA-ALANINEMIA" appears in the autocomplete - and I click the autocomplete item "HYPER-BETA-ALANINEMIA" + and I wait until "Hyper-beta-alaninemia" appears in the autocomplete + and I click the autocomplete item "Hyper-beta-alaninemia" when I wait for id "monarch-node" then the title should be "Monarch Disease: hyper-beta-alaninemia (MONDO:0009378)" From 4300033342b33dda7414e7334022bccfb54a6925 Mon Sep 17 00:00:00 2001 From: kshefchek Date: Fri, 23 Mar 2018 11:19:05 -0700 Subject: [PATCH 3/3] reintroduce clinical modifier hack --- lib/monarch/web/webapp.js | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/lib/monarch/web/webapp.js b/lib/monarch/web/webapp.js index 35b1f730..cd182bb5 100644 --- a/lib/monarch/web/webapp.js +++ b/lib/monarch/web/webapp.js @@ -3421,6 +3421,37 @@ function diseaseByIdHandler(request, id, fmt) { } } + const inheritanceClasses = [ + 'HP:0001444', + 'HP:0001423', + 'HP:0001417', + 'HP:0010983', + 'HP:0010982', + 'HP:0003743', + 'HP:0001475', + 'HP:0001470', + 'HP:0025352', + 'HP:0001442', + 'HP:0012275', + 'HP:0001419', + 'HP:0001466', + 'HP:0000005', + 'HP:0000006', + 'HP:0000007', + 'HP:0012274', + 'HP:0010985', + 'HP:0010984', + 'HP:0003744', + 'HP:0003745', + 'HP:0001472', + 'HP:0001450', + 'HP:0001452', + 'HP:0001425', + 'HP:0001426', + 'HP:0001427', + 'HP:0001428', + ]; + if (inheritanceList.length > 0) { info.inheritance = inheritanceList .filter(node => node.metadata().types.indexOf('inheritance') > -1) @@ -3428,7 +3459,7 @@ function diseaseByIdHandler(request, id, fmt) { .join(', '); info.modifier = inheritanceList - .filter(node => node.metadata().types.indexOf('clinical modifier') > -1) + .filter(node => inheritanceClasses.indexOf(node.id()) === -1) .map(node => node.label()) .join(', '); }