Skip to content

Commit

Permalink
one last set of lil tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
glass-ships committed Aug 22, 2023
1 parent af068d6 commit ec7c514
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 17 deletions.
2 changes: 1 addition & 1 deletion backend/tests/fixtures/association_counts_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
def association_counts_response():
return {
"responseHeader": {
"QTime": 1,
"QTime": 0,
"params": {
"facet.query": [
'(category:"biolink:DiseaseToPhenotypicFeatureAssociation") AND (subject:"MONDO:0020121" OR subject_closure:"MONDO:0020121")',
Expand Down
2 changes: 1 addition & 1 deletion backend/tests/fixtures/association_table_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
def association_table_response():
return {
"responseHeader": {
"QTime": 1,
"QTime": 0,
"params": {
"mm": "100%",
"q": "*:*",
Expand Down
5 changes: 4 additions & 1 deletion backend/tests/fixtures/phenotype_explorer_compare.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
def phenotype_explorer_compare():
return {
"subject_termset": {
"MP:0010771": {"id": "MP:0010771", "label": "integument phenotype (MPO)"},
"MP:0002169": {
"id": "MP:0002169",
"label": "no abnormal phenotype detected (MPO)",
},
"MP:0010771": {"id": "MP:0010771", "label": "integument phenotype (MPO)"},
},
"object_termset": {"HP:0004325": {"id": "HP:0004325", "label": "Decreased body weight (HPO)"}},
"subject_best_matches": {
Expand All @@ -35,6 +35,7 @@ def phenotype_explorer_compare():
"subject_information_content": None,
"ancestor_information_content": 1.5616002210519475,
"jaccard_similarity": 0.16216216216216217,
"cosine_similarity": None,
"dice_similarity": None,
"phenodigm_score": 0.5032220864376823,
},
Expand All @@ -61,6 +62,7 @@ def phenotype_explorer_compare():
"subject_information_content": None,
"ancestor_information_content": 2.2728188647181566,
"jaccard_similarity": 0.325,
"cosine_similarity": None,
"dice_similarity": None,
"phenodigm_score": 0.8594568814276845,
},
Expand Down Expand Up @@ -89,6 +91,7 @@ def phenotype_explorer_compare():
"subject_information_content": None,
"ancestor_information_content": 2.2728188647181566,
"jaccard_similarity": 0.325,
"cosine_similarity": None,
"dice_similarity": None,
"phenodigm_score": 0.8594568814276845,
},
Expand Down
2 changes: 1 addition & 1 deletion backend/tests/fixtures/search_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
def search_response():
return {
"responseHeader": {
"QTime": 1,
"QTime": 0,
"params": {
"mm": "100%",
"q": "fanconi",
Expand Down
3 changes: 0 additions & 3 deletions backend/tests/unit/test_fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@ def test_autocomplete(autocomplete):

def test_compare(compare):
tsps = TermSetPairwiseSimilarity(**compare)
import pprint

pprint.PrettyPrinter(indent=2).pprint(tsps.dict())
assert len(tsps.subject_best_matches) != 0


Expand Down
11 changes: 7 additions & 4 deletions frontend/fixtures/phenotype-explorer-compare.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"subject_termset": {
"MP:0010771": {
"id": "MP:0010771",
"label": "integument phenotype (MPO)"
},
"MP:0002169": {
"id": "MP:0002169",
"label": "no abnormal phenotype detected (MPO)"
},
"MP:0010771": {
"id": "MP:0010771",
"label": "integument phenotype (MPO)"
}
},
"object_termset": {
Expand Down Expand Up @@ -38,6 +38,7 @@
"subject_information_content": null,
"ancestor_information_content": 1.5616002210519475,
"jaccard_similarity": 0.16216216216216217,
"cosine_similarity": null,
"dice_similarity": null,
"phenodigm_score": 0.5032220864376823
}
Expand All @@ -64,6 +65,7 @@
"subject_information_content": null,
"ancestor_information_content": 2.2728188647181566,
"jaccard_similarity": 0.325,
"cosine_similarity": null,
"dice_similarity": null,
"phenodigm_score": 0.8594568814276845
}
Expand Down Expand Up @@ -92,6 +94,7 @@
"subject_information_content": null,
"ancestor_information_content": 2.2728188647181566,
"jaccard_similarity": 0.325,
"cosine_similarity": null,
"dice_similarity": null,
"phenodigm_score": 0.8594568814276845
}
Expand Down
12 changes: 6 additions & 6 deletions frontend/src/pages/node/AssociationsTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -241,12 +241,12 @@ const {
isLoading,
isError,
} = useQuery(
async function () /**
* whether to perform "fresh" search, without filters/pagination/etc. true when
* search text changes, false when filters/pagination/etc change.
*/
// fresh: boolean,
{
async function (
fresh: boolean /**
* whether to perform "fresh" search, without filters/pagination/etc. true when
* search text changes, false when filters/pagination/etc change.
*/,
) {
/** catch case where no association categories available */
if (!props.node.association_counts.length)
throw new Error("No association info available");
Expand Down

0 comments on commit ec7c514

Please sign in to comment.