diff --git a/backend/src/monarch_py/api/additional_models.py b/backend/src/monarch_py/api/additional_models.py index a9f7b35d4..36af77884 100644 --- a/backend/src/monarch_py/api/additional_models.py +++ b/backend/src/monarch_py/api/additional_models.py @@ -30,5 +30,5 @@ class SemsimCompareRequest(BaseModel): class SemsimSearchRequest(BaseModel): termset: List[str] = Field(..., title="Termset to search") - prefix: str = Field(..., title="Prefix to search for") - limit: Optional[int] = Field(..., title="Limit the number of results") + category: SemsimSearchCategory = Field(..., title="Category to search for") + limit: Optional[int] = Field(10, title="Limit the number of results", ge=1, le=50) diff --git a/backend/src/monarch_py/api/semsim.py b/backend/src/monarch_py/api/semsim.py index 26fe797bb..4a168989a 100644 --- a/backend/src/monarch_py/api/semsim.py +++ b/backend/src/monarch_py/api/semsim.py @@ -1,4 +1,4 @@ -from fastapi import APIRouter, HTTPException, Path, Query +from fastapi import APIRouter, Path, Query from monarch_py.api.additional_models import SemsimCompareRequest, SemsimSearchRequest, SemsimSearchCategory from monarch_py.api.config import semsimian @@ -54,14 +54,14 @@ def _post_compare(request: SemsimCompareRequest): @router.get("/search/{termset}/{prefix}") def _search( termset: str = Path(..., title="Termset to search"), - prefix: str = Path(..., title="Prefix to search for"), - limit: int = Query(default=10, ge=0, le=500), + category: SemsimSearchCategory = Path(..., title="Category of entities to search for"), + limit: int = Query(default=10, ge=1, le=50), ): """Search for terms in a termset Args:
- termset (str, optional): Termset to search. Defaults to "".
- prefix (str, optional): Prefix to search for. Defaults to "".
+ termset (str, optional): Comma separated list of term IDs to find matches for.
+ category (str, optional): Category of entities to search for.
limit (int, optional): Limit the number of results. Defaults to 10. Returns:
@@ -72,11 +72,11 @@ def _search( f""" Running semsim search: termset: {termset} - prefix: {prefix} + category: {category} """ ) - - results = semsimian().search(termset=termset.split(","), prefix=parse_similarity_prefix(prefix), limit=limit) + + results = semsimian().search(termset=termset.split(","), prefix=parse_similarity_prefix(category), limit=limit) return results @@ -88,10 +88,10 @@ def _post_search(request: SemsimSearchRequest): Example:
     {
-      "termset": ["HP:0000001", "HP:0000002"],
-      "prefix": "ZFIN",
+      "termset": ["HP:0002104", "HP:0012378", "HP:0012378", "HP:0012378"],
+      "category": "Human Diseases",
       "limit": 5
     }
     
""" - return semsimian().search(request.termset, parse_similarity_prefix(request.prefix), request.limit) + return semsimian().search(request.termset, parse_similarity_prefix(request.category.value), request.limit) diff --git a/backend/tests/fixtures/association_counts_response.py b/backend/tests/fixtures/association_counts_response.py index a19f9b0e4..b5dd2bad8 100644 --- a/backend/tests/fixtures/association_counts_response.py +++ b/backend/tests/fixtures/association_counts_response.py @@ -5,7 +5,7 @@ def association_counts_response(): return { "responseHeader": { - "QTime": 2, + "QTime": 1, "params": { "facet.query": [ '(category:"biolink:DiseaseToPhenotypicFeatureAssociation") AND (subject:"MONDO:0020121" OR subject_closure:"MONDO:0020121")', diff --git a/backend/tests/fixtures/phenotype_explorer_search.py b/backend/tests/fixtures/phenotype_explorer_search.py index 49a5081a1..3434ca470 100644 --- a/backend/tests/fixtures/phenotype_explorer_search.py +++ b/backend/tests/fixtures/phenotype_explorer_search.py @@ -4,790 +4,1070 @@ @pytest.fixture def phenotype_explorer_search(): return [ - [ - 8.153058700868163, - { - "subject_termset": [ - {"ZP:0002909": {"id": "ZP:0002909", "label": "whole organism dwarf-like, abnormal (ZPO)"}} - ], - "subject_best_matches": { - "ZP:0002909": { - "match_source": "ZP:0002909", - "match_source_label": "whole organism dwarf-like, abnormal (ZPO)", - "match_target": "HP:0000002", - "match_target_label": "Abnormality of body height (HPO)", - "score": "10.870744934490885", - } - }, - "subject_best_matches_similarity_map": { - "ZP:0002909": { - "ancestor_id": "UPHENO:0075159", - "ancestor_information_content": "10.870744934490885", - "ancestor_label": "", - "cosine_similarity": "NaN", - "jaccard_similarity": "0.4444444444444444", - "object_id": "HP:0000002", - "phenodigm_score": "2.198054183387448", - "subject_id": "ZP:0002909", - } - }, - "object_termset": [ - {"HP:0000002": {"id": "HP:0000002", "label": "Abnormality of body height (HPO)"}}, - {"HP:0000001": {"id": "HP:0000001", "label": "All (HPO)"}}, - ], - "object_best_matches": { - "HP:0000001": { - "match_source": "HP:0000001", - "match_source_label": "All (HPO)", - "match_target": "ZP:0002909", - "match_target_label": "whole organism dwarf-like, abnormal (ZPO)", - "score": "0", - }, - "HP:0000002": { - "match_source": "HP:0000002", - "match_source_label": "Abnormality of body height (HPO)", - "match_target": "ZP:0002909", - "match_target_label": "whole organism dwarf-like, abnormal (ZPO)", - "score": "10.870744934490885", - }, - }, - "object_best_matches_similarity_map": { - "HP:0000001": { - "ancestor_id": "NO_ANCESTOR_FOUND", - "ancestor_information_content": "0", - "ancestor_label": "", - "cosine_similarity": "NaN", - "jaccard_similarity": "0", - "object_id": "ZP:0002909", - "phenodigm_score": "0", - "subject_id": "HP:0000001", - }, - "HP:0000002": { - "ancestor_id": "UPHENO:0075159", - "ancestor_information_content": "10.870744934490885", - "ancestor_label": "", - "cosine_similarity": "NaN", - "jaccard_similarity": "0.4444444444444444", - "object_id": "ZP:0002909", - "phenodigm_score": "2.198054183387448", - "subject_id": "HP:0000002", - }, - }, - "average_score": 8.153058700868163, - "best_score": 10.870744934490885, - "metric": "ancestor_information_content", - }, - "ZFIN:ZDB-GENE-070117-1426", - ], - [ - 8.153058700868163, - { - "subject_termset": [ - {"ZP:0000473": {"id": "ZP:0000473", "label": "whole organism decreased length, abnormal (ZPO)"}} - ], - "subject_best_matches": { - "ZP:0000473": { - "match_source": "ZP:0000473", - "match_source_label": "whole organism decreased length, abnormal (ZPO)", - "match_target": "HP:0000002", - "match_target_label": "Abnormality of body height (HPO)", - "score": "10.870744934490885", - } - }, - "subject_best_matches_similarity_map": { - "ZP:0000473": { - "ancestor_id": "UPHENO:0075159", - "ancestor_information_content": "10.870744934490885", - "ancestor_label": "", - "cosine_similarity": "NaN", - "jaccard_similarity": "0.4", - "object_id": "HP:0000002", - "phenodigm_score": "2.0852572919897328", - "subject_id": "ZP:0000473", - } - }, - "object_termset": [ - {"HP:0000001": {"id": "HP:0000001", "label": "All (HPO)"}}, - {"HP:0000002": {"id": "HP:0000002", "label": "Abnormality of body height (HPO)"}}, - ], - "object_best_matches": { - "HP:0000001": { - "match_source": "HP:0000001", - "match_source_label": "All (HPO)", - "match_target": "ZP:0000473", - "match_target_label": "whole organism decreased length, abnormal (ZPO)", - "score": "0", - }, - "HP:0000002": { - "match_source": "HP:0000002", - "match_source_label": "Abnormality of body height (HPO)", - "match_target": "ZP:0000473", - "match_target_label": "whole organism decreased length, abnormal (ZPO)", - "score": "10.870744934490885", - }, - }, - "object_best_matches_similarity_map": { - "HP:0000001": { - "ancestor_id": "NO_ANCESTOR_FOUND", - "ancestor_information_content": "0", - "ancestor_label": "", - "cosine_similarity": "NaN", - "jaccard_similarity": "0", - "object_id": "ZP:0000473", - "phenodigm_score": "0", - "subject_id": "HP:0000001", - }, - "HP:0000002": { - "ancestor_id": "UPHENO:0075159", - "ancestor_information_content": "10.870744934490885", - "ancestor_label": "", - "cosine_similarity": "NaN", - "jaccard_similarity": "0.4", - "object_id": "ZP:0000473", - "phenodigm_score": "2.0852572919897328", - "subject_id": "HP:0000002", - }, - }, - "average_score": 8.153058700868163, - "best_score": 10.870744934490885, - "metric": "ancestor_information_content", - }, - "ZFIN:ZDB-GENE-081022-128", - ], - [ - 8.153058700868163, - { - "subject_termset": [ - {"ZP:0000473": {"id": "ZP:0000473", "label": "whole organism decreased length, abnormal (ZPO)"}} - ], - "subject_best_matches": { - "ZP:0000473": { - "match_source": "ZP:0000473", - "match_source_label": "whole organism decreased length, abnormal (ZPO)", - "match_target": "HP:0000002", - "match_target_label": "Abnormality of body height (HPO)", - "score": "10.870744934490885", - } - }, - "subject_best_matches_similarity_map": { - "ZP:0000473": { - "ancestor_id": "UPHENO:0075159", - "ancestor_information_content": "10.870744934490885", - "ancestor_label": "", - "cosine_similarity": "NaN", - "jaccard_similarity": "0.4", - "object_id": "HP:0000002", - "phenodigm_score": "2.0852572919897328", - "subject_id": "ZP:0000473", - } - }, - "object_termset": [ - {"HP:0000002": {"id": "HP:0000002", "label": "Abnormality of body height (HPO)"}}, - {"HP:0000001": {"id": "HP:0000001", "label": "All (HPO)"}}, - ], - "object_best_matches": { - "HP:0000001": { - "match_source": "HP:0000001", - "match_source_label": "All (HPO)", - "match_target": "ZP:0000473", - "match_target_label": "whole organism decreased length, abnormal (ZPO)", - "score": "0", - }, - "HP:0000002": { - "match_source": "HP:0000002", - "match_source_label": "Abnormality of body height (HPO)", - "match_target": "ZP:0000473", - "match_target_label": "whole organism decreased length, abnormal (ZPO)", - "score": "10.870744934490885", - }, - }, - "object_best_matches_similarity_map": { - "HP:0000001": { - "ancestor_id": "NO_ANCESTOR_FOUND", - "ancestor_information_content": "0", - "ancestor_label": "", - "cosine_similarity": "NaN", - "jaccard_similarity": "0", - "object_id": "ZP:0000473", - "phenodigm_score": "0", - "subject_id": "HP:0000001", - }, - "HP:0000002": { - "ancestor_id": "UPHENO:0075159", - "ancestor_information_content": "10.870744934490885", - "ancestor_label": "", - "cosine_similarity": "NaN", - "jaccard_similarity": "0.4", - "object_id": "ZP:0000473", - "phenodigm_score": "2.0852572919897328", - "subject_id": "HP:0000002", - }, - }, - "average_score": 8.153058700868163, - "best_score": 10.870744934490885, - "metric": "ancestor_information_content", - }, - "ZFIN:ZDB-GENE-111209-1", - ], - [ - 8.153058700868163, - { - "subject_termset": [ - {"ZP:0000473": {"id": "ZP:0000473", "label": "whole organism decreased length, abnormal (ZPO)"}} - ], - "subject_best_matches": { - "ZP:0000473": { - "match_source": "ZP:0000473", - "match_source_label": "whole organism decreased length, abnormal (ZPO)", - "match_target": "HP:0000002", - "match_target_label": "Abnormality of body height (HPO)", - "score": "10.870744934490885", - } - }, - "subject_best_matches_similarity_map": { - "ZP:0000473": { - "ancestor_id": "UPHENO:0075159", - "ancestor_information_content": "10.870744934490885", - "ancestor_label": "", - "cosine_similarity": "NaN", - "jaccard_similarity": "0.4", - "object_id": "HP:0000002", - "phenodigm_score": "2.0852572919897328", - "subject_id": "ZP:0000473", - } - }, - "object_termset": [ - {"HP:0000001": {"id": "HP:0000001", "label": "All (HPO)"}}, - {"HP:0000002": {"id": "HP:0000002", "label": "Abnormality of body height (HPO)"}}, - ], - "object_best_matches": { - "HP:0000001": { - "match_source": "HP:0000001", - "match_source_label": "All (HPO)", - "match_target": "ZP:0000473", - "match_target_label": "whole organism decreased length, abnormal (ZPO)", - "score": "0", - }, - "HP:0000002": { - "match_source": "HP:0000002", - "match_source_label": "Abnormality of body height (HPO)", - "match_target": "ZP:0000473", - "match_target_label": "whole organism decreased length, abnormal (ZPO)", - "score": "10.870744934490885", - }, - }, - "object_best_matches_similarity_map": { - "HP:0000001": { - "ancestor_id": "NO_ANCESTOR_FOUND", - "ancestor_information_content": "0", - "ancestor_label": "", - "cosine_similarity": "NaN", - "jaccard_similarity": "0", - "object_id": "ZP:0000473", - "phenodigm_score": "0", - "subject_id": "HP:0000001", - }, - "HP:0000002": { - "ancestor_id": "UPHENO:0075159", - "ancestor_information_content": "10.870744934490885", - "ancestor_label": "", - "cosine_similarity": "NaN", - "jaccard_similarity": "0.4", - "object_id": "ZP:0000473", - "phenodigm_score": "2.0852572919897328", - "subject_id": "HP:0000002", - }, - }, - "average_score": 8.153058700868163, - "best_score": 10.870744934490885, - "metric": "ancestor_information_content", - }, - "ZFIN:ZDB-GENE-070117-1424", - ], - [ - 8.153058700868163, - { - "subject_termset": [ - {"ZP:0000473": {"id": "ZP:0000473", "label": "whole organism decreased length, abnormal (ZPO)"}} - ], - "subject_best_matches": { - "ZP:0000473": { - "match_source": "ZP:0000473", - "match_source_label": "whole organism decreased length, abnormal (ZPO)", - "match_target": "HP:0000002", - "match_target_label": "Abnormality of body height (HPO)", - "score": "10.870744934490885", - } - }, - "subject_best_matches_similarity_map": { - "ZP:0000473": { - "ancestor_id": "UPHENO:0075159", - "ancestor_information_content": "10.870744934490885", - "ancestor_label": "", - "cosine_similarity": "NaN", - "jaccard_similarity": "0.4", - "object_id": "HP:0000002", - "phenodigm_score": "2.0852572919897328", - "subject_id": "ZP:0000473", - } - }, - "object_termset": [ - {"HP:0000002": {"id": "HP:0000002", "label": "Abnormality of body height (HPO)"}}, - {"HP:0000001": {"id": "HP:0000001", "label": "All (HPO)"}}, - ], - "object_best_matches": { - "HP:0000001": { - "match_source": "HP:0000001", - "match_source_label": "All (HPO)", - "match_target": "ZP:0000473", - "match_target_label": "whole organism decreased length, abnormal (ZPO)", - "score": "0", - }, - "HP:0000002": { - "match_source": "HP:0000002", - "match_source_label": "Abnormality of body height (HPO)", - "match_target": "ZP:0000473", - "match_target_label": "whole organism decreased length, abnormal (ZPO)", - "score": "10.870744934490885", - }, - }, - "object_best_matches_similarity_map": { - "HP:0000001": { - "ancestor_id": "NO_ANCESTOR_FOUND", - "ancestor_information_content": "0", - "ancestor_label": "", - "cosine_similarity": "NaN", - "jaccard_similarity": "0", - "object_id": "ZP:0000473", - "phenodigm_score": "0", - "subject_id": "HP:0000001", - }, - "HP:0000002": { - "ancestor_id": "UPHENO:0075159", - "ancestor_information_content": "10.870744934490885", - "ancestor_label": "", - "cosine_similarity": "NaN", - "jaccard_similarity": "0.4", - "object_id": "ZP:0000473", - "phenodigm_score": "2.0852572919897328", - "subject_id": "HP:0000002", - }, - }, - "average_score": 8.153058700868163, - "best_score": 10.870744934490885, - "metric": "ancestor_information_content", - }, - "ZFIN:ZDB-GENE-030131-4487", - ], - [ - 8.153058700868163, - { - "subject_termset": [ - {"ZP:0000473": {"id": "ZP:0000473", "label": "whole organism decreased length, abnormal (ZPO)"}} - ], - "subject_best_matches": { - "ZP:0000473": { - "match_source": "ZP:0000473", - "match_source_label": "whole organism decreased length, abnormal (ZPO)", - "match_target": "HP:0000002", - "match_target_label": "Abnormality of body height (HPO)", - "score": "10.870744934490885", - } - }, - "subject_best_matches_similarity_map": { - "ZP:0000473": { - "ancestor_id": "UPHENO:0075159", - "ancestor_information_content": "10.870744934490885", - "ancestor_label": "", - "cosine_similarity": "NaN", - "jaccard_similarity": "0.4", - "object_id": "HP:0000002", - "phenodigm_score": "2.0852572919897328", - "subject_id": "ZP:0000473", - } - }, - "object_termset": [ - {"HP:0000001": {"id": "HP:0000001", "label": "All (HPO)"}}, - {"HP:0000002": {"id": "HP:0000002", "label": "Abnormality of body height (HPO)"}}, - ], - "object_best_matches": { - "HP:0000001": { - "match_source": "HP:0000001", - "match_source_label": "All (HPO)", - "match_target": "ZP:0000473", - "match_target_label": "whole organism decreased length, abnormal (ZPO)", - "score": "0", - }, - "HP:0000002": { - "match_source": "HP:0000002", - "match_source_label": "Abnormality of body height (HPO)", - "match_target": "ZP:0000473", - "match_target_label": "whole organism decreased length, abnormal (ZPO)", - "score": "10.870744934490885", - }, - }, - "object_best_matches_similarity_map": { - "HP:0000001": { - "ancestor_id": "NO_ANCESTOR_FOUND", - "ancestor_information_content": "0", - "ancestor_label": "", - "cosine_similarity": "NaN", - "jaccard_similarity": "0", - "object_id": "ZP:0000473", - "phenodigm_score": "0", - "subject_id": "HP:0000001", - }, - "HP:0000002": { - "ancestor_id": "UPHENO:0075159", - "ancestor_information_content": "10.870744934490885", - "ancestor_label": "", - "cosine_similarity": "NaN", - "jaccard_similarity": "0.4", - "object_id": "ZP:0000473", - "phenodigm_score": "2.0852572919897328", - "subject_id": "HP:0000002", - }, - }, - "average_score": 8.153058700868163, - "best_score": 10.870744934490885, - "metric": "ancestor_information_content", - }, - "ZFIN:ZDB-GENE-070117-1594", - ], - [ - 8.153058700868163, - { - "subject_termset": [ - {"ZP:0000473": {"id": "ZP:0000473", "label": "whole organism decreased length, abnormal (ZPO)"}} - ], - "subject_best_matches": { - "ZP:0000473": { - "match_source": "ZP:0000473", - "match_source_label": "whole organism decreased length, abnormal (ZPO)", - "match_target": "HP:0000002", - "match_target_label": "Abnormality of body height (HPO)", - "score": "10.870744934490885", - } - }, - "subject_best_matches_similarity_map": { - "ZP:0000473": { - "ancestor_id": "UPHENO:0075159", - "ancestor_information_content": "10.870744934490885", - "ancestor_label": "", - "cosine_similarity": "NaN", - "jaccard_similarity": "0.4", - "object_id": "HP:0000002", - "phenodigm_score": "2.0852572919897328", - "subject_id": "ZP:0000473", - } - }, - "object_termset": [ - {"HP:0000001": {"id": "HP:0000001", "label": "All (HPO)"}}, - {"HP:0000002": {"id": "HP:0000002", "label": "Abnormality of body height (HPO)"}}, - ], - "object_best_matches": { - "HP:0000001": { - "match_source": "HP:0000001", - "match_source_label": "All (HPO)", - "match_target": "ZP:0000473", - "match_target_label": "whole organism decreased length, abnormal (ZPO)", - "score": "0", - }, - "HP:0000002": { - "match_source": "HP:0000002", - "match_source_label": "Abnormality of body height (HPO)", - "match_target": "ZP:0000473", - "match_target_label": "whole organism decreased length, abnormal (ZPO)", - "score": "10.870744934490885", - }, - }, - "object_best_matches_similarity_map": { - "HP:0000001": { - "ancestor_id": "NO_ANCESTOR_FOUND", - "ancestor_information_content": "0", - "ancestor_label": "", - "cosine_similarity": "NaN", - "jaccard_similarity": "0", - "object_id": "ZP:0000473", - "phenodigm_score": "0", - "subject_id": "HP:0000001", - }, - "HP:0000002": { - "ancestor_id": "UPHENO:0075159", - "ancestor_information_content": "10.870744934490885", - "ancestor_label": "", - "cosine_similarity": "NaN", - "jaccard_similarity": "0.4", - "object_id": "ZP:0000473", - "phenodigm_score": "2.0852572919897328", - "subject_id": "HP:0000002", - }, - }, - "average_score": 8.153058700868163, - "best_score": 10.870744934490885, - "metric": "ancestor_information_content", - }, - "ZFIN:ZDB-GENE-070117-1423", - ], - [ - 8.153058700868163, - { - "subject_termset": [ - {"ZP:0000473": {"id": "ZP:0000473", "label": "whole organism decreased length, abnormal (ZPO)"}} - ], - "subject_best_matches": { - "ZP:0000473": { - "match_source": "ZP:0000473", - "match_source_label": "whole organism decreased length, abnormal (ZPO)", - "match_target": "HP:0000002", - "match_target_label": "Abnormality of body height (HPO)", - "score": "10.870744934490885", - } - }, - "subject_best_matches_similarity_map": { - "ZP:0000473": { - "ancestor_id": "UPHENO:0075159", - "ancestor_information_content": "10.870744934490885", - "ancestor_label": "", - "cosine_similarity": "NaN", - "jaccard_similarity": "0.4", - "object_id": "HP:0000002", - "phenodigm_score": "2.0852572919897328", - "subject_id": "ZP:0000473", - } - }, - "object_termset": [ - {"HP:0000001": {"id": "HP:0000001", "label": "All (HPO)"}}, - {"HP:0000002": {"id": "HP:0000002", "label": "Abnormality of body height (HPO)"}}, - ], - "object_best_matches": { - "HP:0000001": { - "match_source": "HP:0000001", - "match_source_label": "All (HPO)", - "match_target": "ZP:0000473", - "match_target_label": "whole organism decreased length, abnormal (ZPO)", - "score": "0", - }, - "HP:0000002": { - "match_source": "HP:0000002", - "match_source_label": "Abnormality of body height (HPO)", - "match_target": "ZP:0000473", - "match_target_label": "whole organism decreased length, abnormal (ZPO)", - "score": "10.870744934490885", - }, - }, - "object_best_matches_similarity_map": { - "HP:0000001": { - "ancestor_id": "NO_ANCESTOR_FOUND", - "ancestor_information_content": "0", - "ancestor_label": "", - "cosine_similarity": "NaN", - "jaccard_similarity": "0", - "object_id": "ZP:0000473", - "phenodigm_score": "0", - "subject_id": "HP:0000001", - }, - "HP:0000002": { - "ancestor_id": "UPHENO:0075159", - "ancestor_information_content": "10.870744934490885", - "ancestor_label": "", - "cosine_similarity": "NaN", - "jaccard_similarity": "0.4", - "object_id": "ZP:0000473", - "phenodigm_score": "2.0852572919897328", - "subject_id": "HP:0000002", - }, - }, - "average_score": 8.153058700868163, - "best_score": 10.870744934490885, - "metric": "ancestor_information_content", - }, - "ZFIN:ZDB-GENE-100729-3", - ], - [ - 7.661460799028868, - { - "subject_termset": [ - {"ZP:0014819": {"id": "ZP:0014819", "label": "growth decreased process quality, abnormal (ZPO)"}}, - {"ZP:0000473": {"id": "ZP:0000473", "label": "whole organism decreased length, abnormal (ZPO)"}}, - ], - "subject_best_matches": { - "ZP:0000473": { - "match_source": "ZP:0000473", - "match_source_label": "whole organism decreased length, abnormal (ZPO)", - "match_target": "HP:0000002", - "match_target_label": "Abnormality of body height (HPO)", - "score": "10.870744934490885", - }, - "ZP:0014819": { - "match_source": "ZP:0014819", - "match_source_label": "growth decreased process quality, abnormal (ZPO)", - "match_target": "HP:0000002", - "match_target_label": "Abnormality of body height (HPO)", - "score": "8.904353327133704", - }, - }, - "subject_best_matches_similarity_map": { - "ZP:0000473": { - "ancestor_id": "UPHENO:0075159", - "ancestor_information_content": "10.870744934490885", - "ancestor_label": "", - "cosine_similarity": "NaN", - "jaccard_similarity": "0.4", - "object_id": "HP:0000002", - "phenodigm_score": "2.0852572919897328", - "subject_id": "ZP:0000473", - }, - "ZP:0014819": { - "ancestor_id": "UPHENO:0049874", - "ancestor_information_content": "8.904353327133704", - "ancestor_label": "", - "cosine_similarity": "NaN", - "jaccard_similarity": "0.3333333333333333", - "object_id": "HP:0000002", - "phenodigm_score": "1.7228226187600493", - "subject_id": "ZP:0014819", - }, - }, - "object_termset": [ - {"HP:0000001": {"id": "HP:0000001", "label": "All (HPO)"}}, - {"HP:0000002": {"id": "HP:0000002", "label": "Abnormality of body height (HPO)"}}, - ], - "object_best_matches": { - "HP:0000001": { - "match_source": "HP:0000001", - "match_source_label": "All (HPO)", - "match_target": "ZP:0014819", - "match_target_label": "growth decreased process quality, abnormal (ZPO)", - "score": "0", - }, - "HP:0000002": { - "match_source": "HP:0000002", - "match_source_label": "Abnormality of body height (HPO)", - "match_target": "ZP:0000473", - "match_target_label": "whole organism decreased length, abnormal (ZPO)", - "score": "10.870744934490885", - }, - }, - "object_best_matches_similarity_map": { - "HP:0000001": { - "ancestor_id": "NO_ANCESTOR_FOUND", - "ancestor_information_content": "0", - "ancestor_label": "", - "cosine_similarity": "NaN", - "jaccard_similarity": "0", - "object_id": "ZP:0014819", - "phenodigm_score": "0", - "subject_id": "HP:0000001", - }, - "HP:0000002": { - "ancestor_id": "UPHENO:0075159", - "ancestor_information_content": "10.870744934490885", - "ancestor_label": "", - "cosine_similarity": "NaN", - "jaccard_similarity": "0.4", - "object_id": "ZP:0000473", - "phenodigm_score": "2.0852572919897328", - "subject_id": "HP:0000002", - }, - }, - "average_score": 7.661460799028868, - "best_score": 10.870744934490885, - "metric": "ancestor_information_content", - }, - "ZFIN:ZDB-GENE-120919-4", - ], - [ - 6.283193403469026, - { - "subject_termset": [ - {"ZP:0000324": {"id": "ZP:0000324", "label": "whole organism decreased size, abnormal (ZPO)"}}, - {"ZP:0001589": {"id": "ZP:0001589", "label": "embryo development disrupted, abnormal (ZPO)"}}, - ], - "subject_best_matches": { - "ZP:0000324": { - "match_source": "ZP:0000324", - "match_source_label": "whole organism decreased size, abnormal (ZPO)", - "match_target": "HP:0000002", - "match_target_label": "Abnormality of body height (HPO)", - "score": "10.870744934490885", - }, - "ZP:0001589": { - "match_source": "ZP:0001589", - "match_source_label": "embryo development disrupted, abnormal (ZPO)", - "match_target": "HP:0000002", - "match_target_label": "Abnormality of body height (HPO)", - "score": "3.3912837448943334", - }, - }, - "subject_best_matches_similarity_map": { - "ZP:0000324": { - "ancestor_id": "UPHENO:0075159", - "ancestor_information_content": "10.870744934490885", - "ancestor_label": "", - "cosine_similarity": "NaN", - "jaccard_similarity": "0.45714285714285713", - "object_id": "HP:0000002", - "phenodigm_score": "2.22923381425646", - "subject_id": "ZP:0000324", - }, - "ZP:0001589": { - "ancestor_id": "UPHENO:0049587", - "ancestor_information_content": "3.3912837448943334", - "ancestor_label": "", - "cosine_similarity": "NaN", - "jaccard_similarity": "0.2727272727272727", - "object_id": "HP:0000002", - "phenodigm_score": "0.9617149093101155", - "subject_id": "ZP:0001589", - }, - }, - "object_termset": [ - {"HP:0000001": {"id": "HP:0000001", "label": "All (HPO)"}}, - {"HP:0000002": {"id": "HP:0000002", "label": "Abnormality of body height (HPO)"}}, - ], - "object_best_matches": { - "HP:0000001": { - "match_source": "HP:0000001", - "match_source_label": "All (HPO)", - "match_target": "ZP:0001589", - "match_target_label": "embryo development disrupted, abnormal (ZPO)", - "score": "0", - }, - "HP:0000002": { - "match_source": "HP:0000002", - "match_source_label": "Abnormality of body height (HPO)", - "match_target": "ZP:0000324", - "match_target_label": "whole organism decreased size, abnormal (ZPO)", - "score": "10.870744934490885", - }, - }, - "object_best_matches_similarity_map": { - "HP:0000001": { - "ancestor_id": "NO_ANCESTOR_FOUND", - "ancestor_information_content": "0", - "ancestor_label": "", - "cosine_similarity": "NaN", - "jaccard_similarity": "0", - "object_id": "ZP:0001589", - "phenodigm_score": "0", - "subject_id": "HP:0000001", - }, - "HP:0000002": { - "ancestor_id": "UPHENO:0075159", - "ancestor_information_content": "10.870744934490885", - "ancestor_label": "", - "cosine_similarity": "NaN", - "jaccard_similarity": "0.45714285714285713", - "object_id": "ZP:0000324", - "phenodigm_score": "2.22923381425646", - "subject_id": "HP:0000002", - }, - }, - "average_score": 6.283193403469026, - "best_score": 10.870744934490885, - "metric": "ancestor_information_content", - }, - "ZFIN:ZDB-GENE-130726-2", - ], + SemsimSearchResult( + subject_id="ZFIN:ZDB-GENE-070117-1426", + score=8.153058700868163, + similarity=TermSetPairwiseSimilarity( + subject_termset={ + "ZP:0002909": TermInfo(id="ZP:0002909", label="whole organism dwarf-like, abnormal (ZPO)") + }, + object_termset={ + "HP:0000001": TermInfo(id="HP:0000001", label="All (HPO)"), + "HP:0000002": TermInfo(id="HP:0000002", label="Abnormality of body height (HPO)"), + }, + subject_best_matches={ + "ZP:0002909": BestMatch( + match_source="ZP:0002909", + match_source_label="whole organism dwarf-like, abnormal (ZPO)", + match_target="HP:0000002", + match_target_label="Abnormality of body height (HPO)", + score=10.870744934490885, + match_subsumer=None, + match_subsumer_label=None, + similarity=TermPairwiseSimilarity( + subject_id="ZP:0002909", + subject_label=None, + subject_source=None, + object_id="HP:0000002", + object_label=None, + object_source=None, + ancestor_id="UPHENO:0075159", + ancestor_label="", + ancestor_source=None, + object_information_content=None, + subject_information_content=None, + ancestor_information_content=10.870744934490885, + jaccard_similarity=0.4444444444444444, + cosine_similarity=None, + dice_similarity=None, + phenodigm_score=2.198054183387448, + ), + ) + }, + object_best_matches={ + "HP:0000001": BestMatch( + match_source="HP:0000001", + match_source_label="All (HPO)", + match_target="ZP:0002909", + match_target_label="whole organism dwarf-like, abnormal (ZPO)", + score=0.0, + match_subsumer=None, + match_subsumer_label=None, + similarity=TermPairwiseSimilarity( + subject_id="HP:0000001", + subject_label=None, + subject_source=None, + object_id="ZP:0002909", + object_label=None, + object_source=None, + ancestor_id="NO_ANCESTOR_FOUND", + ancestor_label="", + ancestor_source=None, + object_information_content=None, + subject_information_content=None, + ancestor_information_content=0.0, + jaccard_similarity=0.0, + cosine_similarity=None, + dice_similarity=None, + phenodigm_score=0.0, + ), + ), + "HP:0000002": BestMatch( + match_source="HP:0000002", + match_source_label="Abnormality of body height (HPO)", + match_target="ZP:0002909", + match_target_label="whole organism dwarf-like, abnormal (ZPO)", + score=10.870744934490885, + match_subsumer=None, + match_subsumer_label=None, + similarity=TermPairwiseSimilarity( + subject_id="HP:0000002", + subject_label=None, + subject_source=None, + object_id="ZP:0002909", + object_label=None, + object_source=None, + ancestor_id="UPHENO:0075159", + ancestor_label="", + ancestor_source=None, + object_information_content=None, + subject_information_content=None, + ancestor_information_content=10.870744934490885, + jaccard_similarity=0.4444444444444444, + cosine_similarity=None, + dice_similarity=None, + phenodigm_score=2.198054183387448, + ), + ), + }, + average_score=8.153058700868163, + best_score=10.870744934490885, + metric="ancestor_information_content", + ), + ), + SemsimSearchResult( + subject_id="ZFIN:ZDB-GENE-081022-128", + score=8.153058700868163, + similarity=TermSetPairwiseSimilarity( + subject_termset={ + "ZP:0000473": TermInfo(id="ZP:0000473", label="whole organism decreased length, abnormal (ZPO)") + }, + object_termset={ + "HP:0000002": TermInfo(id="HP:0000002", label="Abnormality of body height (HPO)"), + "HP:0000001": TermInfo(id="HP:0000001", label="All (HPO)"), + }, + subject_best_matches={ + "ZP:0000473": BestMatch( + match_source="ZP:0000473", + match_source_label="whole organism decreased length, abnormal (ZPO)", + match_target="HP:0000002", + match_target_label="Abnormality of body height (HPO)", + score=10.870744934490885, + match_subsumer=None, + match_subsumer_label=None, + similarity=TermPairwiseSimilarity( + subject_id="ZP:0000473", + subject_label=None, + subject_source=None, + object_id="HP:0000002", + object_label=None, + object_source=None, + ancestor_id="UPHENO:0075159", + ancestor_label="", + ancestor_source=None, + object_information_content=None, + subject_information_content=None, + ancestor_information_content=10.870744934490885, + jaccard_similarity=0.4, + cosine_similarity=None, + dice_similarity=None, + phenodigm_score=2.0852572919897328, + ), + ) + }, + object_best_matches={ + "HP:0000001": BestMatch( + match_source="HP:0000001", + match_source_label="All (HPO)", + match_target="ZP:0000473", + match_target_label="whole organism decreased length, abnormal (ZPO)", + score=0.0, + match_subsumer=None, + match_subsumer_label=None, + similarity=TermPairwiseSimilarity( + subject_id="HP:0000001", + subject_label=None, + subject_source=None, + object_id="ZP:0000473", + object_label=None, + object_source=None, + ancestor_id="NO_ANCESTOR_FOUND", + ancestor_label="", + ancestor_source=None, + object_information_content=None, + subject_information_content=None, + ancestor_information_content=0.0, + jaccard_similarity=0.0, + cosine_similarity=None, + dice_similarity=None, + phenodigm_score=0.0, + ), + ), + "HP:0000002": BestMatch( + match_source="HP:0000002", + match_source_label="Abnormality of body height (HPO)", + match_target="ZP:0000473", + match_target_label="whole organism decreased length, abnormal (ZPO)", + score=10.870744934490885, + match_subsumer=None, + match_subsumer_label=None, + similarity=TermPairwiseSimilarity( + subject_id="HP:0000002", + subject_label=None, + subject_source=None, + object_id="ZP:0000473", + object_label=None, + object_source=None, + ancestor_id="UPHENO:0075159", + ancestor_label="", + ancestor_source=None, + object_information_content=None, + subject_information_content=None, + ancestor_information_content=10.870744934490885, + jaccard_similarity=0.4, + cosine_similarity=None, + dice_similarity=None, + phenodigm_score=2.0852572919897328, + ), + ), + }, + average_score=8.153058700868163, + best_score=10.870744934490885, + metric="ancestor_information_content", + ), + ), + SemsimSearchResult( + subject_id="ZFIN:ZDB-GENE-111209-1", + score=8.153058700868163, + similarity=TermSetPairwiseSimilarity( + subject_termset={ + "ZP:0000473": TermInfo(id="ZP:0000473", label="whole organism decreased length, abnormal (ZPO)") + }, + object_termset={ + "HP:0000002": TermInfo(id="HP:0000002", label="Abnormality of body height (HPO)"), + "HP:0000001": TermInfo(id="HP:0000001", label="All (HPO)"), + }, + subject_best_matches={ + "ZP:0000473": BestMatch( + match_source="ZP:0000473", + match_source_label="whole organism decreased length, abnormal (ZPO)", + match_target="HP:0000002", + match_target_label="Abnormality of body height (HPO)", + score=10.870744934490885, + match_subsumer=None, + match_subsumer_label=None, + similarity=TermPairwiseSimilarity( + subject_id="ZP:0000473", + subject_label=None, + subject_source=None, + object_id="HP:0000002", + object_label=None, + object_source=None, + ancestor_id="UPHENO:0075159", + ancestor_label="", + ancestor_source=None, + object_information_content=None, + subject_information_content=None, + ancestor_information_content=10.870744934490885, + jaccard_similarity=0.4, + cosine_similarity=None, + dice_similarity=None, + phenodigm_score=2.0852572919897328, + ), + ) + }, + object_best_matches={ + "HP:0000001": BestMatch( + match_source="HP:0000001", + match_source_label="All (HPO)", + match_target="ZP:0000473", + match_target_label="whole organism decreased length, abnormal (ZPO)", + score=0.0, + match_subsumer=None, + match_subsumer_label=None, + similarity=TermPairwiseSimilarity( + subject_id="HP:0000001", + subject_label=None, + subject_source=None, + object_id="ZP:0000473", + object_label=None, + object_source=None, + ancestor_id="NO_ANCESTOR_FOUND", + ancestor_label="", + ancestor_source=None, + object_information_content=None, + subject_information_content=None, + ancestor_information_content=0.0, + jaccard_similarity=0.0, + cosine_similarity=None, + dice_similarity=None, + phenodigm_score=0.0, + ), + ), + "HP:0000002": BestMatch( + match_source="HP:0000002", + match_source_label="Abnormality of body height (HPO)", + match_target="ZP:0000473", + match_target_label="whole organism decreased length, abnormal (ZPO)", + score=10.870744934490885, + match_subsumer=None, + match_subsumer_label=None, + similarity=TermPairwiseSimilarity( + subject_id="HP:0000002", + subject_label=None, + subject_source=None, + object_id="ZP:0000473", + object_label=None, + object_source=None, + ancestor_id="UPHENO:0075159", + ancestor_label="", + ancestor_source=None, + object_information_content=None, + subject_information_content=None, + ancestor_information_content=10.870744934490885, + jaccard_similarity=0.4, + cosine_similarity=None, + dice_similarity=None, + phenodigm_score=2.0852572919897328, + ), + ), + }, + average_score=8.153058700868163, + best_score=10.870744934490885, + metric="ancestor_information_content", + ), + ), + SemsimSearchResult( + subject_id="ZFIN:ZDB-GENE-070117-1424", + score=8.153058700868163, + similarity=TermSetPairwiseSimilarity( + subject_termset={ + "ZP:0000473": TermInfo(id="ZP:0000473", label="whole organism decreased length, abnormal (ZPO)") + }, + object_termset={ + "HP:0000001": TermInfo(id="HP:0000001", label="All (HPO)"), + "HP:0000002": TermInfo(id="HP:0000002", label="Abnormality of body height (HPO)"), + }, + subject_best_matches={ + "ZP:0000473": BestMatch( + match_source="ZP:0000473", + match_source_label="whole organism decreased length, abnormal (ZPO)", + match_target="HP:0000002", + match_target_label="Abnormality of body height (HPO)", + score=10.870744934490885, + match_subsumer=None, + match_subsumer_label=None, + similarity=TermPairwiseSimilarity( + subject_id="ZP:0000473", + subject_label=None, + subject_source=None, + object_id="HP:0000002", + object_label=None, + object_source=None, + ancestor_id="UPHENO:0075159", + ancestor_label="", + ancestor_source=None, + object_information_content=None, + subject_information_content=None, + ancestor_information_content=10.870744934490885, + jaccard_similarity=0.4, + cosine_similarity=None, + dice_similarity=None, + phenodigm_score=2.0852572919897328, + ), + ) + }, + object_best_matches={ + "HP:0000001": BestMatch( + match_source="HP:0000001", + match_source_label="All (HPO)", + match_target="ZP:0000473", + match_target_label="whole organism decreased length, abnormal (ZPO)", + score=0.0, + match_subsumer=None, + match_subsumer_label=None, + similarity=TermPairwiseSimilarity( + subject_id="HP:0000001", + subject_label=None, + subject_source=None, + object_id="ZP:0000473", + object_label=None, + object_source=None, + ancestor_id="NO_ANCESTOR_FOUND", + ancestor_label="", + ancestor_source=None, + object_information_content=None, + subject_information_content=None, + ancestor_information_content=0.0, + jaccard_similarity=0.0, + cosine_similarity=None, + dice_similarity=None, + phenodigm_score=0.0, + ), + ), + "HP:0000002": BestMatch( + match_source="HP:0000002", + match_source_label="Abnormality of body height (HPO)", + match_target="ZP:0000473", + match_target_label="whole organism decreased length, abnormal (ZPO)", + score=10.870744934490885, + match_subsumer=None, + match_subsumer_label=None, + similarity=TermPairwiseSimilarity( + subject_id="HP:0000002", + subject_label=None, + subject_source=None, + object_id="ZP:0000473", + object_label=None, + object_source=None, + ancestor_id="UPHENO:0075159", + ancestor_label="", + ancestor_source=None, + object_information_content=None, + subject_information_content=None, + ancestor_information_content=10.870744934490885, + jaccard_similarity=0.4, + cosine_similarity=None, + dice_similarity=None, + phenodigm_score=2.0852572919897328, + ), + ), + }, + average_score=8.153058700868163, + best_score=10.870744934490885, + metric="ancestor_information_content", + ), + ), + SemsimSearchResult( + subject_id="ZFIN:ZDB-GENE-030131-4487", + score=8.153058700868163, + similarity=TermSetPairwiseSimilarity( + subject_termset={ + "ZP:0000473": TermInfo(id="ZP:0000473", label="whole organism decreased length, abnormal (ZPO)") + }, + object_termset={ + "HP:0000002": TermInfo(id="HP:0000002", label="Abnormality of body height (HPO)"), + "HP:0000001": TermInfo(id="HP:0000001", label="All (HPO)"), + }, + subject_best_matches={ + "ZP:0000473": BestMatch( + match_source="ZP:0000473", + match_source_label="whole organism decreased length, abnormal (ZPO)", + match_target="HP:0000002", + match_target_label="Abnormality of body height (HPO)", + score=10.870744934490885, + match_subsumer=None, + match_subsumer_label=None, + similarity=TermPairwiseSimilarity( + subject_id="ZP:0000473", + subject_label=None, + subject_source=None, + object_id="HP:0000002", + object_label=None, + object_source=None, + ancestor_id="UPHENO:0075159", + ancestor_label="", + ancestor_source=None, + object_information_content=None, + subject_information_content=None, + ancestor_information_content=10.870744934490885, + jaccard_similarity=0.4, + cosine_similarity=None, + dice_similarity=None, + phenodigm_score=2.0852572919897328, + ), + ) + }, + object_best_matches={ + "HP:0000001": BestMatch( + match_source="HP:0000001", + match_source_label="All (HPO)", + match_target="ZP:0000473", + match_target_label="whole organism decreased length, abnormal (ZPO)", + score=0.0, + match_subsumer=None, + match_subsumer_label=None, + similarity=TermPairwiseSimilarity( + subject_id="HP:0000001", + subject_label=None, + subject_source=None, + object_id="ZP:0000473", + object_label=None, + object_source=None, + ancestor_id="NO_ANCESTOR_FOUND", + ancestor_label="", + ancestor_source=None, + object_information_content=None, + subject_information_content=None, + ancestor_information_content=0.0, + jaccard_similarity=0.0, + cosine_similarity=None, + dice_similarity=None, + phenodigm_score=0.0, + ), + ), + "HP:0000002": BestMatch( + match_source="HP:0000002", + match_source_label="Abnormality of body height (HPO)", + match_target="ZP:0000473", + match_target_label="whole organism decreased length, abnormal (ZPO)", + score=10.870744934490885, + match_subsumer=None, + match_subsumer_label=None, + similarity=TermPairwiseSimilarity( + subject_id="HP:0000002", + subject_label=None, + subject_source=None, + object_id="ZP:0000473", + object_label=None, + object_source=None, + ancestor_id="UPHENO:0075159", + ancestor_label="", + ancestor_source=None, + object_information_content=None, + subject_information_content=None, + ancestor_information_content=10.870744934490885, + jaccard_similarity=0.4, + cosine_similarity=None, + dice_similarity=None, + phenodigm_score=2.0852572919897328, + ), + ), + }, + average_score=8.153058700868163, + best_score=10.870744934490885, + metric="ancestor_information_content", + ), + ), + SemsimSearchResult( + subject_id="ZFIN:ZDB-GENE-070117-1594", + score=8.153058700868163, + similarity=TermSetPairwiseSimilarity( + subject_termset={ + "ZP:0000473": TermInfo(id="ZP:0000473", label="whole organism decreased length, abnormal (ZPO)") + }, + object_termset={ + "HP:0000001": TermInfo(id="HP:0000001", label="All (HPO)"), + "HP:0000002": TermInfo(id="HP:0000002", label="Abnormality of body height (HPO)"), + }, + subject_best_matches={ + "ZP:0000473": BestMatch( + match_source="ZP:0000473", + match_source_label="whole organism decreased length, abnormal (ZPO)", + match_target="HP:0000002", + match_target_label="Abnormality of body height (HPO)", + score=10.870744934490885, + match_subsumer=None, + match_subsumer_label=None, + similarity=TermPairwiseSimilarity( + subject_id="ZP:0000473", + subject_label=None, + subject_source=None, + object_id="HP:0000002", + object_label=None, + object_source=None, + ancestor_id="UPHENO:0075159", + ancestor_label="", + ancestor_source=None, + object_information_content=None, + subject_information_content=None, + ancestor_information_content=10.870744934490885, + jaccard_similarity=0.4, + cosine_similarity=None, + dice_similarity=None, + phenodigm_score=2.0852572919897328, + ), + ) + }, + object_best_matches={ + "HP:0000001": BestMatch( + match_source="HP:0000001", + match_source_label="All (HPO)", + match_target="ZP:0000473", + match_target_label="whole organism decreased length, abnormal (ZPO)", + score=0.0, + match_subsumer=None, + match_subsumer_label=None, + similarity=TermPairwiseSimilarity( + subject_id="HP:0000001", + subject_label=None, + subject_source=None, + object_id="ZP:0000473", + object_label=None, + object_source=None, + ancestor_id="NO_ANCESTOR_FOUND", + ancestor_label="", + ancestor_source=None, + object_information_content=None, + subject_information_content=None, + ancestor_information_content=0.0, + jaccard_similarity=0.0, + cosine_similarity=None, + dice_similarity=None, + phenodigm_score=0.0, + ), + ), + "HP:0000002": BestMatch( + match_source="HP:0000002", + match_source_label="Abnormality of body height (HPO)", + match_target="ZP:0000473", + match_target_label="whole organism decreased length, abnormal (ZPO)", + score=10.870744934490885, + match_subsumer=None, + match_subsumer_label=None, + similarity=TermPairwiseSimilarity( + subject_id="HP:0000002", + subject_label=None, + subject_source=None, + object_id="ZP:0000473", + object_label=None, + object_source=None, + ancestor_id="UPHENO:0075159", + ancestor_label="", + ancestor_source=None, + object_information_content=None, + subject_information_content=None, + ancestor_information_content=10.870744934490885, + jaccard_similarity=0.4, + cosine_similarity=None, + dice_similarity=None, + phenodigm_score=2.0852572919897328, + ), + ), + }, + average_score=8.153058700868163, + best_score=10.870744934490885, + metric="ancestor_information_content", + ), + ), + SemsimSearchResult( + subject_id="ZFIN:ZDB-GENE-070117-1423", + score=8.153058700868163, + similarity=TermSetPairwiseSimilarity( + subject_termset={ + "ZP:0000473": TermInfo(id="ZP:0000473", label="whole organism decreased length, abnormal (ZPO)") + }, + object_termset={ + "HP:0000002": TermInfo(id="HP:0000002", label="Abnormality of body height (HPO)"), + "HP:0000001": TermInfo(id="HP:0000001", label="All (HPO)"), + }, + subject_best_matches={ + "ZP:0000473": BestMatch( + match_source="ZP:0000473", + match_source_label="whole organism decreased length, abnormal (ZPO)", + match_target="HP:0000002", + match_target_label="Abnormality of body height (HPO)", + score=10.870744934490885, + match_subsumer=None, + match_subsumer_label=None, + similarity=TermPairwiseSimilarity( + subject_id="ZP:0000473", + subject_label=None, + subject_source=None, + object_id="HP:0000002", + object_label=None, + object_source=None, + ancestor_id="UPHENO:0075159", + ancestor_label="", + ancestor_source=None, + object_information_content=None, + subject_information_content=None, + ancestor_information_content=10.870744934490885, + jaccard_similarity=0.4, + cosine_similarity=None, + dice_similarity=None, + phenodigm_score=2.0852572919897328, + ), + ) + }, + object_best_matches={ + "HP:0000001": BestMatch( + match_source="HP:0000001", + match_source_label="All (HPO)", + match_target="ZP:0000473", + match_target_label="whole organism decreased length, abnormal (ZPO)", + score=0.0, + match_subsumer=None, + match_subsumer_label=None, + similarity=TermPairwiseSimilarity( + subject_id="HP:0000001", + subject_label=None, + subject_source=None, + object_id="ZP:0000473", + object_label=None, + object_source=None, + ancestor_id="NO_ANCESTOR_FOUND", + ancestor_label="", + ancestor_source=None, + object_information_content=None, + subject_information_content=None, + ancestor_information_content=0.0, + jaccard_similarity=0.0, + cosine_similarity=None, + dice_similarity=None, + phenodigm_score=0.0, + ), + ), + "HP:0000002": BestMatch( + match_source="HP:0000002", + match_source_label="Abnormality of body height (HPO)", + match_target="ZP:0000473", + match_target_label="whole organism decreased length, abnormal (ZPO)", + score=10.870744934490885, + match_subsumer=None, + match_subsumer_label=None, + similarity=TermPairwiseSimilarity( + subject_id="HP:0000002", + subject_label=None, + subject_source=None, + object_id="ZP:0000473", + object_label=None, + object_source=None, + ancestor_id="UPHENO:0075159", + ancestor_label="", + ancestor_source=None, + object_information_content=None, + subject_information_content=None, + ancestor_information_content=10.870744934490885, + jaccard_similarity=0.4, + cosine_similarity=None, + dice_similarity=None, + phenodigm_score=2.0852572919897328, + ), + ), + }, + average_score=8.153058700868163, + best_score=10.870744934490885, + metric="ancestor_information_content", + ), + ), + SemsimSearchResult( + subject_id="ZFIN:ZDB-GENE-100729-3", + score=8.153058700868163, + similarity=TermSetPairwiseSimilarity( + subject_termset={ + "ZP:0000473": TermInfo(id="ZP:0000473", label="whole organism decreased length, abnormal (ZPO)") + }, + object_termset={ + "HP:0000001": TermInfo(id="HP:0000001", label="All (HPO)"), + "HP:0000002": TermInfo(id="HP:0000002", label="Abnormality of body height (HPO)"), + }, + subject_best_matches={ + "ZP:0000473": BestMatch( + match_source="ZP:0000473", + match_source_label="whole organism decreased length, abnormal (ZPO)", + match_target="HP:0000002", + match_target_label="Abnormality of body height (HPO)", + score=10.870744934490885, + match_subsumer=None, + match_subsumer_label=None, + similarity=TermPairwiseSimilarity( + subject_id="ZP:0000473", + subject_label=None, + subject_source=None, + object_id="HP:0000002", + object_label=None, + object_source=None, + ancestor_id="UPHENO:0075159", + ancestor_label="", + ancestor_source=None, + object_information_content=None, + subject_information_content=None, + ancestor_information_content=10.870744934490885, + jaccard_similarity=0.4, + cosine_similarity=None, + dice_similarity=None, + phenodigm_score=2.0852572919897328, + ), + ) + }, + object_best_matches={ + "HP:0000001": BestMatch( + match_source="HP:0000001", + match_source_label="All (HPO)", + match_target="ZP:0000473", + match_target_label="whole organism decreased length, abnormal (ZPO)", + score=0.0, + match_subsumer=None, + match_subsumer_label=None, + similarity=TermPairwiseSimilarity( + subject_id="HP:0000001", + subject_label=None, + subject_source=None, + object_id="ZP:0000473", + object_label=None, + object_source=None, + ancestor_id="NO_ANCESTOR_FOUND", + ancestor_label="", + ancestor_source=None, + object_information_content=None, + subject_information_content=None, + ancestor_information_content=0.0, + jaccard_similarity=0.0, + cosine_similarity=None, + dice_similarity=None, + phenodigm_score=0.0, + ), + ), + "HP:0000002": BestMatch( + match_source="HP:0000002", + match_source_label="Abnormality of body height (HPO)", + match_target="ZP:0000473", + match_target_label="whole organism decreased length, abnormal (ZPO)", + score=10.870744934490885, + match_subsumer=None, + match_subsumer_label=None, + similarity=TermPairwiseSimilarity( + subject_id="HP:0000002", + subject_label=None, + subject_source=None, + object_id="ZP:0000473", + object_label=None, + object_source=None, + ancestor_id="UPHENO:0075159", + ancestor_label="", + ancestor_source=None, + object_information_content=None, + subject_information_content=None, + ancestor_information_content=10.870744934490885, + jaccard_similarity=0.4, + cosine_similarity=None, + dice_similarity=None, + phenodigm_score=2.0852572919897328, + ), + ), + }, + average_score=8.153058700868163, + best_score=10.870744934490885, + metric="ancestor_information_content", + ), + ), + SemsimSearchResult( + subject_id="ZFIN:ZDB-GENE-120919-4", + score=7.661460799028868, + similarity=TermSetPairwiseSimilarity( + subject_termset={ + "ZP:0014819": TermInfo(id="ZP:0014819", label="growth decreased process quality, abnormal (ZPO)"), + "ZP:0000473": TermInfo(id="ZP:0000473", label="whole organism decreased length, abnormal (ZPO)"), + }, + object_termset={ + "HP:0000002": TermInfo(id="HP:0000002", label="Abnormality of body height (HPO)"), + "HP:0000001": TermInfo(id="HP:0000001", label="All (HPO)"), + }, + subject_best_matches={ + "ZP:0000473": BestMatch( + match_source="ZP:0000473", + match_source_label="whole organism decreased length, abnormal (ZPO)", + match_target="HP:0000002", + match_target_label="Abnormality of body height (HPO)", + score=10.870744934490885, + match_subsumer=None, + match_subsumer_label=None, + similarity=TermPairwiseSimilarity( + subject_id="ZP:0000473", + subject_label=None, + subject_source=None, + object_id="HP:0000002", + object_label=None, + object_source=None, + ancestor_id="UPHENO:0075159", + ancestor_label="", + ancestor_source=None, + object_information_content=None, + subject_information_content=None, + ancestor_information_content=10.870744934490885, + jaccard_similarity=0.4, + cosine_similarity=None, + dice_similarity=None, + phenodigm_score=2.0852572919897328, + ), + ), + "ZP:0014819": BestMatch( + match_source="ZP:0014819", + match_source_label="growth decreased process quality, abnormal (ZPO)", + match_target="HP:0000002", + match_target_label="Abnormality of body height (HPO)", + score=8.904353327133704, + match_subsumer=None, + match_subsumer_label=None, + similarity=TermPairwiseSimilarity( + subject_id="ZP:0014819", + subject_label=None, + subject_source=None, + object_id="HP:0000002", + object_label=None, + object_source=None, + ancestor_id="UPHENO:0049874", + ancestor_label="", + ancestor_source=None, + object_information_content=None, + subject_information_content=None, + ancestor_information_content=8.904353327133704, + jaccard_similarity=0.3333333333333333, + cosine_similarity=None, + dice_similarity=None, + phenodigm_score=1.7228226187600493, + ), + ), + }, + object_best_matches={ + "HP:0000001": BestMatch( + match_source="HP:0000001", + match_source_label="All (HPO)", + match_target="ZP:0014819", + match_target_label="growth decreased process quality, abnormal (ZPO)", + score=0.0, + match_subsumer=None, + match_subsumer_label=None, + similarity=TermPairwiseSimilarity( + subject_id="HP:0000001", + subject_label=None, + subject_source=None, + object_id="ZP:0014819", + object_label=None, + object_source=None, + ancestor_id="NO_ANCESTOR_FOUND", + ancestor_label="", + ancestor_source=None, + object_information_content=None, + subject_information_content=None, + ancestor_information_content=0.0, + jaccard_similarity=0.0, + cosine_similarity=None, + dice_similarity=None, + phenodigm_score=0.0, + ), + ), + "HP:0000002": BestMatch( + match_source="HP:0000002", + match_source_label="Abnormality of body height (HPO)", + match_target="ZP:0000473", + match_target_label="whole organism decreased length, abnormal (ZPO)", + score=10.870744934490885, + match_subsumer=None, + match_subsumer_label=None, + similarity=TermPairwiseSimilarity( + subject_id="HP:0000002", + subject_label=None, + subject_source=None, + object_id="ZP:0000473", + object_label=None, + object_source=None, + ancestor_id="UPHENO:0075159", + ancestor_label="", + ancestor_source=None, + object_information_content=None, + subject_information_content=None, + ancestor_information_content=10.870744934490885, + jaccard_similarity=0.4, + cosine_similarity=None, + dice_similarity=None, + phenodigm_score=2.0852572919897328, + ), + ), + }, + average_score=7.661460799028868, + best_score=10.870744934490885, + metric="ancestor_information_content", + ), + ), + SemsimSearchResult( + subject_id="ZFIN:ZDB-GENE-130726-2", + score=6.283193403469026, + similarity=TermSetPairwiseSimilarity( + subject_termset={ + "ZP:0000324": TermInfo(id="ZP:0000324", label="whole organism decreased size, abnormal (ZPO)"), + "ZP:0001589": TermInfo(id="ZP:0001589", label="embryo development disrupted, abnormal (ZPO)"), + }, + object_termset={ + "HP:0000001": TermInfo(id="HP:0000001", label="All (HPO)"), + "HP:0000002": TermInfo(id="HP:0000002", label="Abnormality of body height (HPO)"), + }, + subject_best_matches={ + "ZP:0000324": BestMatch( + match_source="ZP:0000324", + match_source_label="whole organism decreased size, abnormal (ZPO)", + match_target="HP:0000002", + match_target_label="Abnormality of body height (HPO)", + score=10.870744934490885, + match_subsumer=None, + match_subsumer_label=None, + similarity=TermPairwiseSimilarity( + subject_id="ZP:0000324", + subject_label=None, + subject_source=None, + object_id="HP:0000002", + object_label=None, + object_source=None, + ancestor_id="UPHENO:0075159", + ancestor_label="", + ancestor_source=None, + object_information_content=None, + subject_information_content=None, + ancestor_information_content=10.870744934490885, + jaccard_similarity=0.45714285714285713, + cosine_similarity=None, + dice_similarity=None, + phenodigm_score=2.22923381425646, + ), + ), + "ZP:0001589": BestMatch( + match_source="ZP:0001589", + match_source_label="embryo development disrupted, abnormal (ZPO)", + match_target="HP:0000002", + match_target_label="Abnormality of body height (HPO)", + score=3.3912837448943334, + match_subsumer=None, + match_subsumer_label=None, + similarity=TermPairwiseSimilarity( + subject_id="ZP:0001589", + subject_label=None, + subject_source=None, + object_id="HP:0000002", + object_label=None, + object_source=None, + ancestor_id="UPHENO:0049587", + ancestor_label="", + ancestor_source=None, + object_information_content=None, + subject_information_content=None, + ancestor_information_content=3.3912837448943334, + jaccard_similarity=0.2727272727272727, + cosine_similarity=None, + dice_similarity=None, + phenodigm_score=0.9617149093101155, + ), + ), + }, + object_best_matches={ + "HP:0000001": BestMatch( + match_source="HP:0000001", + match_source_label="All (HPO)", + match_target="ZP:0001589", + match_target_label="embryo development disrupted, abnormal (ZPO)", + score=0.0, + match_subsumer=None, + match_subsumer_label=None, + similarity=TermPairwiseSimilarity( + subject_id="HP:0000001", + subject_label=None, + subject_source=None, + object_id="ZP:0001589", + object_label=None, + object_source=None, + ancestor_id="NO_ANCESTOR_FOUND", + ancestor_label="", + ancestor_source=None, + object_information_content=None, + subject_information_content=None, + ancestor_information_content=0.0, + jaccard_similarity=0.0, + cosine_similarity=None, + dice_similarity=None, + phenodigm_score=0.0, + ), + ), + "HP:0000002": BestMatch( + match_source="HP:0000002", + match_source_label="Abnormality of body height (HPO)", + match_target="ZP:0000324", + match_target_label="whole organism decreased size, abnormal (ZPO)", + score=10.870744934490885, + match_subsumer=None, + match_subsumer_label=None, + similarity=TermPairwiseSimilarity( + subject_id="HP:0000002", + subject_label=None, + subject_source=None, + object_id="ZP:0000324", + object_label=None, + object_source=None, + ancestor_id="UPHENO:0075159", + ancestor_label="", + ancestor_source=None, + object_information_content=None, + subject_information_content=None, + ancestor_information_content=10.870744934490885, + jaccard_similarity=0.45714285714285713, + cosine_similarity=None, + dice_similarity=None, + phenodigm_score=2.22923381425646, + ), + ), + }, + average_score=6.283193403469026, + best_score=10.870744934490885, + metric="ancestor_information_content", + ), + ), ] diff --git a/backend/tests/fixtures/search_response.py b/backend/tests/fixtures/search_response.py index 07e1cdf67..5bf67baca 100644 --- a/backend/tests/fixtures/search_response.py +++ b/backend/tests/fixtures/search_response.py @@ -5,7 +5,7 @@ def search_response(): return { "responseHeader": { - "QTime": 0, + "QTime": 2, "params": { "mm": "100%", "q": "fanconi", diff --git a/frontend/fixtures/phenotype-explorer-search.json b/frontend/fixtures/phenotype-explorer-search.json index b9b077c65..2083a07b5 100644 --- a/frontend/fixtures/phenotype-explorer-search.json +++ b/frontend/fixtures/phenotype-explorer-search.json @@ -1,948 +1,1166 @@ -[ - [ - 8.153058700868163, +{ + "items": [ { - "subject_termset": [ - { + "subject_id": "ZFIN:ZDB-GENE-070117-1426", + "score": 8.153058700868163, + "similarity": { + "subject_termset": { "ZP:0002909": { "id": "ZP:0002909", "label": "whole organism dwarf-like, abnormal (ZPO)" } - } - ], - "subject_best_matches": { - "ZP:0002909": { - "match_source": "ZP:0002909", - "match_source_label": "whole organism dwarf-like, abnormal (ZPO)", - "match_target": "HP:0000002", - "match_target_label": "Abnormality of body height (HPO)", - "score": "10.870744934490885" - } - }, - "subject_best_matches_similarity_map": { - "ZP:0002909": { - "ancestor_id": "UPHENO:0075159", - "ancestor_information_content": "10.870744934490885", - "ancestor_label": "", - "cosine_similarity": "NaN", - "jaccard_similarity": "0.4444444444444444", - "object_id": "HP:0000002", - "phenodigm_score": "2.198054183387448", - "subject_id": "ZP:0002909" - } - }, - "object_termset": [ - { + }, + "object_termset": { + "HP:0000001": { + "id": "HP:0000001", + "label": "All (HPO)" + }, "HP:0000002": { "id": "HP:0000002", "label": "Abnormality of body height (HPO)" } }, - { + "subject_best_matches": { + "ZP:0002909": { + "match_source": "ZP:0002909", + "match_source_label": "whole organism dwarf-like, abnormal (ZPO)", + "match_target": "HP:0000002", + "match_target_label": "Abnormality of body height (HPO)", + "score": 10.870744934490885, + "match_subsumer": null, + "match_subsumer_label": null, + "similarity": { + "subject_id": "ZP:0002909", + "subject_label": null, + "subject_source": null, + "object_id": "HP:0000002", + "object_label": null, + "object_source": null, + "ancestor_id": "UPHENO:0075159", + "ancestor_label": "", + "ancestor_source": null, + "object_information_content": null, + "subject_information_content": null, + "ancestor_information_content": 10.870744934490885, + "jaccard_similarity": 0.4444444444444444, + "cosine_similarity": null, + "dice_similarity": null, + "phenodigm_score": 2.198054183387448 + } + } + }, + "object_best_matches": { "HP:0000001": { - "id": "HP:0000001", - "label": "All (HPO)" + "match_source": "HP:0000001", + "match_source_label": "All (HPO)", + "match_target": "ZP:0002909", + "match_target_label": "whole organism dwarf-like, abnormal (ZPO)", + "score": 0.0, + "match_subsumer": null, + "match_subsumer_label": null, + "similarity": { + "subject_id": "HP:0000001", + "subject_label": null, + "subject_source": null, + "object_id": "ZP:0002909", + "object_label": null, + "object_source": null, + "ancestor_id": "NO_ANCESTOR_FOUND", + "ancestor_label": "", + "ancestor_source": null, + "object_information_content": null, + "subject_information_content": null, + "ancestor_information_content": 0.0, + "jaccard_similarity": 0.0, + "cosine_similarity": null, + "dice_similarity": null, + "phenodigm_score": 0.0 + } + }, + "HP:0000002": { + "match_source": "HP:0000002", + "match_source_label": "Abnormality of body height (HPO)", + "match_target": "ZP:0002909", + "match_target_label": "whole organism dwarf-like, abnormal (ZPO)", + "score": 10.870744934490885, + "match_subsumer": null, + "match_subsumer_label": null, + "similarity": { + "subject_id": "HP:0000002", + "subject_label": null, + "subject_source": null, + "object_id": "ZP:0002909", + "object_label": null, + "object_source": null, + "ancestor_id": "UPHENO:0075159", + "ancestor_label": "", + "ancestor_source": null, + "object_information_content": null, + "subject_information_content": null, + "ancestor_information_content": 10.870744934490885, + "jaccard_similarity": 0.4444444444444444, + "cosine_similarity": null, + "dice_similarity": null, + "phenodigm_score": 2.198054183387448 + } } - } - ], - "object_best_matches": { - "HP:0000001": { - "match_source": "HP:0000001", - "match_source_label": "All (HPO)", - "match_target": "ZP:0002909", - "match_target_label": "whole organism dwarf-like, abnormal (ZPO)", - "score": "0" - }, - "HP:0000002": { - "match_source": "HP:0000002", - "match_source_label": "Abnormality of body height (HPO)", - "match_target": "ZP:0002909", - "match_target_label": "whole organism dwarf-like, abnormal (ZPO)", - "score": "10.870744934490885" - } - }, - "object_best_matches_similarity_map": { - "HP:0000001": { - "ancestor_id": "NO_ANCESTOR_FOUND", - "ancestor_information_content": "0", - "ancestor_label": "", - "cosine_similarity": "NaN", - "jaccard_similarity": "0", - "object_id": "ZP:0002909", - "phenodigm_score": "0", - "subject_id": "HP:0000001" - }, - "HP:0000002": { - "ancestor_id": "UPHENO:0075159", - "ancestor_information_content": "10.870744934490885", - "ancestor_label": "", - "cosine_similarity": "NaN", - "jaccard_similarity": "0.4444444444444444", - "object_id": "ZP:0002909", - "phenodigm_score": "2.198054183387448", - "subject_id": "HP:0000002" - } - }, - "average_score": 8.153058700868163, - "best_score": 10.870744934490885, - "metric": "ancestor_information_content" + }, + "average_score": 8.153058700868163, + "best_score": 10.870744934490885, + "metric": "ancestor_information_content" + } }, - "ZFIN:ZDB-GENE-070117-1426" - ], - [ - 8.153058700868163, { - "subject_termset": [ - { + "subject_id": "ZFIN:ZDB-GENE-081022-128", + "score": 8.153058700868163, + "similarity": { + "subject_termset": { "ZP:0000473": { "id": "ZP:0000473", "label": "whole organism decreased length, abnormal (ZPO)" } - } - ], - "subject_best_matches": { - "ZP:0000473": { - "match_source": "ZP:0000473", - "match_source_label": "whole organism decreased length, abnormal (ZPO)", - "match_target": "HP:0000002", - "match_target_label": "Abnormality of body height (HPO)", - "score": "10.870744934490885" - } - }, - "subject_best_matches_similarity_map": { - "ZP:0000473": { - "ancestor_id": "UPHENO:0075159", - "ancestor_information_content": "10.870744934490885", - "ancestor_label": "", - "cosine_similarity": "NaN", - "jaccard_similarity": "0.4", - "object_id": "HP:0000002", - "phenodigm_score": "2.0852572919897328", - "subject_id": "ZP:0000473" - } - }, - "object_termset": [ - { + }, + "object_termset": { + "HP:0000002": { + "id": "HP:0000002", + "label": "Abnormality of body height (HPO)" + }, "HP:0000001": { "id": "HP:0000001", "label": "All (HPO)" } }, - { + "subject_best_matches": { + "ZP:0000473": { + "match_source": "ZP:0000473", + "match_source_label": "whole organism decreased length, abnormal (ZPO)", + "match_target": "HP:0000002", + "match_target_label": "Abnormality of body height (HPO)", + "score": 10.870744934490885, + "match_subsumer": null, + "match_subsumer_label": null, + "similarity": { + "subject_id": "ZP:0000473", + "subject_label": null, + "subject_source": null, + "object_id": "HP:0000002", + "object_label": null, + "object_source": null, + "ancestor_id": "UPHENO:0075159", + "ancestor_label": "", + "ancestor_source": null, + "object_information_content": null, + "subject_information_content": null, + "ancestor_information_content": 10.870744934490885, + "jaccard_similarity": 0.4, + "cosine_similarity": null, + "dice_similarity": null, + "phenodigm_score": 2.0852572919897328 + } + } + }, + "object_best_matches": { + "HP:0000001": { + "match_source": "HP:0000001", + "match_source_label": "All (HPO)", + "match_target": "ZP:0000473", + "match_target_label": "whole organism decreased length, abnormal (ZPO)", + "score": 0.0, + "match_subsumer": null, + "match_subsumer_label": null, + "similarity": { + "subject_id": "HP:0000001", + "subject_label": null, + "subject_source": null, + "object_id": "ZP:0000473", + "object_label": null, + "object_source": null, + "ancestor_id": "NO_ANCESTOR_FOUND", + "ancestor_label": "", + "ancestor_source": null, + "object_information_content": null, + "subject_information_content": null, + "ancestor_information_content": 0.0, + "jaccard_similarity": 0.0, + "cosine_similarity": null, + "dice_similarity": null, + "phenodigm_score": 0.0 + } + }, "HP:0000002": { - "id": "HP:0000002", - "label": "Abnormality of body height (HPO)" + "match_source": "HP:0000002", + "match_source_label": "Abnormality of body height (HPO)", + "match_target": "ZP:0000473", + "match_target_label": "whole organism decreased length, abnormal (ZPO)", + "score": 10.870744934490885, + "match_subsumer": null, + "match_subsumer_label": null, + "similarity": { + "subject_id": "HP:0000002", + "subject_label": null, + "subject_source": null, + "object_id": "ZP:0000473", + "object_label": null, + "object_source": null, + "ancestor_id": "UPHENO:0075159", + "ancestor_label": "", + "ancestor_source": null, + "object_information_content": null, + "subject_information_content": null, + "ancestor_information_content": 10.870744934490885, + "jaccard_similarity": 0.4, + "cosine_similarity": null, + "dice_similarity": null, + "phenodigm_score": 2.0852572919897328 + } } - } - ], - "object_best_matches": { - "HP:0000001": { - "match_source": "HP:0000001", - "match_source_label": "All (HPO)", - "match_target": "ZP:0000473", - "match_target_label": "whole organism decreased length, abnormal (ZPO)", - "score": "0" - }, - "HP:0000002": { - "match_source": "HP:0000002", - "match_source_label": "Abnormality of body height (HPO)", - "match_target": "ZP:0000473", - "match_target_label": "whole organism decreased length, abnormal (ZPO)", - "score": "10.870744934490885" - } - }, - "object_best_matches_similarity_map": { - "HP:0000001": { - "ancestor_id": "NO_ANCESTOR_FOUND", - "ancestor_information_content": "0", - "ancestor_label": "", - "cosine_similarity": "NaN", - "jaccard_similarity": "0", - "object_id": "ZP:0000473", - "phenodigm_score": "0", - "subject_id": "HP:0000001" - }, - "HP:0000002": { - "ancestor_id": "UPHENO:0075159", - "ancestor_information_content": "10.870744934490885", - "ancestor_label": "", - "cosine_similarity": "NaN", - "jaccard_similarity": "0.4", - "object_id": "ZP:0000473", - "phenodigm_score": "2.0852572919897328", - "subject_id": "HP:0000002" - } - }, - "average_score": 8.153058700868163, - "best_score": 10.870744934490885, - "metric": "ancestor_information_content" + }, + "average_score": 8.153058700868163, + "best_score": 10.870744934490885, + "metric": "ancestor_information_content" + } }, - "ZFIN:ZDB-GENE-081022-128" - ], - [ - 8.153058700868163, { - "subject_termset": [ - { + "subject_id": "ZFIN:ZDB-GENE-111209-1", + "score": 8.153058700868163, + "similarity": { + "subject_termset": { "ZP:0000473": { "id": "ZP:0000473", "label": "whole organism decreased length, abnormal (ZPO)" } - } - ], - "subject_best_matches": { - "ZP:0000473": { - "match_source": "ZP:0000473", - "match_source_label": "whole organism decreased length, abnormal (ZPO)", - "match_target": "HP:0000002", - "match_target_label": "Abnormality of body height (HPO)", - "score": "10.870744934490885" - } - }, - "subject_best_matches_similarity_map": { - "ZP:0000473": { - "ancestor_id": "UPHENO:0075159", - "ancestor_information_content": "10.870744934490885", - "ancestor_label": "", - "cosine_similarity": "NaN", - "jaccard_similarity": "0.4", - "object_id": "HP:0000002", - "phenodigm_score": "2.0852572919897328", - "subject_id": "ZP:0000473" - } - }, - "object_termset": [ - { + }, + "object_termset": { "HP:0000002": { "id": "HP:0000002", "label": "Abnormality of body height (HPO)" - } - }, - { + }, "HP:0000001": { "id": "HP:0000001", "label": "All (HPO)" } - } - ], - "object_best_matches": { - "HP:0000001": { - "match_source": "HP:0000001", - "match_source_label": "All (HPO)", - "match_target": "ZP:0000473", - "match_target_label": "whole organism decreased length, abnormal (ZPO)", - "score": "0" - }, - "HP:0000002": { - "match_source": "HP:0000002", - "match_source_label": "Abnormality of body height (HPO)", - "match_target": "ZP:0000473", - "match_target_label": "whole organism decreased length, abnormal (ZPO)", - "score": "10.870744934490885" - } - }, - "object_best_matches_similarity_map": { - "HP:0000001": { - "ancestor_id": "NO_ANCESTOR_FOUND", - "ancestor_information_content": "0", - "ancestor_label": "", - "cosine_similarity": "NaN", - "jaccard_similarity": "0", - "object_id": "ZP:0000473", - "phenodigm_score": "0", - "subject_id": "HP:0000001" - }, - "HP:0000002": { - "ancestor_id": "UPHENO:0075159", - "ancestor_information_content": "10.870744934490885", - "ancestor_label": "", - "cosine_similarity": "NaN", - "jaccard_similarity": "0.4", - "object_id": "ZP:0000473", - "phenodigm_score": "2.0852572919897328", - "subject_id": "HP:0000002" - } - }, - "average_score": 8.153058700868163, - "best_score": 10.870744934490885, - "metric": "ancestor_information_content" + }, + "subject_best_matches": { + "ZP:0000473": { + "match_source": "ZP:0000473", + "match_source_label": "whole organism decreased length, abnormal (ZPO)", + "match_target": "HP:0000002", + "match_target_label": "Abnormality of body height (HPO)", + "score": 10.870744934490885, + "match_subsumer": null, + "match_subsumer_label": null, + "similarity": { + "subject_id": "ZP:0000473", + "subject_label": null, + "subject_source": null, + "object_id": "HP:0000002", + "object_label": null, + "object_source": null, + "ancestor_id": "UPHENO:0075159", + "ancestor_label": "", + "ancestor_source": null, + "object_information_content": null, + "subject_information_content": null, + "ancestor_information_content": 10.870744934490885, + "jaccard_similarity": 0.4, + "cosine_similarity": null, + "dice_similarity": null, + "phenodigm_score": 2.0852572919897328 + } + } + }, + "object_best_matches": { + "HP:0000001": { + "match_source": "HP:0000001", + "match_source_label": "All (HPO)", + "match_target": "ZP:0000473", + "match_target_label": "whole organism decreased length, abnormal (ZPO)", + "score": 0.0, + "match_subsumer": null, + "match_subsumer_label": null, + "similarity": { + "subject_id": "HP:0000001", + "subject_label": null, + "subject_source": null, + "object_id": "ZP:0000473", + "object_label": null, + "object_source": null, + "ancestor_id": "NO_ANCESTOR_FOUND", + "ancestor_label": "", + "ancestor_source": null, + "object_information_content": null, + "subject_information_content": null, + "ancestor_information_content": 0.0, + "jaccard_similarity": 0.0, + "cosine_similarity": null, + "dice_similarity": null, + "phenodigm_score": 0.0 + } + }, + "HP:0000002": { + "match_source": "HP:0000002", + "match_source_label": "Abnormality of body height (HPO)", + "match_target": "ZP:0000473", + "match_target_label": "whole organism decreased length, abnormal (ZPO)", + "score": 10.870744934490885, + "match_subsumer": null, + "match_subsumer_label": null, + "similarity": { + "subject_id": "HP:0000002", + "subject_label": null, + "subject_source": null, + "object_id": "ZP:0000473", + "object_label": null, + "object_source": null, + "ancestor_id": "UPHENO:0075159", + "ancestor_label": "", + "ancestor_source": null, + "object_information_content": null, + "subject_information_content": null, + "ancestor_information_content": 10.870744934490885, + "jaccard_similarity": 0.4, + "cosine_similarity": null, + "dice_similarity": null, + "phenodigm_score": 2.0852572919897328 + } + } + }, + "average_score": 8.153058700868163, + "best_score": 10.870744934490885, + "metric": "ancestor_information_content" + } }, - "ZFIN:ZDB-GENE-111209-1" - ], - [ - 8.153058700868163, { - "subject_termset": [ - { + "subject_id": "ZFIN:ZDB-GENE-070117-1424", + "score": 8.153058700868163, + "similarity": { + "subject_termset": { "ZP:0000473": { "id": "ZP:0000473", "label": "whole organism decreased length, abnormal (ZPO)" } - } - ], - "subject_best_matches": { - "ZP:0000473": { - "match_source": "ZP:0000473", - "match_source_label": "whole organism decreased length, abnormal (ZPO)", - "match_target": "HP:0000002", - "match_target_label": "Abnormality of body height (HPO)", - "score": "10.870744934490885" - } - }, - "subject_best_matches_similarity_map": { - "ZP:0000473": { - "ancestor_id": "UPHENO:0075159", - "ancestor_information_content": "10.870744934490885", - "ancestor_label": "", - "cosine_similarity": "NaN", - "jaccard_similarity": "0.4", - "object_id": "HP:0000002", - "phenodigm_score": "2.0852572919897328", - "subject_id": "ZP:0000473" - } - }, - "object_termset": [ - { + }, + "object_termset": { "HP:0000001": { "id": "HP:0000001", "label": "All (HPO)" - } - }, - { + }, "HP:0000002": { "id": "HP:0000002", "label": "Abnormality of body height (HPO)" } - } - ], - "object_best_matches": { - "HP:0000001": { - "match_source": "HP:0000001", - "match_source_label": "All (HPO)", - "match_target": "ZP:0000473", - "match_target_label": "whole organism decreased length, abnormal (ZPO)", - "score": "0" - }, - "HP:0000002": { - "match_source": "HP:0000002", - "match_source_label": "Abnormality of body height (HPO)", - "match_target": "ZP:0000473", - "match_target_label": "whole organism decreased length, abnormal (ZPO)", - "score": "10.870744934490885" - } - }, - "object_best_matches_similarity_map": { - "HP:0000001": { - "ancestor_id": "NO_ANCESTOR_FOUND", - "ancestor_information_content": "0", - "ancestor_label": "", - "cosine_similarity": "NaN", - "jaccard_similarity": "0", - "object_id": "ZP:0000473", - "phenodigm_score": "0", - "subject_id": "HP:0000001" - }, - "HP:0000002": { - "ancestor_id": "UPHENO:0075159", - "ancestor_information_content": "10.870744934490885", - "ancestor_label": "", - "cosine_similarity": "NaN", - "jaccard_similarity": "0.4", - "object_id": "ZP:0000473", - "phenodigm_score": "2.0852572919897328", - "subject_id": "HP:0000002" - } - }, - "average_score": 8.153058700868163, - "best_score": 10.870744934490885, - "metric": "ancestor_information_content" + }, + "subject_best_matches": { + "ZP:0000473": { + "match_source": "ZP:0000473", + "match_source_label": "whole organism decreased length, abnormal (ZPO)", + "match_target": "HP:0000002", + "match_target_label": "Abnormality of body height (HPO)", + "score": 10.870744934490885, + "match_subsumer": null, + "match_subsumer_label": null, + "similarity": { + "subject_id": "ZP:0000473", + "subject_label": null, + "subject_source": null, + "object_id": "HP:0000002", + "object_label": null, + "object_source": null, + "ancestor_id": "UPHENO:0075159", + "ancestor_label": "", + "ancestor_source": null, + "object_information_content": null, + "subject_information_content": null, + "ancestor_information_content": 10.870744934490885, + "jaccard_similarity": 0.4, + "cosine_similarity": null, + "dice_similarity": null, + "phenodigm_score": 2.0852572919897328 + } + } + }, + "object_best_matches": { + "HP:0000001": { + "match_source": "HP:0000001", + "match_source_label": "All (HPO)", + "match_target": "ZP:0000473", + "match_target_label": "whole organism decreased length, abnormal (ZPO)", + "score": 0.0, + "match_subsumer": null, + "match_subsumer_label": null, + "similarity": { + "subject_id": "HP:0000001", + "subject_label": null, + "subject_source": null, + "object_id": "ZP:0000473", + "object_label": null, + "object_source": null, + "ancestor_id": "NO_ANCESTOR_FOUND", + "ancestor_label": "", + "ancestor_source": null, + "object_information_content": null, + "subject_information_content": null, + "ancestor_information_content": 0.0, + "jaccard_similarity": 0.0, + "cosine_similarity": null, + "dice_similarity": null, + "phenodigm_score": 0.0 + } + }, + "HP:0000002": { + "match_source": "HP:0000002", + "match_source_label": "Abnormality of body height (HPO)", + "match_target": "ZP:0000473", + "match_target_label": "whole organism decreased length, abnormal (ZPO)", + "score": 10.870744934490885, + "match_subsumer": null, + "match_subsumer_label": null, + "similarity": { + "subject_id": "HP:0000002", + "subject_label": null, + "subject_source": null, + "object_id": "ZP:0000473", + "object_label": null, + "object_source": null, + "ancestor_id": "UPHENO:0075159", + "ancestor_label": "", + "ancestor_source": null, + "object_information_content": null, + "subject_information_content": null, + "ancestor_information_content": 10.870744934490885, + "jaccard_similarity": 0.4, + "cosine_similarity": null, + "dice_similarity": null, + "phenodigm_score": 2.0852572919897328 + } + } + }, + "average_score": 8.153058700868163, + "best_score": 10.870744934490885, + "metric": "ancestor_information_content" + } }, - "ZFIN:ZDB-GENE-070117-1424" - ], - [ - 8.153058700868163, { - "subject_termset": [ - { + "subject_id": "ZFIN:ZDB-GENE-030131-4487", + "score": 8.153058700868163, + "similarity": { + "subject_termset": { "ZP:0000473": { "id": "ZP:0000473", "label": "whole organism decreased length, abnormal (ZPO)" } - } - ], - "subject_best_matches": { - "ZP:0000473": { - "match_source": "ZP:0000473", - "match_source_label": "whole organism decreased length, abnormal (ZPO)", - "match_target": "HP:0000002", - "match_target_label": "Abnormality of body height (HPO)", - "score": "10.870744934490885" - } - }, - "subject_best_matches_similarity_map": { - "ZP:0000473": { - "ancestor_id": "UPHENO:0075159", - "ancestor_information_content": "10.870744934490885", - "ancestor_label": "", - "cosine_similarity": "NaN", - "jaccard_similarity": "0.4", - "object_id": "HP:0000002", - "phenodigm_score": "2.0852572919897328", - "subject_id": "ZP:0000473" - } - }, - "object_termset": [ - { + }, + "object_termset": { "HP:0000002": { "id": "HP:0000002", "label": "Abnormality of body height (HPO)" - } - }, - { + }, "HP:0000001": { "id": "HP:0000001", "label": "All (HPO)" } - } - ], - "object_best_matches": { - "HP:0000001": { - "match_source": "HP:0000001", - "match_source_label": "All (HPO)", - "match_target": "ZP:0000473", - "match_target_label": "whole organism decreased length, abnormal (ZPO)", - "score": "0" - }, - "HP:0000002": { - "match_source": "HP:0000002", - "match_source_label": "Abnormality of body height (HPO)", - "match_target": "ZP:0000473", - "match_target_label": "whole organism decreased length, abnormal (ZPO)", - "score": "10.870744934490885" - } - }, - "object_best_matches_similarity_map": { - "HP:0000001": { - "ancestor_id": "NO_ANCESTOR_FOUND", - "ancestor_information_content": "0", - "ancestor_label": "", - "cosine_similarity": "NaN", - "jaccard_similarity": "0", - "object_id": "ZP:0000473", - "phenodigm_score": "0", - "subject_id": "HP:0000001" - }, - "HP:0000002": { - "ancestor_id": "UPHENO:0075159", - "ancestor_information_content": "10.870744934490885", - "ancestor_label": "", - "cosine_similarity": "NaN", - "jaccard_similarity": "0.4", - "object_id": "ZP:0000473", - "phenodigm_score": "2.0852572919897328", - "subject_id": "HP:0000002" - } - }, - "average_score": 8.153058700868163, - "best_score": 10.870744934490885, - "metric": "ancestor_information_content" + }, + "subject_best_matches": { + "ZP:0000473": { + "match_source": "ZP:0000473", + "match_source_label": "whole organism decreased length, abnormal (ZPO)", + "match_target": "HP:0000002", + "match_target_label": "Abnormality of body height (HPO)", + "score": 10.870744934490885, + "match_subsumer": null, + "match_subsumer_label": null, + "similarity": { + "subject_id": "ZP:0000473", + "subject_label": null, + "subject_source": null, + "object_id": "HP:0000002", + "object_label": null, + "object_source": null, + "ancestor_id": "UPHENO:0075159", + "ancestor_label": "", + "ancestor_source": null, + "object_information_content": null, + "subject_information_content": null, + "ancestor_information_content": 10.870744934490885, + "jaccard_similarity": 0.4, + "cosine_similarity": null, + "dice_similarity": null, + "phenodigm_score": 2.0852572919897328 + } + } + }, + "object_best_matches": { + "HP:0000001": { + "match_source": "HP:0000001", + "match_source_label": "All (HPO)", + "match_target": "ZP:0000473", + "match_target_label": "whole organism decreased length, abnormal (ZPO)", + "score": 0.0, + "match_subsumer": null, + "match_subsumer_label": null, + "similarity": { + "subject_id": "HP:0000001", + "subject_label": null, + "subject_source": null, + "object_id": "ZP:0000473", + "object_label": null, + "object_source": null, + "ancestor_id": "NO_ANCESTOR_FOUND", + "ancestor_label": "", + "ancestor_source": null, + "object_information_content": null, + "subject_information_content": null, + "ancestor_information_content": 0.0, + "jaccard_similarity": 0.0, + "cosine_similarity": null, + "dice_similarity": null, + "phenodigm_score": 0.0 + } + }, + "HP:0000002": { + "match_source": "HP:0000002", + "match_source_label": "Abnormality of body height (HPO)", + "match_target": "ZP:0000473", + "match_target_label": "whole organism decreased length, abnormal (ZPO)", + "score": 10.870744934490885, + "match_subsumer": null, + "match_subsumer_label": null, + "similarity": { + "subject_id": "HP:0000002", + "subject_label": null, + "subject_source": null, + "object_id": "ZP:0000473", + "object_label": null, + "object_source": null, + "ancestor_id": "UPHENO:0075159", + "ancestor_label": "", + "ancestor_source": null, + "object_information_content": null, + "subject_information_content": null, + "ancestor_information_content": 10.870744934490885, + "jaccard_similarity": 0.4, + "cosine_similarity": null, + "dice_similarity": null, + "phenodigm_score": 2.0852572919897328 + } + } + }, + "average_score": 8.153058700868163, + "best_score": 10.870744934490885, + "metric": "ancestor_information_content" + } }, - "ZFIN:ZDB-GENE-030131-4487" - ], - [ - 8.153058700868163, { - "subject_termset": [ - { + "subject_id": "ZFIN:ZDB-GENE-070117-1594", + "score": 8.153058700868163, + "similarity": { + "subject_termset": { "ZP:0000473": { "id": "ZP:0000473", "label": "whole organism decreased length, abnormal (ZPO)" } - } - ], - "subject_best_matches": { - "ZP:0000473": { - "match_source": "ZP:0000473", - "match_source_label": "whole organism decreased length, abnormal (ZPO)", - "match_target": "HP:0000002", - "match_target_label": "Abnormality of body height (HPO)", - "score": "10.870744934490885" - } - }, - "subject_best_matches_similarity_map": { - "ZP:0000473": { - "ancestor_id": "UPHENO:0075159", - "ancestor_information_content": "10.870744934490885", - "ancestor_label": "", - "cosine_similarity": "NaN", - "jaccard_similarity": "0.4", - "object_id": "HP:0000002", - "phenodigm_score": "2.0852572919897328", - "subject_id": "ZP:0000473" - } - }, - "object_termset": [ - { + }, + "object_termset": { "HP:0000001": { "id": "HP:0000001", "label": "All (HPO)" - } - }, - { + }, "HP:0000002": { "id": "HP:0000002", "label": "Abnormality of body height (HPO)" } - } - ], - "object_best_matches": { - "HP:0000001": { - "match_source": "HP:0000001", - "match_source_label": "All (HPO)", - "match_target": "ZP:0000473", - "match_target_label": "whole organism decreased length, abnormal (ZPO)", - "score": "0" - }, - "HP:0000002": { - "match_source": "HP:0000002", - "match_source_label": "Abnormality of body height (HPO)", - "match_target": "ZP:0000473", - "match_target_label": "whole organism decreased length, abnormal (ZPO)", - "score": "10.870744934490885" - } - }, - "object_best_matches_similarity_map": { - "HP:0000001": { - "ancestor_id": "NO_ANCESTOR_FOUND", - "ancestor_information_content": "0", - "ancestor_label": "", - "cosine_similarity": "NaN", - "jaccard_similarity": "0", - "object_id": "ZP:0000473", - "phenodigm_score": "0", - "subject_id": "HP:0000001" - }, - "HP:0000002": { - "ancestor_id": "UPHENO:0075159", - "ancestor_information_content": "10.870744934490885", - "ancestor_label": "", - "cosine_similarity": "NaN", - "jaccard_similarity": "0.4", - "object_id": "ZP:0000473", - "phenodigm_score": "2.0852572919897328", - "subject_id": "HP:0000002" - } - }, - "average_score": 8.153058700868163, - "best_score": 10.870744934490885, - "metric": "ancestor_information_content" + }, + "subject_best_matches": { + "ZP:0000473": { + "match_source": "ZP:0000473", + "match_source_label": "whole organism decreased length, abnormal (ZPO)", + "match_target": "HP:0000002", + "match_target_label": "Abnormality of body height (HPO)", + "score": 10.870744934490885, + "match_subsumer": null, + "match_subsumer_label": null, + "similarity": { + "subject_id": "ZP:0000473", + "subject_label": null, + "subject_source": null, + "object_id": "HP:0000002", + "object_label": null, + "object_source": null, + "ancestor_id": "UPHENO:0075159", + "ancestor_label": "", + "ancestor_source": null, + "object_information_content": null, + "subject_information_content": null, + "ancestor_information_content": 10.870744934490885, + "jaccard_similarity": 0.4, + "cosine_similarity": null, + "dice_similarity": null, + "phenodigm_score": 2.0852572919897328 + } + } + }, + "object_best_matches": { + "HP:0000001": { + "match_source": "HP:0000001", + "match_source_label": "All (HPO)", + "match_target": "ZP:0000473", + "match_target_label": "whole organism decreased length, abnormal (ZPO)", + "score": 0.0, + "match_subsumer": null, + "match_subsumer_label": null, + "similarity": { + "subject_id": "HP:0000001", + "subject_label": null, + "subject_source": null, + "object_id": "ZP:0000473", + "object_label": null, + "object_source": null, + "ancestor_id": "NO_ANCESTOR_FOUND", + "ancestor_label": "", + "ancestor_source": null, + "object_information_content": null, + "subject_information_content": null, + "ancestor_information_content": 0.0, + "jaccard_similarity": 0.0, + "cosine_similarity": null, + "dice_similarity": null, + "phenodigm_score": 0.0 + } + }, + "HP:0000002": { + "match_source": "HP:0000002", + "match_source_label": "Abnormality of body height (HPO)", + "match_target": "ZP:0000473", + "match_target_label": "whole organism decreased length, abnormal (ZPO)", + "score": 10.870744934490885, + "match_subsumer": null, + "match_subsumer_label": null, + "similarity": { + "subject_id": "HP:0000002", + "subject_label": null, + "subject_source": null, + "object_id": "ZP:0000473", + "object_label": null, + "object_source": null, + "ancestor_id": "UPHENO:0075159", + "ancestor_label": "", + "ancestor_source": null, + "object_information_content": null, + "subject_information_content": null, + "ancestor_information_content": 10.870744934490885, + "jaccard_similarity": 0.4, + "cosine_similarity": null, + "dice_similarity": null, + "phenodigm_score": 2.0852572919897328 + } + } + }, + "average_score": 8.153058700868163, + "best_score": 10.870744934490885, + "metric": "ancestor_information_content" + } }, - "ZFIN:ZDB-GENE-070117-1594" - ], - [ - 8.153058700868163, { - "subject_termset": [ - { + "subject_id": "ZFIN:ZDB-GENE-070117-1423", + "score": 8.153058700868163, + "similarity": { + "subject_termset": { "ZP:0000473": { "id": "ZP:0000473", "label": "whole organism decreased length, abnormal (ZPO)" } - } - ], - "subject_best_matches": { - "ZP:0000473": { - "match_source": "ZP:0000473", - "match_source_label": "whole organism decreased length, abnormal (ZPO)", - "match_target": "HP:0000002", - "match_target_label": "Abnormality of body height (HPO)", - "score": "10.870744934490885" - } - }, - "subject_best_matches_similarity_map": { - "ZP:0000473": { - "ancestor_id": "UPHENO:0075159", - "ancestor_information_content": "10.870744934490885", - "ancestor_label": "", - "cosine_similarity": "NaN", - "jaccard_similarity": "0.4", - "object_id": "HP:0000002", - "phenodigm_score": "2.0852572919897328", - "subject_id": "ZP:0000473" - } - }, - "object_termset": [ - { + }, + "object_termset": { + "HP:0000002": { + "id": "HP:0000002", + "label": "Abnormality of body height (HPO)" + }, "HP:0000001": { "id": "HP:0000001", "label": "All (HPO)" } }, - { + "subject_best_matches": { + "ZP:0000473": { + "match_source": "ZP:0000473", + "match_source_label": "whole organism decreased length, abnormal (ZPO)", + "match_target": "HP:0000002", + "match_target_label": "Abnormality of body height (HPO)", + "score": 10.870744934490885, + "match_subsumer": null, + "match_subsumer_label": null, + "similarity": { + "subject_id": "ZP:0000473", + "subject_label": null, + "subject_source": null, + "object_id": "HP:0000002", + "object_label": null, + "object_source": null, + "ancestor_id": "UPHENO:0075159", + "ancestor_label": "", + "ancestor_source": null, + "object_information_content": null, + "subject_information_content": null, + "ancestor_information_content": 10.870744934490885, + "jaccard_similarity": 0.4, + "cosine_similarity": null, + "dice_similarity": null, + "phenodigm_score": 2.0852572919897328 + } + } + }, + "object_best_matches": { + "HP:0000001": { + "match_source": "HP:0000001", + "match_source_label": "All (HPO)", + "match_target": "ZP:0000473", + "match_target_label": "whole organism decreased length, abnormal (ZPO)", + "score": 0.0, + "match_subsumer": null, + "match_subsumer_label": null, + "similarity": { + "subject_id": "HP:0000001", + "subject_label": null, + "subject_source": null, + "object_id": "ZP:0000473", + "object_label": null, + "object_source": null, + "ancestor_id": "NO_ANCESTOR_FOUND", + "ancestor_label": "", + "ancestor_source": null, + "object_information_content": null, + "subject_information_content": null, + "ancestor_information_content": 0.0, + "jaccard_similarity": 0.0, + "cosine_similarity": null, + "dice_similarity": null, + "phenodigm_score": 0.0 + } + }, "HP:0000002": { - "id": "HP:0000002", - "label": "Abnormality of body height (HPO)" + "match_source": "HP:0000002", + "match_source_label": "Abnormality of body height (HPO)", + "match_target": "ZP:0000473", + "match_target_label": "whole organism decreased length, abnormal (ZPO)", + "score": 10.870744934490885, + "match_subsumer": null, + "match_subsumer_label": null, + "similarity": { + "subject_id": "HP:0000002", + "subject_label": null, + "subject_source": null, + "object_id": "ZP:0000473", + "object_label": null, + "object_source": null, + "ancestor_id": "UPHENO:0075159", + "ancestor_label": "", + "ancestor_source": null, + "object_information_content": null, + "subject_information_content": null, + "ancestor_information_content": 10.870744934490885, + "jaccard_similarity": 0.4, + "cosine_similarity": null, + "dice_similarity": null, + "phenodigm_score": 2.0852572919897328 + } } - } - ], - "object_best_matches": { - "HP:0000001": { - "match_source": "HP:0000001", - "match_source_label": "All (HPO)", - "match_target": "ZP:0000473", - "match_target_label": "whole organism decreased length, abnormal (ZPO)", - "score": "0" - }, - "HP:0000002": { - "match_source": "HP:0000002", - "match_source_label": "Abnormality of body height (HPO)", - "match_target": "ZP:0000473", - "match_target_label": "whole organism decreased length, abnormal (ZPO)", - "score": "10.870744934490885" - } - }, - "object_best_matches_similarity_map": { - "HP:0000001": { - "ancestor_id": "NO_ANCESTOR_FOUND", - "ancestor_information_content": "0", - "ancestor_label": "", - "cosine_similarity": "NaN", - "jaccard_similarity": "0", - "object_id": "ZP:0000473", - "phenodigm_score": "0", - "subject_id": "HP:0000001" - }, - "HP:0000002": { - "ancestor_id": "UPHENO:0075159", - "ancestor_information_content": "10.870744934490885", - "ancestor_label": "", - "cosine_similarity": "NaN", - "jaccard_similarity": "0.4", - "object_id": "ZP:0000473", - "phenodigm_score": "2.0852572919897328", - "subject_id": "HP:0000002" - } - }, - "average_score": 8.153058700868163, - "best_score": 10.870744934490885, - "metric": "ancestor_information_content" + }, + "average_score": 8.153058700868163, + "best_score": 10.870744934490885, + "metric": "ancestor_information_content" + } }, - "ZFIN:ZDB-GENE-070117-1423" - ], - [ - 8.153058700868163, { - "subject_termset": [ - { + "subject_id": "ZFIN:ZDB-GENE-100729-3", + "score": 8.153058700868163, + "similarity": { + "subject_termset": { "ZP:0000473": { "id": "ZP:0000473", "label": "whole organism decreased length, abnormal (ZPO)" } - } - ], - "subject_best_matches": { - "ZP:0000473": { - "match_source": "ZP:0000473", - "match_source_label": "whole organism decreased length, abnormal (ZPO)", - "match_target": "HP:0000002", - "match_target_label": "Abnormality of body height (HPO)", - "score": "10.870744934490885" - } - }, - "subject_best_matches_similarity_map": { - "ZP:0000473": { - "ancestor_id": "UPHENO:0075159", - "ancestor_information_content": "10.870744934490885", - "ancestor_label": "", - "cosine_similarity": "NaN", - "jaccard_similarity": "0.4", - "object_id": "HP:0000002", - "phenodigm_score": "2.0852572919897328", - "subject_id": "ZP:0000473" - } - }, - "object_termset": [ - { + }, + "object_termset": { "HP:0000001": { "id": "HP:0000001", "label": "All (HPO)" - } - }, - { + }, "HP:0000002": { "id": "HP:0000002", "label": "Abnormality of body height (HPO)" } - } - ], - "object_best_matches": { - "HP:0000001": { - "match_source": "HP:0000001", - "match_source_label": "All (HPO)", - "match_target": "ZP:0000473", - "match_target_label": "whole organism decreased length, abnormal (ZPO)", - "score": "0" - }, - "HP:0000002": { - "match_source": "HP:0000002", - "match_source_label": "Abnormality of body height (HPO)", - "match_target": "ZP:0000473", - "match_target_label": "whole organism decreased length, abnormal (ZPO)", - "score": "10.870744934490885" - } - }, - "object_best_matches_similarity_map": { - "HP:0000001": { - "ancestor_id": "NO_ANCESTOR_FOUND", - "ancestor_information_content": "0", - "ancestor_label": "", - "cosine_similarity": "NaN", - "jaccard_similarity": "0", - "object_id": "ZP:0000473", - "phenodigm_score": "0", - "subject_id": "HP:0000001" - }, - "HP:0000002": { - "ancestor_id": "UPHENO:0075159", - "ancestor_information_content": "10.870744934490885", - "ancestor_label": "", - "cosine_similarity": "NaN", - "jaccard_similarity": "0.4", - "object_id": "ZP:0000473", - "phenodigm_score": "2.0852572919897328", - "subject_id": "HP:0000002" - } - }, - "average_score": 8.153058700868163, - "best_score": 10.870744934490885, - "metric": "ancestor_information_content" + }, + "subject_best_matches": { + "ZP:0000473": { + "match_source": "ZP:0000473", + "match_source_label": "whole organism decreased length, abnormal (ZPO)", + "match_target": "HP:0000002", + "match_target_label": "Abnormality of body height (HPO)", + "score": 10.870744934490885, + "match_subsumer": null, + "match_subsumer_label": null, + "similarity": { + "subject_id": "ZP:0000473", + "subject_label": null, + "subject_source": null, + "object_id": "HP:0000002", + "object_label": null, + "object_source": null, + "ancestor_id": "UPHENO:0075159", + "ancestor_label": "", + "ancestor_source": null, + "object_information_content": null, + "subject_information_content": null, + "ancestor_information_content": 10.870744934490885, + "jaccard_similarity": 0.4, + "cosine_similarity": null, + "dice_similarity": null, + "phenodigm_score": 2.0852572919897328 + } + } + }, + "object_best_matches": { + "HP:0000001": { + "match_source": "HP:0000001", + "match_source_label": "All (HPO)", + "match_target": "ZP:0000473", + "match_target_label": "whole organism decreased length, abnormal (ZPO)", + "score": 0.0, + "match_subsumer": null, + "match_subsumer_label": null, + "similarity": { + "subject_id": "HP:0000001", + "subject_label": null, + "subject_source": null, + "object_id": "ZP:0000473", + "object_label": null, + "object_source": null, + "ancestor_id": "NO_ANCESTOR_FOUND", + "ancestor_label": "", + "ancestor_source": null, + "object_information_content": null, + "subject_information_content": null, + "ancestor_information_content": 0.0, + "jaccard_similarity": 0.0, + "cosine_similarity": null, + "dice_similarity": null, + "phenodigm_score": 0.0 + } + }, + "HP:0000002": { + "match_source": "HP:0000002", + "match_source_label": "Abnormality of body height (HPO)", + "match_target": "ZP:0000473", + "match_target_label": "whole organism decreased length, abnormal (ZPO)", + "score": 10.870744934490885, + "match_subsumer": null, + "match_subsumer_label": null, + "similarity": { + "subject_id": "HP:0000002", + "subject_label": null, + "subject_source": null, + "object_id": "ZP:0000473", + "object_label": null, + "object_source": null, + "ancestor_id": "UPHENO:0075159", + "ancestor_label": "", + "ancestor_source": null, + "object_information_content": null, + "subject_information_content": null, + "ancestor_information_content": 10.870744934490885, + "jaccard_similarity": 0.4, + "cosine_similarity": null, + "dice_similarity": null, + "phenodigm_score": 2.0852572919897328 + } + } + }, + "average_score": 8.153058700868163, + "best_score": 10.870744934490885, + "metric": "ancestor_information_content" + } }, - "ZFIN:ZDB-GENE-100729-3" - ], - [ - 7.661460799028868, { - "subject_termset": [ - { + "subject_id": "ZFIN:ZDB-GENE-120919-4", + "score": 7.661460799028868, + "similarity": { + "subject_termset": { "ZP:0014819": { "id": "ZP:0014819", "label": "growth decreased process quality, abnormal (ZPO)" - } - }, - { + }, "ZP:0000473": { "id": "ZP:0000473", "label": "whole organism decreased length, abnormal (ZPO)" } - } - ], - "subject_best_matches": { - "ZP:0000473": { - "match_source": "ZP:0000473", - "match_source_label": "whole organism decreased length, abnormal (ZPO)", - "match_target": "HP:0000002", - "match_target_label": "Abnormality of body height (HPO)", - "score": "10.870744934490885" - }, - "ZP:0014819": { - "match_source": "ZP:0014819", - "match_source_label": "growth decreased process quality, abnormal (ZPO)", - "match_target": "HP:0000002", - "match_target_label": "Abnormality of body height (HPO)", - "score": "8.904353327133704" - } - }, - "subject_best_matches_similarity_map": { - "ZP:0000473": { - "ancestor_id": "UPHENO:0075159", - "ancestor_information_content": "10.870744934490885", - "ancestor_label": "", - "cosine_similarity": "NaN", - "jaccard_similarity": "0.4", - "object_id": "HP:0000002", - "phenodigm_score": "2.0852572919897328", - "subject_id": "ZP:0000473" - }, - "ZP:0014819": { - "ancestor_id": "UPHENO:0049874", - "ancestor_information_content": "8.904353327133704", - "ancestor_label": "", - "cosine_similarity": "NaN", - "jaccard_similarity": "0.3333333333333333", - "object_id": "HP:0000002", - "phenodigm_score": "1.7228226187600493", - "subject_id": "ZP:0014819" - } - }, - "object_termset": [ - { + }, + "object_termset": { + "HP:0000002": { + "id": "HP:0000002", + "label": "Abnormality of body height (HPO)" + }, "HP:0000001": { "id": "HP:0000001", "label": "All (HPO)" } }, - { + "subject_best_matches": { + "ZP:0000473": { + "match_source": "ZP:0000473", + "match_source_label": "whole organism decreased length, abnormal (ZPO)", + "match_target": "HP:0000002", + "match_target_label": "Abnormality of body height (HPO)", + "score": 10.870744934490885, + "match_subsumer": null, + "match_subsumer_label": null, + "similarity": { + "subject_id": "ZP:0000473", + "subject_label": null, + "subject_source": null, + "object_id": "HP:0000002", + "object_label": null, + "object_source": null, + "ancestor_id": "UPHENO:0075159", + "ancestor_label": "", + "ancestor_source": null, + "object_information_content": null, + "subject_information_content": null, + "ancestor_information_content": 10.870744934490885, + "jaccard_similarity": 0.4, + "cosine_similarity": null, + "dice_similarity": null, + "phenodigm_score": 2.0852572919897328 + } + }, + "ZP:0014819": { + "match_source": "ZP:0014819", + "match_source_label": "growth decreased process quality, abnormal (ZPO)", + "match_target": "HP:0000002", + "match_target_label": "Abnormality of body height (HPO)", + "score": 8.904353327133704, + "match_subsumer": null, + "match_subsumer_label": null, + "similarity": { + "subject_id": "ZP:0014819", + "subject_label": null, + "subject_source": null, + "object_id": "HP:0000002", + "object_label": null, + "object_source": null, + "ancestor_id": "UPHENO:0049874", + "ancestor_label": "", + "ancestor_source": null, + "object_information_content": null, + "subject_information_content": null, + "ancestor_information_content": 8.904353327133704, + "jaccard_similarity": 0.3333333333333333, + "cosine_similarity": null, + "dice_similarity": null, + "phenodigm_score": 1.7228226187600493 + } + } + }, + "object_best_matches": { + "HP:0000001": { + "match_source": "HP:0000001", + "match_source_label": "All (HPO)", + "match_target": "ZP:0014819", + "match_target_label": "growth decreased process quality, abnormal (ZPO)", + "score": 0.0, + "match_subsumer": null, + "match_subsumer_label": null, + "similarity": { + "subject_id": "HP:0000001", + "subject_label": null, + "subject_source": null, + "object_id": "ZP:0014819", + "object_label": null, + "object_source": null, + "ancestor_id": "NO_ANCESTOR_FOUND", + "ancestor_label": "", + "ancestor_source": null, + "object_information_content": null, + "subject_information_content": null, + "ancestor_information_content": 0.0, + "jaccard_similarity": 0.0, + "cosine_similarity": null, + "dice_similarity": null, + "phenodigm_score": 0.0 + } + }, "HP:0000002": { - "id": "HP:0000002", - "label": "Abnormality of body height (HPO)" + "match_source": "HP:0000002", + "match_source_label": "Abnormality of body height (HPO)", + "match_target": "ZP:0000473", + "match_target_label": "whole organism decreased length, abnormal (ZPO)", + "score": 10.870744934490885, + "match_subsumer": null, + "match_subsumer_label": null, + "similarity": { + "subject_id": "HP:0000002", + "subject_label": null, + "subject_source": null, + "object_id": "ZP:0000473", + "object_label": null, + "object_source": null, + "ancestor_id": "UPHENO:0075159", + "ancestor_label": "", + "ancestor_source": null, + "object_information_content": null, + "subject_information_content": null, + "ancestor_information_content": 10.870744934490885, + "jaccard_similarity": 0.4, + "cosine_similarity": null, + "dice_similarity": null, + "phenodigm_score": 2.0852572919897328 + } } - } - ], - "object_best_matches": { - "HP:0000001": { - "match_source": "HP:0000001", - "match_source_label": "All (HPO)", - "match_target": "ZP:0014819", - "match_target_label": "growth decreased process quality, abnormal (ZPO)", - "score": "0" - }, - "HP:0000002": { - "match_source": "HP:0000002", - "match_source_label": "Abnormality of body height (HPO)", - "match_target": "ZP:0000473", - "match_target_label": "whole organism decreased length, abnormal (ZPO)", - "score": "10.870744934490885" - } - }, - "object_best_matches_similarity_map": { - "HP:0000001": { - "ancestor_id": "NO_ANCESTOR_FOUND", - "ancestor_information_content": "0", - "ancestor_label": "", - "cosine_similarity": "NaN", - "jaccard_similarity": "0", - "object_id": "ZP:0014819", - "phenodigm_score": "0", - "subject_id": "HP:0000001" - }, - "HP:0000002": { - "ancestor_id": "UPHENO:0075159", - "ancestor_information_content": "10.870744934490885", - "ancestor_label": "", - "cosine_similarity": "NaN", - "jaccard_similarity": "0.4", - "object_id": "ZP:0000473", - "phenodigm_score": "2.0852572919897328", - "subject_id": "HP:0000002" - } - }, - "average_score": 7.661460799028868, - "best_score": 10.870744934490885, - "metric": "ancestor_information_content" + }, + "average_score": 7.661460799028868, + "best_score": 10.870744934490885, + "metric": "ancestor_information_content" + } }, - "ZFIN:ZDB-GENE-120919-4" - ], - [ - 6.283193403469026, { - "subject_termset": [ - { + "subject_id": "ZFIN:ZDB-GENE-130726-2", + "score": 6.283193403469026, + "similarity": { + "subject_termset": { "ZP:0000324": { "id": "ZP:0000324", "label": "whole organism decreased size, abnormal (ZPO)" - } - }, - { + }, "ZP:0001589": { "id": "ZP:0001589", "label": "embryo development disrupted, abnormal (ZPO)" } - } - ], - "subject_best_matches": { - "ZP:0000324": { - "match_source": "ZP:0000324", - "match_source_label": "whole organism decreased size, abnormal (ZPO)", - "match_target": "HP:0000002", - "match_target_label": "Abnormality of body height (HPO)", - "score": "10.870744934490885" - }, - "ZP:0001589": { - "match_source": "ZP:0001589", - "match_source_label": "embryo development disrupted, abnormal (ZPO)", - "match_target": "HP:0000002", - "match_target_label": "Abnormality of body height (HPO)", - "score": "3.3912837448943334" - } - }, - "subject_best_matches_similarity_map": { - "ZP:0000324": { - "ancestor_id": "UPHENO:0075159", - "ancestor_information_content": "10.870744934490885", - "ancestor_label": "", - "cosine_similarity": "NaN", - "jaccard_similarity": "0.45714285714285713", - "object_id": "HP:0000002", - "phenodigm_score": "2.22923381425646", - "subject_id": "ZP:0000324" - }, - "ZP:0001589": { - "ancestor_id": "UPHENO:0049587", - "ancestor_information_content": "3.3912837448943334", - "ancestor_label": "", - "cosine_similarity": "NaN", - "jaccard_similarity": "0.2727272727272727", - "object_id": "HP:0000002", - "phenodigm_score": "0.9617149093101155", - "subject_id": "ZP:0001589" - } - }, - "object_termset": [ - { + }, + "object_termset": { "HP:0000001": { "id": "HP:0000001", "label": "All (HPO)" - } - }, - { + }, "HP:0000002": { "id": "HP:0000002", "label": "Abnormality of body height (HPO)" } - } - ], - "object_best_matches": { - "HP:0000001": { - "match_source": "HP:0000001", - "match_source_label": "All (HPO)", - "match_target": "ZP:0001589", - "match_target_label": "embryo development disrupted, abnormal (ZPO)", - "score": "0" - }, - "HP:0000002": { - "match_source": "HP:0000002", - "match_source_label": "Abnormality of body height (HPO)", - "match_target": "ZP:0000324", - "match_target_label": "whole organism decreased size, abnormal (ZPO)", - "score": "10.870744934490885" - } - }, - "object_best_matches_similarity_map": { - "HP:0000001": { - "ancestor_id": "NO_ANCESTOR_FOUND", - "ancestor_information_content": "0", - "ancestor_label": "", - "cosine_similarity": "NaN", - "jaccard_similarity": "0", - "object_id": "ZP:0001589", - "phenodigm_score": "0", - "subject_id": "HP:0000001" - }, - "HP:0000002": { - "ancestor_id": "UPHENO:0075159", - "ancestor_information_content": "10.870744934490885", - "ancestor_label": "", - "cosine_similarity": "NaN", - "jaccard_similarity": "0.45714285714285713", - "object_id": "ZP:0000324", - "phenodigm_score": "2.22923381425646", - "subject_id": "HP:0000002" - } - }, - "average_score": 6.283193403469026, - "best_score": 10.870744934490885, - "metric": "ancestor_information_content" - }, - "ZFIN:ZDB-GENE-130726-2" + }, + "subject_best_matches": { + "ZP:0000324": { + "match_source": "ZP:0000324", + "match_source_label": "whole organism decreased size, abnormal (ZPO)", + "match_target": "HP:0000002", + "match_target_label": "Abnormality of body height (HPO)", + "score": 10.870744934490885, + "match_subsumer": null, + "match_subsumer_label": null, + "similarity": { + "subject_id": "ZP:0000324", + "subject_label": null, + "subject_source": null, + "object_id": "HP:0000002", + "object_label": null, + "object_source": null, + "ancestor_id": "UPHENO:0075159", + "ancestor_label": "", + "ancestor_source": null, + "object_information_content": null, + "subject_information_content": null, + "ancestor_information_content": 10.870744934490885, + "jaccard_similarity": 0.45714285714285713, + "cosine_similarity": null, + "dice_similarity": null, + "phenodigm_score": 2.22923381425646 + } + }, + "ZP:0001589": { + "match_source": "ZP:0001589", + "match_source_label": "embryo development disrupted, abnormal (ZPO)", + "match_target": "HP:0000002", + "match_target_label": "Abnormality of body height (HPO)", + "score": 3.3912837448943334, + "match_subsumer": null, + "match_subsumer_label": null, + "similarity": { + "subject_id": "ZP:0001589", + "subject_label": null, + "subject_source": null, + "object_id": "HP:0000002", + "object_label": null, + "object_source": null, + "ancestor_id": "UPHENO:0049587", + "ancestor_label": "", + "ancestor_source": null, + "object_information_content": null, + "subject_information_content": null, + "ancestor_information_content": 3.3912837448943334, + "jaccard_similarity": 0.2727272727272727, + "cosine_similarity": null, + "dice_similarity": null, + "phenodigm_score": 0.9617149093101155 + } + } + }, + "object_best_matches": { + "HP:0000001": { + "match_source": "HP:0000001", + "match_source_label": "All (HPO)", + "match_target": "ZP:0001589", + "match_target_label": "embryo development disrupted, abnormal (ZPO)", + "score": 0.0, + "match_subsumer": null, + "match_subsumer_label": null, + "similarity": { + "subject_id": "HP:0000001", + "subject_label": null, + "subject_source": null, + "object_id": "ZP:0001589", + "object_label": null, + "object_source": null, + "ancestor_id": "NO_ANCESTOR_FOUND", + "ancestor_label": "", + "ancestor_source": null, + "object_information_content": null, + "subject_information_content": null, + "ancestor_information_content": 0.0, + "jaccard_similarity": 0.0, + "cosine_similarity": null, + "dice_similarity": null, + "phenodigm_score": 0.0 + } + }, + "HP:0000002": { + "match_source": "HP:0000002", + "match_source_label": "Abnormality of body height (HPO)", + "match_target": "ZP:0000324", + "match_target_label": "whole organism decreased size, abnormal (ZPO)", + "score": 10.870744934490885, + "match_subsumer": null, + "match_subsumer_label": null, + "similarity": { + "subject_id": "HP:0000002", + "subject_label": null, + "subject_source": null, + "object_id": "ZP:0000324", + "object_label": null, + "object_source": null, + "ancestor_id": "UPHENO:0075159", + "ancestor_label": "", + "ancestor_source": null, + "object_information_content": null, + "subject_information_content": null, + "ancestor_information_content": 10.870744934490885, + "jaccard_similarity": 0.45714285714285713, + "cosine_similarity": null, + "dice_similarity": null, + "phenodigm_score": 2.22923381425646 + } + } + }, + "average_score": 6.283193403469026, + "best_score": 10.870744934490885, + "metric": "ancestor_information_content" + } + } ] -] +} diff --git a/frontend/src/api/model.ts b/frontend/src/api/model.ts index 163510f07..d45a10453 100644 --- a/frontend/src/api/model.ts +++ b/frontend/src/api/model.ts @@ -519,18 +519,18 @@ export interface TermPairwiseSimilarity extends PairwiseSimilarity { ancestor_label?: string, ancestor_source?: string, /** The IC of the object */ - object_information_content?: string, + object_information_content?: number, /** The IC of the subject */ - subject_information_content?: string, + subject_information_content?: number, /** The IC of the object */ - ancestor_information_content?: string, + ancestor_information_content?: number, /** The number of concepts in the intersection divided by the number in the union */ - jaccard_similarity?: string, + jaccard_similarity?: number, /** the dot product of two node embeddings divided by the product of their lengths */ cosine_similarity?: number, - dice_similarity?: string, + dice_similarity?: number, /** the geometric mean of the jaccard similarity and the information content */ - phenodigm_score?: string, + phenodigm_score?: number, }; /** * A simple pairwise similarity between two sets of concepts/terms diff --git a/frontend/src/components/AppPredicateBadge.vue b/frontend/src/components/AppPredicateBadge.vue index 82b0756b0..52ca3caa4 100644 --- a/frontend/src/components/AppPredicateBadge.vue +++ b/frontend/src/components/AppPredicateBadge.vue @@ -34,8 +34,8 @@ const arrowDirection = computed(() => ? "up" : "left" : props.vertical - ? "down" - : "right", + ? "down" + : "right", ); diff --git a/frontend/src/components/AppTable.vue b/frontend/src/components/AppTable.vue index adfcb0e2e..be4f067a0 100644 --- a/frontend/src/components/AppTable.vue +++ b/frontend/src/components/AppTable.vue @@ -384,8 +384,8 @@ const widths = computed((): string => col.slot === "divider" ? "20px" : expanded.value - ? `minmax(max-content, 99999px)` - : `${col.width || 1}fr`, + ? `minmax(max-content, 99999px)` + : `${col.width || 1}fr`, ) .join(" "), ); diff --git a/scripts/generate_fixtures.py b/scripts/generate_fixtures.py index 12d5f3879..c5f4ceb6a 100644 --- a/scripts/generate_fixtures.py +++ b/scripts/generate_fixtures.py @@ -192,7 +192,7 @@ def main( # fixtures['node-publication-summary'] = # fixtures['ontologies'] = fixtures["phenotype-explorer-compare"] = _compare(subjects="MP:0010771,MP:0002169", objects="HP:0004325") - fixtures["phenotype-explorer-search"] = _search(termset="HP:0000001,HP:0000002", prefix="ZFIN", limit=10) + fixtures["phenotype-explorer-search"] = _search(termset="HP:0000001,HP:0000002", category="Zebrafish Genes", limit=10) fixtures["search"] = si.search(q="fanconi") # fixtures['text-annotator'] = # fixtures['uptime'] =