From e3bcfae3857e3be8de517a47e0cb02e35def41f7 Mon Sep 17 00:00:00 2001 From: glass-ships Date: Mon, 11 Dec 2023 20:48:07 -0700 Subject: [PATCH 1/2] Implement SemsimServer search --- .../src/monarch_py/api/additional_models.py | 20 +- backend/src/monarch_py/api/config.py | 61 +- backend/src/monarch_py/api/entity.py | 10 +- backend/src/monarch_py/api/main.py | 4 +- backend/src/monarch_py/api/semsim.py | 67 +- ...{get_similarity.py => similarity_utils.py} | 14 + backend/src/monarch_py/cli.py | 6 +- backend/src/monarch_py/datamodels/model.py | 154 +- .../src/monarch_py/datamodels/similarity.yaml | 25 +- .../fixtures/association_counts_response.py | 2 +- .../fixtures/association_table_response.py | 2 +- .../tests/fixtures/autocomplete_response.py | 2 +- backend/tests/fixtures/histopheno_response.py | 2 +- .../fixtures/phenotype_explorer_compare.py | 30 +- .../fixtures/phenotype_explorer_search.py | 793 +++++++ backend/tests/fixtures/search_response.py | 2 +- .../fixtures/phenotype-explorer-compare.json | 36 +- .../fixtures/phenotype-explorer-search.json | 1847 +++++++---------- frontend/src/api/model.ts | 18 +- frontend/src/components/AppPredicateBadge.vue | 4 +- frontend/src/components/AppTable.vue | 4 +- scripts/generate_fixtures.py | 35 +- 22 files changed, 1864 insertions(+), 1274 deletions(-) rename backend/src/monarch_py/api/utils/{get_similarity.py => similarity_utils.py} (61%) create mode 100644 backend/tests/fixtures/phenotype_explorer_search.py diff --git a/backend/src/monarch_py/api/additional_models.py b/backend/src/monarch_py/api/additional_models.py index 24ae01687..a9f7b35d4 100644 --- a/backend/src/monarch_py/api/additional_models.py +++ b/backend/src/monarch_py/api/additional_models.py @@ -1,4 +1,5 @@ -from typing import List +from enum import Enum +from typing import List, Optional from fastapi import Query, Request from pydantic import BaseModel, Field @@ -13,6 +14,21 @@ class Config: arbitrary_types_allowed = True -class CompareRequest(BaseModel): +class SemsimSearchCategory(Enum): + HGNC = "Human Genes" + MGI = "Mouse Genes" + RGD = "Rat Genes" + ZFIN = "Zebrafish Genes" + WB = "C. Elegans Genes" + MONDO = "Human Diseases" + + +class SemsimCompareRequest(BaseModel): subjects: List[str] = Field(..., title="List of subjects for comparison") objects: List[str] = Field(..., title="List of objects for comparison") + + +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") diff --git a/backend/src/monarch_py/api/config.py b/backend/src/monarch_py/api/config.py index 937791701..1b51de7f9 100644 --- a/backend/src/monarch_py/api/config.py +++ b/backend/src/monarch_py/api/config.py @@ -1,12 +1,12 @@ import os import requests as rq - from functools import lru_cache +from typing import List from pydantic import BaseSettings from monarch_py.implementations.solr.solr_implementation import SolrImplementation -from monarch_py.datamodels.model import TermSetPairwiseSimilarity +from monarch_py.datamodels.model import TermSetPairwiseSimilarity, SemsimSearchResult class Settings(BaseSettings): @@ -15,8 +15,8 @@ class Settings(BaseSettings): solr_url = os.getenv("SOLR_URL") if os.getenv("SOLR_URL") else f"http://{solr_host}:{solr_port}/solr" phenio_db_path = os.getenv("PHENIO_DB_PATH") if os.getenv("PHENIO_DB_PATH") else "/data/phenio.db" - oak_server_host = os.getenv("OAK_SERVER_HOST", "127.0.0.1") - oak_server_port = os.getenv("OAK_SERVER_PORT", 18811) + semsim_server_host = os.getenv("SEMSIM_SERVER_HOST", "127.0.0.1") + semsim_server_port = os.getenv("SEMSIM_SERVER_PORT", 18811) settings = Settings() @@ -40,26 +40,20 @@ def convert_nans(input_dict, to_value=None): return input_dict -class OakHTTPRequester: - def compare(self, subjects, objects): - host = f"http://{settings.oak_server_host}:{settings.oak_server_port}" - path = f"/compare/{','.join(subjects)}/{','.join(objects)}" - url = f"{host}/{path}" +class SemsimianHTTPRequester: + """A class that makes HTTP requests to the semsimian_server.""" - print(f"Fetching {url}...") - response = rq.get(url=url) - data = response.json() - - # FIXME: currently, the response returned from semsimian_server doesn't - # 100% match the TermSetPairwiseSimilarity model, so we perform some - # transformations below. once it does, we can remove all the code below - # and just return TermSetPairwiseSimilarity(**data) + def convert_tsps_data(self, data): + """Convert to a format that can be coerced into a TermSetPairwiseSimilarity model + FIXME: currently, the response returned from semsimian_server doesn't + 100% match the TermSetPairwiseSimilarity model, so we perform some + transformations below. once it does, we can remove all the code below + and just return TermSetPairwiseSimilarity(**data) + """ # remove these similarity maps and fold them into the _best_matches dicts object_best_matches_similarity_map = convert_nans(data.pop("object_best_matches_similarity_map")) subject_best_matches_similarity_map = convert_nans(data.pop("subject_best_matches_similarity_map")) - - # convert to a format that can be coerced into a TermSetPairwiseSimilarity converted_data = { **data, **{ @@ -76,10 +70,33 @@ def compare(self, subjects, objects): }, }, } + return converted_data + + def compare(self, subjects: List[str], objects: List[str]): + host = f"http://{settings.semsim_server_host}:{settings.semsim_server_port}" + path = f"compare/{','.join(subjects)}/{','.join(objects)}" + url = f"{host}/{path}" - return TermSetPairwiseSimilarity(**converted_data) + print(f"Fetching {url}...") + response = rq.get(url=url) + data = response.json() + results = self.convert_tsps_data(data) + return TermSetPairwiseSimilarity(**results) + + def search(self, termset: List[str], prefix: str, limit: int): + host = f"http://{settings.semsim_server_host}:{settings.semsim_server_port}" + path = f"search/{','.join(termset)}/{prefix}?limit={limit}" + url = f"{host}/{path}" + + print(f"Fetching {url}...") + response = rq.get(url=url) + data = response.json() + results = [ + SemsimSearchResult(score=i[0], similarity=self.convert_tsps_data(i[1]), subject_id=i[2]) for i in data + ] + return results @lru_cache(maxsize=1) -def oak(): - return OakHTTPRequester() +def semsimian(): + return SemsimianHTTPRequester() diff --git a/backend/src/monarch_py/api/entity.py b/backend/src/monarch_py/api/entity.py index 2527fbcc6..864293e3a 100644 --- a/backend/src/monarch_py/api/entity.py +++ b/backend/src/monarch_py/api/entity.py @@ -16,13 +16,13 @@ async def _get_entity( ) -> Node: """Retrieves the entity with the specified id - Args: + Args:
id (str): ID for the entity to retrieve, ex: MONDO:0019391 - Raises: + Raises:
HTTPException: 404 if the entity is not found - Returns: + Returns:
Node: Entity details for the specified id """ response = solr().get_entity(id, extra=True) @@ -52,13 +52,13 @@ def _association_table( """ Retrieves association table data for a given entity and association type - Args: + Args:
id (str): ID of the entity to retrieve association table data, ex: MONDO:0019391 category (str): Category of association to retrieve association table data for, ex: biolink:DiseaseToPhenotypicFeatureAssociation Path (str, optional): Path string to limit results to a subset. Defaults to None. pagination (PaginationParams, optional): Pagination parameters. Defaults to Depends(). - Returns: + Returns:
AssociationResults: Association table data for the specified entity and association type """ response = solr().get_association_table( diff --git a/backend/src/monarch_py/api/main.py b/backend/src/monarch_py/api/main.py index 1e0cbe98d..f24e38b4f 100644 --- a/backend/src/monarch_py/api/main.py +++ b/backend/src/monarch_py/api/main.py @@ -3,7 +3,7 @@ from fastapi.middleware.cors import CORSMiddleware from fastapi.responses import RedirectResponse from monarch_py.api import association, entity, histopheno, search, semsim -from monarch_py.api.config import oak +from monarch_py.api.config import semsimian from monarch_py.api.middleware.logging_middleware import LoggingMiddleware from monarch_py.service.curie_service import CurieService @@ -17,7 +17,7 @@ @app.on_event("startup") async def initialize_app(): - oak() + semsimian() # Let the curie service singleton initialize itself CurieService() diff --git a/backend/src/monarch_py/api/semsim.py b/backend/src/monarch_py/api/semsim.py index d1c704534..26fe797bb 100644 --- a/backend/src/monarch_py/api/semsim.py +++ b/backend/src/monarch_py/api/semsim.py @@ -1,7 +1,8 @@ -from fastapi import APIRouter, Path +from fastapi import APIRouter, HTTPException, Path, Query -from monarch_py.api.additional_models import CompareRequest -from monarch_py.api.config import oak +from monarch_py.api.additional_models import SemsimCompareRequest, SemsimSearchRequest, SemsimSearchCategory +from monarch_py.api.config import semsimian +from monarch_py.api.utils.similarity_utils import parse_similarity_prefix router = APIRouter(tags=["semsim"], responses={404: {"description": "Not Found"}}) @@ -13,11 +14,11 @@ def _compare( ): """Get pairwise similarity between two sets of terms - Args: - subjects (str, optional): List of subjects for comparison. Defaults to "". - objects (str, optional): List of objects for comparison. Defaults to "". + Args:
+ subjects (str, optional): List of subjects for comparison. Defaults to "".
+ objects (str, optional): List of objects for comparison. Defaults to "".
- Returns: + Returns:
TermSetPairwiseSimilarity: Pairwise similarity between subjects and objects """ print( @@ -27,7 +28,7 @@ def _compare( objects: {objects.split(',')} """ ) - results = oak().compare( + results = semsimian().compare( subjects=subjects.split(","), objects=objects.split(","), ) @@ -35,7 +36,7 @@ def _compare( @router.post("/compare") -def _post_compare(request: CompareRequest): +def _post_compare(request: SemsimCompareRequest): """ Pairwise similarity between two sets of terms

@@ -47,4 +48,50 @@ def _post_compare(request: CompareRequest): } """ - return oak().compare(request.subjects, request.objects) + return semsimian().compare(request.subjects, request.objects) + + +@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), +): + """Search for terms in a termset + + Args:
+ termset (str, optional): Termset to search. Defaults to "".
+ prefix (str, optional): Prefix to search for. Defaults to "".
+ limit (int, optional): Limit the number of results. Defaults to 10. + + Returns:
+ List[str]: List of matching terms + """ + + print( + f""" + Running semsim search: + termset: {termset} + prefix: {prefix} + """ + ) + + results = semsimian().search(termset=termset.split(","), prefix=parse_similarity_prefix(prefix), limit=limit) + return results + + +@router.post("/search") +def _post_search(request: SemsimSearchRequest): + """ + Search for terms in a termset
+
+ Example:
+
+    {
+      "termset": ["HP:0000001", "HP:0000002"],
+      "prefix": "ZFIN",
+      "limit": 5
+    }
+    
+ """ + return semsimian().search(request.termset, parse_similarity_prefix(request.prefix), request.limit) diff --git a/backend/src/monarch_py/api/utils/get_similarity.py b/backend/src/monarch_py/api/utils/similarity_utils.py similarity index 61% rename from backend/src/monarch_py/api/utils/get_similarity.py rename to backend/src/monarch_py/api/utils/similarity_utils.py index 3461b0c31..2e612609d 100644 --- a/backend/src/monarch_py/api/utils/get_similarity.py +++ b/backend/src/monarch_py/api/utils/similarity_utils.py @@ -3,6 +3,10 @@ from oaklib.constants import OAKLIB_MODULE from oaklib.implementations.sqldb.sql_implementation import SqlImplementation +from fastapi import HTTPException + +from monarch_py.api.additional_models import SemsimSearchCategory + IS_A = omd.slots.subClassOf.curie HP_DB_URL = "https://s3.amazonaws.com/bbop-sqlite/hp.db.gz" @@ -18,3 +22,13 @@ def compare_termsets( oi = SqlImplementation(OntologyResource(slug=hp_db)) results = oi.termset_pairwise_similarity(subjects, objects, predicates) return results + + +def parse_similarity_prefix(prefix: str): + if prefix in SemsimSearchCategory._member_names_: + prefix = prefix + elif SemsimSearchCategory(prefix): + prefix = SemsimSearchCategory(prefix).name + else: + raise HTTPException(status_code=404, detail="Prefix not found") + return prefix diff --git a/backend/src/monarch_py/cli.py b/backend/src/monarch_py/cli.py index 40ba69e15..4e7498a72 100644 --- a/backend/src/monarch_py/cli.py +++ b/backend/src/monarch_py/cli.py @@ -4,7 +4,7 @@ import typer from monarch_py import solr_cli, sql_cli -from monarch_py.api.config import oak +from monarch_py.api.config import semsimian from monarch_py.utils.solr_cli_utils import check_for_docker from monarch_py.utils.utils import set_log_level, format_output from typing_extensions import Annotated @@ -272,10 +272,10 @@ def compare( ), output: str = typer.Option(None, "--output", "-o", help="The path to the output file"), ): - """Compare two entities using semantic similarity via OAK""" + """Compare two sets of phenotypes using semantic similarity via SemSimian""" subjects = subjects.split(",") objects = objects.split(",") - response = oak().compare(subjects, objects) + response = semsimian().compare(subjects, objects) format_output(fmt, response, output) diff --git a/backend/src/monarch_py/datamodels/model.py b/backend/src/monarch_py/datamodels/model.py index 1c96d4a1b..dc3629744 100644 --- a/backend/src/monarch_py/datamodels/model.py +++ b/backend/src/monarch_py/datamodels/model.py @@ -51,13 +51,11 @@ class Association(ConfiguredBaseModel): subject_namespace: Optional[str] = Field(None, description="""The namespace/prefix of the subject entity""") subject_category: Optional[str] = Field(None, description="""The category of the subject entity""") subject_closure: Optional[List[str]] = Field( - default_factory=list, - description="""Field containing subject id and the ids of all of it's ancestors""", + default_factory=list, description="""Field containing subject id and the ids of all of it's ancestors""" ) subject_label: Optional[str] = Field(None, description="""The name of the subject entity""") subject_closure_label: Optional[List[str]] = Field( - default_factory=list, - description="""Field containing subject name and the names of all of it's ancestors""", + default_factory=list, description="""Field containing subject name and the names of all of it's ancestors""" ) subject_taxon: Optional[str] = Field(None) subject_taxon_label: Optional[str] = Field(None) @@ -67,13 +65,11 @@ class Association(ConfiguredBaseModel): object_namespace: Optional[str] = Field(None, description="""The namespace/prefix of the object entity""") object_category: Optional[str] = Field(None, description="""The category of the object entity""") object_closure: Optional[List[str]] = Field( - default_factory=list, - description="""Field containing object id and the ids of all of it's ancestors""", + default_factory=list, description="""Field containing object id and the ids of all of it's ancestors""" ) object_label: Optional[str] = Field(None, description="""The name of the object entity""") object_closure_label: Optional[List[str]] = Field( - default_factory=list, - description="""Field containing object name and the names of all of it's ancestors""", + default_factory=list, description="""Field containing object name and the names of all of it's ancestors""" ) object_taxon: Optional[str] = Field(None) object_taxon_label: Optional[str] = Field(None) @@ -82,13 +78,11 @@ class Association(ConfiguredBaseModel): negated: Optional[bool] = Field(None) pathway: Optional[str] = Field(None) evidence_count: Optional[int] = Field( - None, - description="""count of supporting documents, evidence codes, and sources supplying evidence""", + None, description="""count of supporting documents, evidence codes, and sources supplying evidence""" ) has_evidence: Optional[List[str]] = Field(default_factory=list) has_evidence_links: Optional[List[ExpandedCurie]] = Field( - default_factory=list, - description="""List of ExpandedCuries with id and url for evidence""", + default_factory=list, description="""List of ExpandedCuries with id and url for evidence""" ) grouping_key: Optional[str] = Field( None, @@ -96,13 +90,11 @@ class Association(ConfiguredBaseModel): ) provided_by: Optional[str] = Field(None) provided_by_link: Optional[ExpandedCurie] = Field( - None, - description="""A link to the docs for the knowledge source that provided the node/edge.""", + None, description="""A link to the docs for the knowledge source that provided the node/edge.""" ) publications: Optional[List[str]] = Field(default_factory=list) publications_links: Optional[List[ExpandedCurie]] = Field( - default_factory=list, - description="""List of ExpandedCuries with id and url for publications""", + default_factory=list, description="""List of ExpandedCuries with id and url for publications""" ) qualifiers: Optional[List[str]] = Field(default_factory=list) frequency_qualifier: Optional[str] = Field(None) @@ -143,8 +135,7 @@ class Association(ConfiguredBaseModel): ) onset_qualifier_category: Optional[str] = Field(None, description="""The category of the onset_qualifier entity""") onset_qualifier_closure: Optional[List[str]] = Field( - default_factory=list, - description="""Field containing onset_qualifier id and the ids of all of it's ancestors""", + default_factory=list, description="""Field containing onset_qualifier id and the ids of all of it's ancestors""" ) onset_qualifier_closure_label: Optional[List[str]] = Field( default_factory=list, @@ -156,8 +147,7 @@ class Association(ConfiguredBaseModel): ) sex_qualifier_category: Optional[str] = Field(None, description="""The category of the sex_qualifier entity""") sex_qualifier_closure: Optional[List[str]] = Field( - default_factory=list, - description="""Field containing sex_qualifier id and the ids of all of it's ancestors""", + default_factory=list, description="""Field containing sex_qualifier id and the ids of all of it's ancestors""" ) sex_qualifier_closure_label: Optional[List[str]] = Field( default_factory=list, @@ -169,8 +159,7 @@ class Association(ConfiguredBaseModel): ) stage_qualifier_category: Optional[str] = Field(None, description="""The category of the stage_qualifier entity""") stage_qualifier_closure: Optional[List[str]] = Field( - default_factory=list, - description="""Field containing stage_qualifier id and the ids of all of it's ancestors""", + default_factory=list, description="""Field containing stage_qualifier id and the ids of all of it's ancestors""" ) stage_qualifier_closure_label: Optional[List[str]] = Field( default_factory=list, @@ -184,8 +173,7 @@ class AssociationCountList(ConfiguredBaseModel): """ items: List[AssociationCount] = Field( - default_factory=list, - description="""A collection of items, with the type to be overriden by slot_usage""", + default_factory=list, description="""A collection of items, with the type to be overriden by slot_usage""" ) @@ -195,21 +183,16 @@ class AssociationTypeMapping(ConfiguredBaseModel): """ subject_label: Optional[str] = Field( - None, - description="""A label to describe the subjects of the association type as a whole for use in the UI""", + None, description="""A label to describe the subjects of the association type as a whole for use in the UI""" ) object_label: Optional[str] = Field( - None, - description="""A label to describe the objects of the association type as a whole for use in the UI""", + None, description="""A label to describe the objects of the association type as a whole for use in the UI""" ) symmetric: bool = Field( False, description="""Whether the association type is symmetric, meaning that the subject and object labels should be interchangeable""", ) - category: str = Field( - ..., - description="""The biolink category to use in queries for this association type""", - ) + category: str = Field(..., description="""The biolink category to use in queries for this association type""") class DirectionalAssociation(Association): @@ -228,13 +211,11 @@ class DirectionalAssociation(Association): subject_namespace: Optional[str] = Field(None, description="""The namespace/prefix of the subject entity""") subject_category: Optional[str] = Field(None, description="""The category of the subject entity""") subject_closure: Optional[List[str]] = Field( - default_factory=list, - description="""Field containing subject id and the ids of all of it's ancestors""", + default_factory=list, description="""Field containing subject id and the ids of all of it's ancestors""" ) subject_label: Optional[str] = Field(None, description="""The name of the subject entity""") subject_closure_label: Optional[List[str]] = Field( - default_factory=list, - description="""Field containing subject name and the names of all of it's ancestors""", + default_factory=list, description="""Field containing subject name and the names of all of it's ancestors""" ) subject_taxon: Optional[str] = Field(None) subject_taxon_label: Optional[str] = Field(None) @@ -244,13 +225,11 @@ class DirectionalAssociation(Association): object_namespace: Optional[str] = Field(None, description="""The namespace/prefix of the object entity""") object_category: Optional[str] = Field(None, description="""The category of the object entity""") object_closure: Optional[List[str]] = Field( - default_factory=list, - description="""Field containing object id and the ids of all of it's ancestors""", + default_factory=list, description="""Field containing object id and the ids of all of it's ancestors""" ) object_label: Optional[str] = Field(None, description="""The name of the object entity""") object_closure_label: Optional[List[str]] = Field( - default_factory=list, - description="""Field containing object name and the names of all of it's ancestors""", + default_factory=list, description="""Field containing object name and the names of all of it's ancestors""" ) object_taxon: Optional[str] = Field(None) object_taxon_label: Optional[str] = Field(None) @@ -259,13 +238,11 @@ class DirectionalAssociation(Association): negated: Optional[bool] = Field(None) pathway: Optional[str] = Field(None) evidence_count: Optional[int] = Field( - None, - description="""count of supporting documents, evidence codes, and sources supplying evidence""", + None, description="""count of supporting documents, evidence codes, and sources supplying evidence""" ) has_evidence: Optional[List[str]] = Field(default_factory=list) has_evidence_links: Optional[List[ExpandedCurie]] = Field( - default_factory=list, - description="""List of ExpandedCuries with id and url for evidence""", + default_factory=list, description="""List of ExpandedCuries with id and url for evidence""" ) grouping_key: Optional[str] = Field( None, @@ -273,13 +250,11 @@ class DirectionalAssociation(Association): ) provided_by: Optional[str] = Field(None) provided_by_link: Optional[ExpandedCurie] = Field( - None, - description="""A link to the docs for the knowledge source that provided the node/edge.""", + None, description="""A link to the docs for the knowledge source that provided the node/edge.""" ) publications: Optional[List[str]] = Field(default_factory=list) publications_links: Optional[List[ExpandedCurie]] = Field( - default_factory=list, - description="""List of ExpandedCuries with id and url for publications""", + default_factory=list, description="""List of ExpandedCuries with id and url for publications""" ) qualifiers: Optional[List[str]] = Field(default_factory=list) frequency_qualifier: Optional[str] = Field(None) @@ -320,8 +295,7 @@ class DirectionalAssociation(Association): ) onset_qualifier_category: Optional[str] = Field(None, description="""The category of the onset_qualifier entity""") onset_qualifier_closure: Optional[List[str]] = Field( - default_factory=list, - description="""Field containing onset_qualifier id and the ids of all of it's ancestors""", + default_factory=list, description="""Field containing onset_qualifier id and the ids of all of it's ancestors""" ) onset_qualifier_closure_label: Optional[List[str]] = Field( default_factory=list, @@ -333,8 +307,7 @@ class DirectionalAssociation(Association): ) sex_qualifier_category: Optional[str] = Field(None, description="""The category of the sex_qualifier entity""") sex_qualifier_closure: Optional[List[str]] = Field( - default_factory=list, - description="""Field containing sex_qualifier id and the ids of all of it's ancestors""", + default_factory=list, description="""Field containing sex_qualifier id and the ids of all of it's ancestors""" ) sex_qualifier_closure_label: Optional[List[str]] = Field( default_factory=list, @@ -346,8 +319,7 @@ class DirectionalAssociation(Association): ) stage_qualifier_category: Optional[str] = Field(None, description="""The category of the stage_qualifier entity""") stage_qualifier_closure: Optional[List[str]] = Field( - default_factory=list, - description="""Field containing stage_qualifier id and the ids of all of it's ancestors""", + default_factory=list, description="""Field containing stage_qualifier id and the ids of all of it's ancestors""" ) stage_qualifier_closure_label: Optional[List[str]] = Field( default_factory=list, @@ -374,16 +346,14 @@ class Entity(ConfiguredBaseModel): name: Optional[str] = Field(None) full_name: Optional[str] = Field(None, description="""The long form name of an entity""") deprecated: Optional[bool] = Field( - None, - description="""A boolean flag indicating that an entity is no longer considered current or valid.""", + None, description="""A boolean flag indicating that an entity is no longer considered current or valid.""" ) description: Optional[str] = Field(None) xref: Optional[List[str]] = Field(default_factory=list) provided_by: Optional[str] = Field(None) in_taxon: Optional[str] = Field(None, description="""The biolink taxon that the entity is in the closure of.""") in_taxon_label: Optional[str] = Field( - None, - description="""The label of the biolink taxon that the entity is in the closure of.""", + None, description="""The label of the biolink taxon that the entity is in the closure of.""" ) symbol: Optional[str] = Field(None) synonym: Optional[List[str]] = Field(default_factory=list) @@ -407,8 +377,7 @@ class FacetField(ConfiguredBaseModel): label: str = Field(...) facet_values: Optional[List[FacetValue]] = Field( - default_factory=list, - description="""Collection of FacetValue label/value instances belonging to a FacetField""", + default_factory=list, description="""Collection of FacetValue label/value instances belonging to a FacetField""" ) @@ -416,8 +385,7 @@ class HistoPheno(ConfiguredBaseModel): id: str = Field(...) items: List[HistoBin] = Field( - default_factory=list, - description="""A collection of items, with the type to be overriden by slot_usage""", + default_factory=list, description="""A collection of items, with the type to be overriden by slot_usage""" ) @@ -449,28 +417,23 @@ class Node(Entity): in_taxon: Optional[str] = Field(None, description="""The biolink taxon that the entity is in the closure of.""") in_taxon_label: Optional[str] = Field( - None, - description="""The label of the biolink taxon that the entity is in the closure of.""", + None, description="""The label of the biolink taxon that the entity is in the closure of.""" ) inheritance: Optional[Entity] = Field(None) causal_gene: Optional[List[Entity]] = Field( - default_factory=list, - description="""A list of genes that are known to be causally associated with a disease""", + default_factory=list, description="""A list of genes that are known to be causally associated with a disease""" ) causes_disease: Optional[List[Entity]] = Field( - default_factory=list, - description="""A list of diseases that are known to be causally associated with a gene""", + default_factory=list, description="""A list of diseases that are known to be causally associated with a gene""" ) mappings: Optional[List[ExpandedCurie]] = Field( - default_factory=list, - description="""List of ExpandedCuries with id and url for mapped entities""", + default_factory=list, description="""List of ExpandedCuries with id and url for mapped entities""" ) external_links: Optional[List[ExpandedCurie]] = Field( default_factory=list, description="""ExpandedCurie with id and url for xrefs""" ) provided_by_link: Optional[ExpandedCurie] = Field( - None, - description="""A link to the docs for the knowledge source that provided the node/edge.""", + None, description="""A link to the docs for the knowledge source that provided the node/edge.""" ) association_counts: List[AssociationCount] = Field(default_factory=list) node_hierarchy: Optional[NodeHierarchy] = Field(None) @@ -479,8 +442,7 @@ class Node(Entity): name: Optional[str] = Field(None) full_name: Optional[str] = Field(None, description="""The long form name of an entity""") deprecated: Optional[bool] = Field( - None, - description="""A boolean flag indicating that an entity is no longer considered current or valid.""", + None, description="""A boolean flag indicating that an entity is no longer considered current or valid.""" ) description: Optional[str] = Field(None) xref: Optional[List[str]] = Field(default_factory=list) @@ -506,8 +468,7 @@ class Results(ConfiguredBaseModel): class AssociationResults(Results): items: List[Association] = Field( - default_factory=list, - description="""A collection of items, with the type to be overriden by slot_usage""", + default_factory=list, description="""A collection of items, with the type to be overriden by slot_usage""" ) limit: int = Field(..., description="""number of items to return in a response""") offset: int = Field(..., description="""offset into the total number of items""") @@ -517,8 +478,7 @@ class AssociationResults(Results): class AssociationTableResults(Results): items: List[DirectionalAssociation] = Field( - default_factory=list, - description="""A collection of items, with the type to be overriden by slot_usage""", + default_factory=list, description="""A collection of items, with the type to be overriden by slot_usage""" ) limit: int = Field(..., description="""number of items to return in a response""") offset: int = Field(..., description="""offset into the total number of items""") @@ -532,8 +492,7 @@ class CategoryGroupedAssociationResults(Results): description="""The category of the counterpart entity in a given association, eg. the category of the entity that is not the subject""", ) items: List[Association] = Field( - default_factory=list, - description="""A collection of items, with the type to be overriden by slot_usage""", + default_factory=list, description="""A collection of items, with the type to be overriden by slot_usage""" ) limit: int = Field(..., description="""number of items to return in a response""") offset: int = Field(..., description="""offset into the total number of items""") @@ -543,8 +502,7 @@ class CategoryGroupedAssociationResults(Results): class EntityResults(Results): items: List[Entity] = Field( - default_factory=list, - description="""A collection of items, with the type to be overriden by slot_usage""", + default_factory=list, description="""A collection of items, with the type to be overriden by slot_usage""" ) limit: int = Field(..., description="""number of items to return in a response""") offset: int = Field(..., description="""offset into the total number of items""") @@ -557,8 +515,7 @@ class MappingResults(Results): """ items: List[Mapping] = Field( - default_factory=list, - description="""A collection of items, with the type to be overriden by slot_usage""", + default_factory=list, description="""A collection of items, with the type to be overriden by slot_usage""" ) limit: int = Field(..., description="""number of items to return in a response""") offset: int = Field(..., description="""offset into the total number of items""") @@ -584,16 +541,14 @@ class SearchResult(Entity): name: str = Field(...) full_name: Optional[str] = Field(None, description="""The long form name of an entity""") deprecated: Optional[bool] = Field( - None, - description="""A boolean flag indicating that an entity is no longer considered current or valid.""", + None, description="""A boolean flag indicating that an entity is no longer considered current or valid.""" ) description: Optional[str] = Field(None) xref: Optional[List[str]] = Field(default_factory=list) provided_by: Optional[str] = Field(None) in_taxon: Optional[str] = Field(None, description="""The biolink taxon that the entity is in the closure of.""") in_taxon_label: Optional[str] = Field( - None, - description="""The label of the biolink taxon that the entity is in the closure of.""", + None, description="""The label of the biolink taxon that the entity is in the closure of.""" ) symbol: Optional[str] = Field(None) synonym: Optional[List[str]] = Field(default_factory=list) @@ -603,12 +558,10 @@ class SearchResult(Entity): class SearchResults(Results): items: List[SearchResult] = Field( - default_factory=list, - description="""A collection of items, with the type to be overriden by slot_usage""", + default_factory=list, description="""A collection of items, with the type to be overriden by slot_usage""" ) facet_fields: Optional[List[FacetField]] = Field( - default_factory=list, - description="""Collection of facet field responses with the field values and counts""", + default_factory=list, description="""Collection of facet field responses with the field values and counts""" ) facet_queries: Optional[List[FacetValue]] = Field( default_factory=list, @@ -648,17 +601,14 @@ class TermPairwiseSimilarity(PairwiseSimilarity): subject_information_content: Optional[float] = Field(None, description="""The IC of the subject""") ancestor_information_content: Optional[float] = Field(None, description="""The IC of the object""") jaccard_similarity: Optional[float] = Field( - None, - description="""The number of concepts in the intersection divided by the number in the union""", + None, description="""The number of concepts in the intersection divided by the number in the union""" ) cosine_similarity: Optional[float] = Field( - None, - description="""the dot product of two node embeddings divided by the product of their lengths""", + None, description="""the dot product of two node embeddings divided by the product of their lengths""" ) dice_similarity: Optional[float] = Field(None) phenodigm_score: Optional[float] = Field( - None, - description="""the geometric mean of the jaccard similarity and the information content""", + None, description="""the geometric mean of the jaccard similarity and the information content""" ) @@ -694,6 +644,13 @@ class BestMatch(ConfiguredBaseModel): similarity: TermPairwiseSimilarity = Field(...) +class SemsimSearchResult(ConfiguredBaseModel): + + subject_id: str = Field(...) + score: Optional[float] = Field(None) + similarity: Optional[TermSetPairwiseSimilarity] = Field(None) + + # Update forward refs # see https://pydantic-docs.helpmanual.io/usage/postponed_annotations/ Association.update_forward_refs() @@ -724,3 +681,4 @@ class BestMatch(ConfiguredBaseModel): TermSetPairwiseSimilarity.update_forward_refs() TermInfo.update_forward_refs() BestMatch.update_forward_refs() +SemsimSearchResult.update_forward_refs() diff --git a/backend/src/monarch_py/datamodels/similarity.yaml b/backend/src/monarch_py/datamodels/similarity.yaml index 7aae6ba36..951a5d259 100644 --- a/backend/src/monarch_py/datamodels/similarity.yaml +++ b/backend/src/monarch_py/datamodels/similarity.yaml @@ -78,6 +78,11 @@ classes: range: TermPairwiseSimilarity required: true + SemsimSearchResult: + slots: + - subject_id + - score + - similarity types: ZeroToOne: @@ -95,11 +100,13 @@ types: minimum_value: 0 slots: -# subject_id: -# slot_uri: sssom:subject_id -# required: true -# range: uriorcurie -# description: The first of the two entities being compared + similarity: + range: TermSetPairwiseSimilarity + # subject_id: + # slot_uri: sssom:subject_id + # required: true + # range: uriorcurie + # description: The first of the two entities being compared # Excluded, since it conflicts with subject_label from this schema # subject_label: # slot_uri: sssom:subject_label @@ -107,10 +114,10 @@ slots: subject_source: slot_uri: sssom:subject_source description: the source for the first entity -# object_id: -# slot_uri: sssom:object_id -# range: uriorcurie -# description: The second of the two entities being compared + # object_id: + # slot_uri: sssom:object_id + # range: uriorcurie + # description: The second of the two entities being compared # Excluded, since it conflicts with object_label from this schema # object_label: # slot_uri: sssom:object_label diff --git a/backend/tests/fixtures/association_counts_response.py b/backend/tests/fixtures/association_counts_response.py index a36a793cb..a19f9b0e4 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": 3, + "QTime": 2, "params": { "facet.query": [ '(category:"biolink:DiseaseToPhenotypicFeatureAssociation") AND (subject:"MONDO:0020121" OR subject_closure:"MONDO:0020121")', diff --git a/backend/tests/fixtures/association_table_response.py b/backend/tests/fixtures/association_table_response.py index 820b111af..5e7d23aa6 100644 --- a/backend/tests/fixtures/association_table_response.py +++ b/backend/tests/fixtures/association_table_response.py @@ -5,7 +5,7 @@ def association_table_response(): return { "responseHeader": { - "QTime": 1, + "QTime": 0, "params": { "mm": "100%", "q": "*:*", diff --git a/backend/tests/fixtures/autocomplete_response.py b/backend/tests/fixtures/autocomplete_response.py index fd24d788f..d813b807e 100644 --- a/backend/tests/fixtures/autocomplete_response.py +++ b/backend/tests/fixtures/autocomplete_response.py @@ -5,7 +5,7 @@ def autocomplete_response(): return { "responseHeader": { - "QTime": 0, + "QTime": 1, "params": { "mm": "100%", "q": "fanc", diff --git a/backend/tests/fixtures/histopheno_response.py b/backend/tests/fixtures/histopheno_response.py index 6bc1cf57b..67fb5632e 100644 --- a/backend/tests/fixtures/histopheno_response.py +++ b/backend/tests/fixtures/histopheno_response.py @@ -5,7 +5,7 @@ def histopheno_response(): return { "responseHeader": { - "QTime": 4, + "QTime": 2, "params": { "facet.query": [ 'object_closure:"HP:0000924"', diff --git a/backend/tests/fixtures/phenotype_explorer_compare.py b/backend/tests/fixtures/phenotype_explorer_compare.py index 660f9f571..57d285f4a 100644 --- a/backend/tests/fixtures/phenotype_explorer_compare.py +++ b/backend/tests/fixtures/phenotype_explorer_compare.py @@ -5,8 +5,8 @@ def phenotype_explorer_compare(): return { "subject_termset": { - "MP:0002169": {"id": "MP:0002169", "label": "no abnormal phenotype detected (MPO)"}, "MP:0010771": {"id": "MP:0010771", "label": "integument phenotype (MPO)"}, + "MP:0002169": {"id": "MP:0002169", "label": "no abnormal phenotype detected (MPO)"}, }, "object_termset": {"HP:0004325": {"id": "HP:0004325", "label": "Decreased body weight (HPO)"}}, "subject_best_matches": { @@ -15,7 +15,7 @@ def phenotype_explorer_compare(): "match_source_label": "no abnormal phenotype detected (MPO)", "match_target": "HP:0004325", "match_target_label": "Decreased body weight (HPO)", - "score": 1.4431977534690428, + "score": 1.5540019332516637, "match_subsumer": None, "match_subsumer_label": None, "similarity": { @@ -30,11 +30,11 @@ def phenotype_explorer_compare(): "ancestor_source": None, "object_information_content": None, "subject_information_content": None, - "ancestor_information_content": 1.4431977534690428, - "jaccard_similarity": 0.16216216216216217, + "ancestor_information_content": 1.5540019332516637, + "jaccard_similarity": 0.23076923076923078, "cosine_similarity": None, "dice_similarity": None, - "phenodigm_score": 0.48376861011243283, + "phenodigm_score": 0.5988454147360435, }, }, "MP:0010771": { @@ -42,7 +42,7 @@ def phenotype_explorer_compare(): "match_source_label": "integument phenotype (MPO)", "match_target": "HP:0004325", "match_target_label": "Decreased body weight (HPO)", - "score": 1.4431977534690428, + "score": 1.5540019332516637, "match_subsumer": None, "match_subsumer_label": None, "similarity": { @@ -57,11 +57,11 @@ def phenotype_explorer_compare(): "ancestor_source": None, "object_information_content": None, "subject_information_content": None, - "ancestor_information_content": 1.4431977534690428, - "jaccard_similarity": 0.3333333333333333, + "ancestor_information_content": 1.5540019332516637, + "jaccard_similarity": 0.24, "cosine_similarity": None, "dice_similarity": None, - "phenodigm_score": 0.6935891563620457, + "phenodigm_score": 0.61070489107293, }, }, }, @@ -71,7 +71,7 @@ def phenotype_explorer_compare(): "match_source_label": "Decreased body weight (HPO)", "match_target": "MP:0010771", "match_target_label": "integument phenotype (MPO)", - "score": 1.4431977534690428, + "score": 1.5540019332516637, "match_subsumer": None, "match_subsumer_label": None, "similarity": { @@ -86,15 +86,15 @@ def phenotype_explorer_compare(): "ancestor_source": None, "object_information_content": None, "subject_information_content": None, - "ancestor_information_content": 1.4431977534690428, - "jaccard_similarity": 0.3333333333333333, + "ancestor_information_content": 1.5540019332516637, + "jaccard_similarity": 0.24, "cosine_similarity": None, "dice_similarity": None, - "phenodigm_score": 0.6935891563620457, + "phenodigm_score": 0.61070489107293, }, } }, - "average_score": 1.4431977534690428, - "best_score": 1.4431977534690428, + "average_score": 1.5540019332516637, + "best_score": 1.5540019332516637, "metric": "ancestor_information_content", } diff --git a/backend/tests/fixtures/phenotype_explorer_search.py b/backend/tests/fixtures/phenotype_explorer_search.py new file mode 100644 index 000000000..49a5081a1 --- /dev/null +++ b/backend/tests/fixtures/phenotype_explorer_search.py @@ -0,0 +1,793 @@ +import pytest + + +@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", + ], + ] diff --git a/backend/tests/fixtures/search_response.py b/backend/tests/fixtures/search_response.py index c096e99ff..07e1cdf67 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": 1, + "QTime": 0, "params": { "mm": "100%", "q": "fanconi", diff --git a/frontend/fixtures/phenotype-explorer-compare.json b/frontend/fixtures/phenotype-explorer-compare.json index 47898790d..ec04ed5a2 100644 --- a/frontend/fixtures/phenotype-explorer-compare.json +++ b/frontend/fixtures/phenotype-explorer-compare.json @@ -1,12 +1,12 @@ { "subject_termset": { - "MP:0002169": { - "id": "MP:0002169", - "label": "no abnormal phenotype detected (MPO)" - }, "MP:0010771": { "id": "MP:0010771", "label": "integument phenotype (MPO)" + }, + "MP:0002169": { + "id": "MP:0002169", + "label": "no abnormal phenotype detected (MPO)" } }, "object_termset": { @@ -21,7 +21,7 @@ "match_source_label": "no abnormal phenotype detected (MPO)", "match_target": "HP:0004325", "match_target_label": "Decreased body weight (HPO)", - "score": 1.4431977534690428, + "score": 1.5540019332516637, "match_subsumer": null, "match_subsumer_label": null, "similarity": { @@ -36,11 +36,11 @@ "ancestor_source": null, "object_information_content": null, "subject_information_content": null, - "ancestor_information_content": 1.4431977534690428, - "jaccard_similarity": 0.16216216216216217, + "ancestor_information_content": 1.5540019332516637, + "jaccard_similarity": 0.23076923076923078, "cosine_similarity": null, "dice_similarity": null, - "phenodigm_score": 0.48376861011243283 + "phenodigm_score": 0.5988454147360435 } }, "MP:0010771": { @@ -48,7 +48,7 @@ "match_source_label": "integument phenotype (MPO)", "match_target": "HP:0004325", "match_target_label": "Decreased body weight (HPO)", - "score": 1.4431977534690428, + "score": 1.5540019332516637, "match_subsumer": null, "match_subsumer_label": null, "similarity": { @@ -63,11 +63,11 @@ "ancestor_source": null, "object_information_content": null, "subject_information_content": null, - "ancestor_information_content": 1.4431977534690428, - "jaccard_similarity": 0.3333333333333333, + "ancestor_information_content": 1.5540019332516637, + "jaccard_similarity": 0.24, "cosine_similarity": null, "dice_similarity": null, - "phenodigm_score": 0.6935891563620457 + "phenodigm_score": 0.61070489107293 } } }, @@ -77,7 +77,7 @@ "match_source_label": "Decreased body weight (HPO)", "match_target": "MP:0010771", "match_target_label": "integument phenotype (MPO)", - "score": 1.4431977534690428, + "score": 1.5540019332516637, "match_subsumer": null, "match_subsumer_label": null, "similarity": { @@ -92,15 +92,15 @@ "ancestor_source": null, "object_information_content": null, "subject_information_content": null, - "ancestor_information_content": 1.4431977534690428, - "jaccard_similarity": 0.3333333333333333, + "ancestor_information_content": 1.5540019332516637, + "jaccard_similarity": 0.24, "cosine_similarity": null, "dice_similarity": null, - "phenodigm_score": 0.6935891563620457 + "phenodigm_score": 0.61070489107293 } } }, - "average_score": 1.4431977534690428, - "best_score": 1.4431977534690428, + "average_score": 1.5540019332516637, + "best_score": 1.5540019332516637, "metric": "ancestor_information_content" } diff --git a/frontend/fixtures/phenotype-explorer-search.json b/frontend/fixtures/phenotype-explorer-search.json index 3318c0f38..b9b077c65 100644 --- a/frontend/fixtures/phenotype-explorer-search.json +++ b/frontend/fixtures/phenotype-explorer-search.json @@ -1,1207 +1,948 @@ -{ - "query": { - "ids": [ - { - "id": "HP:0004927", - "label": "Pulmonary artery dilatation" - }, - { - "id": "HP:0012499", - "label": "Descending aortic dissection" - }, - { - "id": "HP:0002108", - "label": "Spontaneous pneumothorax" - }, - { - "id": "HP:0002650", - "label": "Scoliosis" - }, - { - "id": "HP:0004872", - "label": "Incisional hernia" - } - ], - "negated_ids": [], - "unresolved_ids": [], - "target_ids": [[]], - "reference": { - "type": null, - "taxon": { - "id": null, - "label": null - }, - "id": null, - "label": null - } - }, - "matches": [ +[ + [ + 8.153058700868163, { - "rank": "1", - "score": 55, - "significance": "NaN", - "pairwise_match": [ + "subject_termset": [ { - "reference": { - "IC": 13.51567906344194, - "id": "HP:0004872", - "label": "Incisional hernia" - }, - "match": { - "IC": 4.571421808762562, - "id": "MP:0002135", - "label": "abnormal kidney morphology" - }, - "lcs": { - "IC": 3.072764523232806, - "id": "UBERON:0000916PHENOTYPE", - "label": "abdomen phenotype" - } - }, - { - "reference": { - "IC": 11.706177795724818, - "id": "HP:0004927", - "label": "Pulmonary artery dilatation" - }, - "match": { - "IC": 11.80847202944253, - "id": "MP:0010574", - "label": "aorta dilation" - }, - "lcs": { - "IC": 9.361837675112668, - "id": "MP:0004938", - "label": "dilated vasculature" + "ZP:0002909": { + "id": "ZP:0002909", + "label": "whole organism dwarf-like, abnormal (ZPO)" } } ], - "type": "gene", - "taxon": { - "id": "NCBITaxon:10090", - "label": "Mus musculus" + "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" + } }, - "id": "MGI:1917047", - "label": "1600029I14Rik" - }, - { - "rank": "2", - "score": 53, - "significance": "NaN", - "pairwise_match": [ - { - "reference": { - "IC": 11.706177795724818, - "id": "HP:0004927", - "label": "Pulmonary artery dilatation" - }, - "match": { - "IC": 11.80847202944253, - "id": "MP:0010574", - "label": "aorta dilation" - }, - "lcs": { - "IC": 9.361837675112668, - "id": "MP:0004938", - "label": "dilated vasculature" - } - }, + "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": [ { - "reference": { - "IC": 12.077106472055958, - "id": "HP:0002108", - "label": "Spontaneous pneumothorax" - }, - "match": { - "IC": 5.570333497848441, - "id": "HP:0011021", - "label": "Abnormality of circulating enzyme level" - }, - "lcs": { - "IC": 3.038638191942985, - "id": "MP:0002327", - "label": "abnormal respiratory function" + "HP:0000002": { + "id": "HP:0000002", + "label": "Abnormality of body height (HPO)" } }, { - "reference": { - "IC": 12.084106472055957, - "id": "HP:0012499", - "label": "Descending aortic dissection" - }, - "match": { - "IC": 10.84418088916987, - "id": "MP:0009873", - "label": "abnormal aorta tunica media morphology" - }, - "lcs": { - "IC": 6.158857187847771, - "id": "MP:0000272", - "label": "abnormal aorta morphology" + "HP:0000001": { + "id": "HP:0000001", + "label": "All (HPO)" } } ], - "type": "gene", - "taxon": { - "id": "NCBITaxon:10090", - "label": "Mus musculus" + "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" + } }, - "id": "MGI:1916910", - "label": "Tmbim1" + "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, { - "rank": "3", - "score": 52, - "significance": "NaN", - "pairwise_match": [ + "subject_termset": [ { - "reference": { - "IC": 13.51567906344194, - "id": "HP:0004872", - "label": "Incisional hernia" - }, - "match": { - "IC": 8.61667485341866, - "id": "MP:0003052", - "label": "omphalocele" - }, - "lcs": { - "IC": 6.409144649269582, - "id": "MP:0000757", - "label": "herniated abdominal wall" - } - }, - { - "reference": { - "IC": 5.298666172471088, - "id": "HP:0002650", - "label": "Scoliosis" - }, - "match": { - "IC": 7.903193951676492, - "id": "HP:0002414", - "label": "Spina bifida" - }, - "lcs": { - "IC": 4.436155277899098, - "id": "MP:0004703", - "label": "abnormal vertebral column morphology" - } - }, - { - "reference": { - "IC": 11.706177795724818, - "id": "HP:0004927", - "label": "Pulmonary artery dilatation" - }, - "match": { - "IC": 11.706177795724818, - "id": "MP:0010557", - "label": "dilated pulmonary artery" - }, - "lcs": { - "IC": 11.706177795724818, - "id": "MP:0010557", - "label": "dilated pulmonary artery" - } - }, - { - "reference": { - "IC": 12.077106472055958, - "id": "HP:0002108", - "label": "Spontaneous pneumothorax" - }, - "match": { - "IC": 13.325033985499543, - "id": "MP:0010976", - "label": "small lung lobe" - }, - "lcs": { - "IC": 4.5386264433260255, - "id": "MP:0001175", - "label": "abnormal lung morphology" - } - }, - { - "reference": { - "IC": 12.084106472055957, - "id": "HP:0012499", - "label": "Descending aortic dissection" - }, - "match": { - "IC": 7.969711771253728, - "id": "HP:0001719", - "label": "Double outlet right ventricle" - }, - "lcs": { - "IC": 5.366020820610057, - "id": "HP:0030962", - "label": "Abnormal morphology of the great vessels" + "ZP:0000473": { + "id": "ZP:0000473", + "label": "whole organism decreased length, abnormal (ZPO)" } } ], - "type": "gene", - "taxon": { - "id": "NCBITaxon:10090", - "label": "Mus musculus" + "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" + } }, - "id": "MGI:1918711", - "label": "Ptk7" - }, - { - "rank": "3", - "score": 52, - "significance": "NaN", - "pairwise_match": [ + "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": [ { - "reference": { - "IC": 11.706177795724818, - "id": "HP:0004927", - "label": "Pulmonary artery dilatation" - }, - "match": { - "IC": 16.402033985499543, - "id": "MP:0030338", - "label": "dilated third pharyngeal arch artery" - }, - "lcs": { - "IC": 9.361837675112668, - "id": "MP:0004938", - "label": "dilated vasculature" + "HP:0000001": { + "id": "HP:0000001", + "label": "All (HPO)" } }, { - "reference": { - "IC": 12.084106472055957, - "id": "HP:0012499", - "label": "Descending aortic dissection" - }, - "match": { - "IC": 8.493284944083486, - "id": "MP:0006278", - "label": "aortic aneurysm" - }, - "lcs": { - "IC": 6.158857187847771, - "id": "MP:0000272", - "label": "abnormal aorta morphology" + "HP:0000002": { + "id": "HP:0000002", + "label": "Abnormality of body height (HPO)" } } ], - "type": "gene", - "taxon": { - "id": "NCBITaxon:10090", - "label": "Mus musculus" + "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" + } }, - "id": "MGI:3050795", - "label": "Mrtfb" + "average_score": 8.153058700868163, + "best_score": 10.870744934490885, + "metric": "ancestor_information_content" }, + "ZFIN:ZDB-GENE-081022-128" + ], + [ + 8.153058700868163, { - "rank": "3", - "score": 52, - "significance": "NaN", - "pairwise_match": [ - { - "reference": { - "IC": 11.706177795724818, - "id": "HP:0004927", - "label": "Pulmonary artery dilatation" - }, - "match": { - "IC": 11.706177795724818, - "id": "MP:0010557", - "label": "dilated pulmonary artery" - }, - "lcs": { - "IC": 11.706177795724818, - "id": "MP:0010557", - "label": "dilated pulmonary artery" - } - }, - { - "reference": { - "IC": 12.077106472055958, - "id": "HP:0002108", - "label": "Spontaneous pneumothorax" - }, - "match": { - "IC": 9.943716562720784, - "id": "MP:0003828", - "label": "pulmonary edema" - }, - "lcs": { - "IC": 4.5386264433260255, - "id": "MP:0001175", - "label": "abnormal lung morphology" - } - }, + "subject_termset": [ { - "reference": { - "IC": 12.084106472055957, - "id": "HP:0012499", - "label": "Descending aortic dissection" - }, - "match": { - "IC": 7.289921565835255, - "id": "HP:0001643", - "label": "Patent ductus arteriosus" - }, - "lcs": { - "IC": 5.679982292571567, - "id": "MP:0011655", - "label": "abnormal systemic artery morphology" + "ZP:0000473": { + "id": "ZP:0000473", + "label": "whole organism decreased length, abnormal (ZPO)" } } ], - "type": "gene", - "taxon": { - "id": "NCBITaxon:10090", - "label": "Mus musculus" + "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" + } }, - "id": "MGI:104311", - "label": "Ptger4" - }, - { - "rank": "3", - "score": 52, - "significance": "NaN", - "pairwise_match": [ + "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": [ { - "reference": { - "IC": 13.51567906344194, - "id": "HP:0004872", - "label": "Incisional hernia" - }, - "match": { - "IC": 4.571421808762562, - "id": "MP:0002135", - "label": "abnormal kidney morphology" - }, - "lcs": { - "IC": 3.072764523232806, - "id": "UBERON:0000916PHENOTYPE", - "label": "abdomen phenotype" + "HP:0000002": { + "id": "HP:0000002", + "label": "Abnormality of body height (HPO)" } }, { - "reference": { - "IC": 11.706177795724818, - "id": "HP:0004927", - "label": "Pulmonary artery dilatation" - }, - "match": { - "IC": 11.80847202944253, - "id": "MP:0010574", - "label": "aorta dilation" - }, - "lcs": { - "IC": 9.361837675112668, - "id": "MP:0004938", - "label": "dilated vasculature" + "HP:0000001": { + "id": "HP:0000001", + "label": "All (HPO)" } } ], - "type": "gene", - "taxon": { - "id": "NCBITaxon:10090", - "label": "Mus musculus" + "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" + } }, - "id": "MGI:1342274", - "label": "Slc25a15" + "average_score": 8.153058700868163, + "best_score": 10.870744934490885, + "metric": "ancestor_information_content" }, + "ZFIN:ZDB-GENE-111209-1" + ], + [ + 8.153058700868163, { - "rank": "4", - "score": 50, - "significance": "NaN", - "pairwise_match": [ + "subject_termset": [ { - "reference": { - "IC": 11.706177795724818, - "id": "HP:0004927", - "label": "Pulmonary artery dilatation" - }, - "match": { - "IC": 11.80847202944253, - "id": "MP:0010574", - "label": "aorta dilation" - }, - "lcs": { - "IC": 9.361837675112668, - "id": "MP:0004938", - "label": "dilated vasculature" - } - }, - { - "reference": { - "IC": 12.077106472055958, - "id": "HP:0002108", - "label": "Spontaneous pneumothorax" - }, - "match": { - "IC": 4.290059386682237, - "id": "MP:0000598", - "label": "abnormal liver morphology" - }, - "lcs": { - "IC": 3.1636076652786165, - "id": "UBERON:0004119PHENOTYPE", - "label": "endoderm-derived structure phenotype" + "ZP:0000473": { + "id": "ZP:0000473", + "label": "whole organism decreased length, abnormal (ZPO)" } } ], - "type": "gene", - "taxon": { - "id": "NCBITaxon:10090", - "label": "Mus musculus" + "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" + } }, - "id": "MGI:96877", - "label": "Klrb1" - }, - { - "rank": "5", - "score": 49, - "significance": "NaN", - "pairwise_match": [ + "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": [ { - "reference": { - "IC": 13.51567906344194, - "id": "HP:0004872", - "label": "Incisional hernia" - }, - "match": { - "IC": 9.933716562720784, - "id": "MP:0000642", - "label": "enlarged adrenal glands" - }, - "lcs": { - "IC": 3.072764523232806, - "id": "UBERON:0000916PHENOTYPE", - "label": "abdomen phenotype" + "HP:0000001": { + "id": "HP:0000001", + "label": "All (HPO)" } }, { - "reference": { - "IC": 11.706177795724818, - "id": "HP:0004927", - "label": "Pulmonary artery dilatation" - }, - "match": { - "IC": 11.80847202944253, - "id": "MP:0010574", - "label": "aorta dilation" - }, - "lcs": { - "IC": 9.361837675112668, - "id": "MP:0004938", - "label": "dilated vasculature" + "HP:0000002": { + "id": "HP:0000002", + "label": "Abnormality of body height (HPO)" } } ], - "type": "gene", - "taxon": { - "id": "NCBITaxon:10090", - "label": "Mus musculus" + "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" + } }, - "id": "MGI:1914504", - "label": "Bmerb1" + "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, { - "rank": "5", - "score": 49, - "significance": "NaN", - "pairwise_match": [ + "subject_termset": [ { - "reference": { - "IC": 11.706177795724818, - "id": "HP:0004927", - "label": "Pulmonary artery dilatation" - }, - "match": { - "IC": 12.200108984057229, - "id": "MP:0011509", - "label": "dilated glomerular capillary" - }, - "lcs": { - "IC": 9.361837675112668, - "id": "MP:0004938", - "label": "dilated vasculature" - } - }, - { - "reference": { - "IC": 12.077106472055958, - "id": "HP:0002108", - "label": "Spontaneous pneumothorax" - }, - "match": { - "IC": 8.065263215368942, - "id": "MP:0005565", - "label": "increased blood urea nitrogen level" - }, - "lcs": { - "IC": 3.038638191942985, - "id": "MP:0002327", - "label": "abnormal respiratory function" - } - }, - { - "reference": { - "IC": 12.084106472055957, - "id": "HP:0012499", - "label": "Descending aortic dissection" - }, - "match": { - "IC": 10.82447202944253, - "id": "MP:0011309", - "label": "abnormal kidney arterial blood vessel morphology" - }, - "lcs": { - "IC": 5.679982292571567, - "id": "MP:0011655", - "label": "abnormal systemic artery morphology" + "ZP:0000473": { + "id": "ZP:0000473", + "label": "whole organism decreased length, abnormal (ZPO)" } } ], - "type": "gene", - "taxon": { - "id": "NCBITaxon:10090", - "label": "Mus musculus" + "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" + } }, - "id": "MGI:2157018", - "label": "Nphs2" - }, - { - "rank": "5", - "score": 49, - "significance": "NaN", - "pairwise_match": [ - { - "reference": { - "IC": 11.706177795724818, - "id": "HP:0004927", - "label": "Pulmonary artery dilatation" - }, - "match": { - "IC": 12.200108984057229, - "id": "MP:0011509", - "label": "dilated glomerular capillary" - }, - "lcs": { - "IC": 9.361837675112668, - "id": "MP:0004938", - "label": "dilated vasculature" - } - }, + "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": [ { - "reference": { - "IC": 12.077106472055958, - "id": "HP:0002108", - "label": "Spontaneous pneumothorax" - }, - "match": { - "IC": 6.865364597365732, - "id": "HP:0003124", - "label": "Hypercholesterolemia" - }, - "lcs": { - "IC": 3.038638191942985, - "id": "MP:0002327", - "label": "abnormal respiratory function" + "HP:0000002": { + "id": "HP:0000002", + "label": "Abnormality of body height (HPO)" } }, { - "reference": { - "IC": 12.084106472055957, - "id": "HP:0012499", - "label": "Descending aortic dissection" - }, - "match": { - "IC": 13.746071484778387, - "id": "MP:0002844", - "label": "aortic hypertrophy" - }, - "lcs": { - "IC": 6.158857187847771, - "id": "MP:0000272", - "label": "abnormal aorta morphology" + "HP:0000001": { + "id": "HP:0000001", + "label": "All (HPO)" } } ], - "type": "gene", - "taxon": { - "id": "NCBITaxon:10090", - "label": "Mus musculus" + "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" + } }, - "id": "MGI:3712268", - "label": "urehr1" + "average_score": 8.153058700868163, + "best_score": 10.870744934490885, + "metric": "ancestor_information_content" }, + "ZFIN:ZDB-GENE-030131-4487" + ], + [ + 8.153058700868163, { - "rank": "6", - "score": 48, - "significance": "NaN", - "pairwise_match": [ - { - "reference": { - "IC": 13.51567906344194, - "id": "HP:0004872", - "label": "Incisional hernia" - }, - "match": { - "IC": 10.485052990371972, - "id": "MP:0020386", - "label": "adipose tissue inflammation" - }, - "lcs": { - "IC": 3.5001137869142727, - "id": "HP:0003549", - "label": "Abnormality of connective tissue" - } - }, + "subject_termset": [ { - "reference": { - "IC": 12.077106472055958, - "id": "HP:0002108", - "label": "Spontaneous pneumothorax" - }, - "match": { - "IC": 4.5386264433260255, - "id": "HP:0002088", - "label": "Abnormal lung morphology" - }, - "lcs": { - "IC": 4.5386264433260255, - "id": "MP:0001175", - "label": "abnormal lung morphology" - } - }, - { - "reference": { - "IC": 12.084106472055957, - "id": "HP:0012499", - "label": "Descending aortic dissection" - }, - "match": { - "IC": 10.201750968554578, - "id": "MP:0004044", - "label": "aortic dissection" - }, - "lcs": { - "IC": 10.201750968554578, - "id": "MP:0004044", - "label": "aortic dissection" + "ZP:0000473": { + "id": "ZP:0000473", + "label": "whole organism decreased length, abnormal (ZPO)" } } ], - "type": "gene", - "taxon": { - "id": "NCBITaxon:10090", - "label": "Mus musculus" + "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" + } }, - "id": "MGI:88453", - "label": "Col3a1" - }, - { - "rank": "6", - "score": 48, - "significance": "NaN", - "pairwise_match": [ + "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": [ { - "reference": { - "IC": 11.706177795724818, - "id": "HP:0004927", - "label": "Pulmonary artery dilatation" - }, - "match": { - "IC": 11.706177795724818, - "id": "MP:0010557", - "label": "dilated pulmonary artery" - }, - "lcs": { - "IC": 11.706177795724818, - "id": "MP:0010557", - "label": "dilated pulmonary artery" + "HP:0000001": { + "id": "HP:0000001", + "label": "All (HPO)" } }, { - "reference": { - "IC": 12.084106472055957, - "id": "HP:0012499", - "label": "Descending aortic dissection" - }, - "match": { - "IC": 12.376033985499543, - "id": "MP:0010593", - "label": "thick aortic valve cusps" - }, - "lcs": { - "IC": 6.158857187847771, - "id": "MP:0000272", - "label": "abnormal aorta morphology" + "HP:0000002": { + "id": "HP:0000002", + "label": "Abnormality of body height (HPO)" } } ], - "type": "gene", - "taxon": { - "id": "NCBITaxon:10090", - "label": "Mus musculus" + "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" + } }, - "id": "MGI:97350", - "label": "Nkx2-5" + "average_score": 8.153058700868163, + "best_score": 10.870744934490885, + "metric": "ancestor_information_content" }, + "ZFIN:ZDB-GENE-070117-1594" + ], + [ + 8.153058700868163, { - "rank": "6", - "score": 48, - "significance": "NaN", - "pairwise_match": [ + "subject_termset": [ { - "reference": { - "IC": 11.706177795724818, - "id": "HP:0004927", - "label": "Pulmonary artery dilatation" - }, - "match": { - "IC": 11.706177795724818, - "id": "MP:0010557", - "label": "dilated pulmonary artery" - }, - "lcs": { - "IC": 11.706177795724818, - "id": "MP:0010557", - "label": "dilated pulmonary artery" + "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": [ { - "reference": { - "IC": 12.077106472055958, - "id": "HP:0002108", - "label": "Spontaneous pneumothorax" - }, - "match": { - "IC": 9.943716562720784, - "id": "MP:0003828", - "label": "pulmonary edema" - }, - "lcs": { - "IC": 4.5386264433260255, - "id": "MP:0001175", - "label": "abnormal lung morphology" + "HP:0000001": { + "id": "HP:0000001", + "label": "All (HPO)" } }, { - "reference": { - "IC": 12.084106472055957, - "id": "HP:0012499", - "label": "Descending aortic dissection" - }, - "match": { - "IC": 7.980346578692326, - "id": "MP:0000273", - "label": "overriding aortic valve" - }, - "lcs": { - "IC": 6.158857187847771, - "id": "MP:0000272", - "label": "abnormal aorta morphology" + "HP:0000002": { + "id": "HP:0000002", + "label": "Abnormality of body height (HPO)" } } ], - "type": "gene", - "taxon": { - "id": "NCBITaxon:10090", - "label": "Mus musculus" + "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" + } }, - "id": "MGI:97380", - "label": "Ntf3" + "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, { - "rank": "6", - "score": 48, - "significance": "NaN", - "pairwise_match": [ - { - "reference": { - "IC": 13.51567906344194, - "id": "HP:0004872", - "label": "Incisional hernia" - }, - "match": { - "IC": 12.880602366862245, - "id": "MP:0014103", - "label": "increased chondrocyte apoptosis" - }, - "lcs": { - "IC": 3.5001137869142727, - "id": "HP:0003549", - "label": "Abnormality of connective tissue" - } - }, + "subject_termset": [ { - "reference": { - "IC": 5.298666172471088, - "id": "HP:0002650", - "label": "Scoliosis" - }, - "match": { - "IC": 6.095826548556041, - "id": "HP:0002808", - "label": "Kyphosis" - }, - "lcs": { - "IC": 4.965784603554302, - "id": "MP:0004174", - "label": "abnormal spine curvature" - } - }, - { - "reference": { - "IC": 12.077106472055958, - "id": "HP:0002108", - "label": "Spontaneous pneumothorax" - }, - "match": { - "IC": 12.206108984057229, - "id": "MP:0005243", - "label": "hemothorax" - }, - "lcs": { - "IC": 4.5386264433260255, - "id": "MP:0001175", - "label": "abnormal lung morphology" - } - }, - { - "reference": { - "IC": 12.084106472055957, - "id": "HP:0012499", - "label": "Descending aortic dissection" - }, - "match": { - "IC": 10.201750968554578, - "id": "MP:0004044", - "label": "aortic dissection" - }, - "lcs": { - "IC": 10.201750968554578, - "id": "MP:0004044", - "label": "aortic dissection" + "ZP:0000473": { + "id": "ZP:0000473", + "label": "whole organism decreased length, abnormal (ZPO)" } } ], - "type": "gene", - "taxon": { - "id": "NCBITaxon:10090", - "label": "Mus musculus" + "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" + } }, - "id": "MGI:98728", - "label": "Tgfbr1" - }, - { - "rank": "6", - "score": 48, - "significance": "NaN", - "pairwise_match": [ + "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": [ { - "reference": { - "IC": 11.706177795724818, - "id": "HP:0004927", - "label": "Pulmonary artery dilatation" - }, - "match": { - "IC": 11.80847202944253, - "id": "MP:0010574", - "label": "aorta dilation" - }, - "lcs": { - "IC": 9.361837675112668, - "id": "MP:0004938", - "label": "dilated vasculature" + "HP:0000001": { + "id": "HP:0000001", + "label": "All (HPO)" } }, { - "reference": { - "IC": 12.077106472055958, - "id": "HP:0002108", - "label": "Spontaneous pneumothorax" - }, - "match": { - "IC": 4.290059386682237, - "id": "MP:0000598", - "label": "abnormal liver morphology" - }, - "lcs": { - "IC": 3.1636076652786165, - "id": "UBERON:0004119PHENOTYPE", - "label": "endoderm-derived structure phenotype" + "HP:0000002": { + "id": "HP:0000002", + "label": "Abnormality of body height (HPO)" } } ], - "type": "gene", - "taxon": { - "id": "NCBITaxon:10090", - "label": "Mus musculus" + "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" + } }, - "id": "MGI:1347344", - "label": "Gla" + "average_score": 8.153058700868163, + "best_score": 10.870744934490885, + "metric": "ancestor_information_content" }, + "ZFIN:ZDB-GENE-100729-3" + ], + [ + 7.661460799028868, { - "rank": "6", - "score": 48, - "significance": "NaN", - "pairwise_match": [ + "subject_termset": [ { - "reference": { - "IC": 5.298666172471088, - "id": "HP:0002650", - "label": "Scoliosis" - }, - "match": { - "IC": 10.369754061999627, - "id": "MP:0004613", - "label": "fusion of vertebral arches" - }, - "lcs": { - "IC": 4.436155277899098, - "id": "MP:0004703", - "label": "abnormal vertebral column morphology" + "ZP:0014819": { + "id": "ZP:0014819", + "label": "growth decreased process quality, abnormal (ZPO)" } }, { - "reference": { - "IC": 11.706177795724818, - "id": "HP:0004927", - "label": "Pulmonary artery dilatation" - }, - "match": { - "IC": 9.361837675112668, - "id": "MP:0004938", - "label": "dilated vasculature" - }, - "lcs": { - "IC": 9.361837675112668, - "id": "MP:0004938", - "label": "dilated vasculature" - } - }, - { - "reference": { - "IC": 12.084106472055957, - "id": "HP:0012499", - "label": "Descending aortic dissection" - }, - "match": { - "IC": 9.437143389891025, - "id": "MP:0004158", - "label": "right aortic arch" - }, - "lcs": { - "IC": 6.158857187847771, - "id": "MP:0000272", - "label": "abnormal aorta morphology" + "ZP:0000473": { + "id": "ZP:0000473", + "label": "whole organism decreased length, abnormal (ZPO)" } } ], - "type": "gene", - "taxon": { - "id": "NCBITaxon:10090", - "label": "Mus musculus" + "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" + } }, - "id": "MGI:1923304", - "label": "Prrc2b" - }, - { - "rank": "6", - "score": 48, - "significance": "NaN", - "pairwise_match": [ + "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": [ { - "reference": { - "IC": 11.706177795724818, - "id": "HP:0004927", - "label": "Pulmonary artery dilatation" - }, - "match": { - "IC": 9.276750968554579, - "id": "MP:0002633", - "label": "persistent truncus arteriosis" - }, - "lcs": { - "IC": 7.095368553049294, - "id": "MP:0000484", - "label": "abnormal pulmonary artery morphology" + "HP:0000001": { + "id": "HP:0000001", + "label": "All (HPO)" } }, { - "reference": { - "IC": 12.084106472055957, - "id": "HP:0012499", - "label": "Descending aortic dissection" - }, - "match": { - "IC": 9.437143389891025, - "id": "HP:0012020", - "label": "Right aortic arch" - }, - "lcs": { - "IC": 6.158857187847771, - "id": "MP:0000272", - "label": "abnormal aorta morphology" + "HP:0000002": { + "id": "HP:0000002", + "label": "Abnormality of body height (HPO)" } } ], - "type": "gene", - "taxon": { - "id": "NCBITaxon:10090", - "label": "Mus musculus" + "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" + } }, - "id": "MGI:5430039", - "label": "b2b243.1Clo" + "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, { - "rank": "7", - "score": 47, - "significance": "NaN", - "pairwise_match": [ + "subject_termset": [ { - "reference": { - "IC": 12.077106472055958, - "id": "HP:0002108", - "label": "Spontaneous pneumothorax" - }, - "match": { - "IC": 9.096106472055958, - "id": "HP:0002097", - "label": "Emphysema" - }, - "lcs": { - "IC": 4.5386264433260255, - "id": "MP:0001175", - "label": "abnormal lung morphology" + "ZP:0000324": { + "id": "ZP:0000324", + "label": "whole organism decreased size, abnormal (ZPO)" } }, { - "reference": { - "IC": 12.084106472055957, - "id": "HP:0012499", - "label": "Descending aortic dissection" - }, - "match": { - "IC": 10.201750968554578, - "id": "MP:0004044", - "label": "aortic dissection" - }, - "lcs": { - "IC": 10.201750968554578, - "id": "MP:0004044", - "label": "aortic dissection" + "ZP:0001589": { + "id": "ZP:0001589", + "label": "embryo development disrupted, abnormal (ZPO)" } } ], - "type": "gene", - "taxon": { - "id": "NCBITaxon:10090", - "label": "Mus musculus" + "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" + } }, - "id": "MGI:1918961", - "label": "Mus81" - }, - { - "rank": "7", - "score": 47, - "significance": "NaN", - "pairwise_match": [ - { - "reference": { - "IC": 13.51567906344194, - "id": "HP:0004872", - "label": "Incisional hernia" - }, - "match": { - "IC": 10.178215295003662, - "id": "MP:0002666", - "label": "increased circulating aldosterone level" - }, - "lcs": { - "IC": 3.072764523232806, - "id": "UBERON:0000916PHENOTYPE", - "label": "abdomen phenotype" - } - }, + "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": [ { - "reference": { - "IC": 12.077106472055958, - "id": "HP:0002108", - "label": "Spontaneous pneumothorax" - }, - "match": { - "IC": 9.139865465037381, - "id": "HP:0040171", - "label": "Decreased serum testosterone level" - }, - "lcs": { - "IC": 3.038638191942985, - "id": "MP:0002327", - "label": "abnormal respiratory function" + "HP:0000001": { + "id": "HP:0000001", + "label": "All (HPO)" } }, { - "reference": { - "IC": 12.084106472055957, - "id": "HP:0012499", - "label": "Descending aortic dissection" - }, - "match": { - "IC": 10.201750968554578, - "id": "MP:0004044", - "label": "aortic dissection" - }, - "lcs": { - "IC": 10.201750968554578, - "id": "MP:0004044", - "label": "aortic dissection" + "HP:0000002": { + "id": "HP:0000002", + "label": "Abnormality of body height (HPO)" } } ], - "type": "gene", - "taxon": { - "id": "NCBITaxon:10090", - "label": "Mus musculus" + "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" + } }, - "id": "MGI:97371", - "label": "Npr1" - }, - { - "rank": "7", - "score": 47, - "significance": "NaN", - "pairwise_match": [ - { - "reference": { - "IC": 12.084106472055957, - "id": "HP:0012499", - "label": "Descending aortic dissection" - }, - "match": { - "IC": 10.201750968554578, - "id": "MP:0004044", - "label": "aortic dissection" - }, - "lcs": { - "IC": 10.201750968554578, - "id": "MP:0004044", - "label": "aortic dissection" - } + "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" } - ], - "type": "gene", - "taxon": { - "id": "NCBITaxon:10090", - "label": "Mus musculus" }, - "id": "MGI:99907", - "label": "Plod1" - } - ], - "metadata": { - "max_max_ic": 16.48703 - } -} + "average_score": 6.283193403469026, + "best_score": 10.870744934490885, + "metric": "ancestor_information_content" + }, + "ZFIN:ZDB-GENE-130726-2" + ] +] diff --git a/frontend/src/api/model.ts b/frontend/src/api/model.ts index cc7263ce7..163510f07 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?: number, + object_information_content?: string, /** The IC of the subject */ - subject_information_content?: number, + subject_information_content?: string, /** The IC of the object */ - ancestor_information_content?: number, + ancestor_information_content?: string, /** The number of concepts in the intersection divided by the number in the union */ - jaccard_similarity?: number, + jaccard_similarity?: string, /** the dot product of two node embeddings divided by the product of their lengths */ cosine_similarity?: number, - dice_similarity?: number, + dice_similarity?: string, /** the geometric mean of the jaccard similarity and the information content */ - phenodigm_score?: number, + phenodigm_score?: string, }; /** * A simple pairwise similarity between two sets of concepts/terms @@ -562,3 +562,9 @@ export interface BestMatch { similarity: TermPairwiseSimilarity, }; +export interface SemsimSearchResult { + subject_id: string, + score?: number, + similarity?: TermSetPairwiseSimilarity, +}; + diff --git a/frontend/src/components/AppPredicateBadge.vue b/frontend/src/components/AppPredicateBadge.vue index 52ca3caa4..82b0756b0 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 be4f067a0..adfcb0e2e 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 6939e22fc..12d5f3879 100644 --- a/scripts/generate_fixtures.py +++ b/scripts/generate_fixtures.py @@ -1,10 +1,15 @@ +""" +Generate fixtures for monarch-app. +Requires a running instance of both Solr and semsimian_server. +""" + import argparse import json import os import sys from pathlib import Path -from monarch_py.implementations.oak.oak_implementation import OakImplementation +from monarch_py.api.semsim import _compare, _search from monarch_py.implementations.solr.solr_implementation import SolrImplementation from monarch_py.implementations.solr.solr_query_utils import ( build_association_query, @@ -21,8 +26,7 @@ # from pprint import pprint as pp ### Define variables -oak = OakImplementation() -oak.init_semsim() + si = SolrImplementation() solr_url = os.getenv("MONARCH_SOLR_URL", "http://localhost:8983/solr") solr_entities = SolrService(base_url=solr_url, core=core.ENTITY) @@ -132,25 +136,14 @@ def main( counts = {"node": [], "association": []} for node_count in [ - { - "label": "Genes", - "icon": "category-gene", - "count": node_counts["biolink:Gene"] - }, + {"label": "Genes", "icon": "category-gene", "count": node_counts["biolink:Gene"]}, { "label": "Phenotypes", "icon": "category-phenotypic-quality", "count": node_counts["biolink:PhenotypicFeature"], }, - { - "label": "Diseases", - "icon": "category-disease", - "count": node_counts["biolink:Disease"] - }, - {"label": "Total Nodes", - "icon": "node", - "count": node_counts_total - }, + {"label": "Diseases", "icon": "category-disease", "count": node_counts["biolink:Disease"]}, + {"label": "Total Nodes", "icon": "node", "count": node_counts_total}, ]: counts["node"].append(node_count) @@ -174,7 +167,7 @@ def main( "label": "Total Associations", "icon": "association", "count": association_counts_total, - } + }, ]: counts["association"].append(association_count) @@ -198,10 +191,8 @@ def main( # fixtures['node-publication-abstract'] = # fixtures['node-publication-summary'] = # fixtures['ontologies'] = - fixtures["phenotype-explorer-compare"] = oak.compare( - subjects=["MP:0010771", "MP:0002169"], objects=["HP:0004325"] - ) - # fixtures['phenotype-explorer-search'] = + 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["search"] = si.search(q="fanconi") # fixtures['text-annotator'] = # fixtures['uptime'] = From 767905b955f1e28cada42fde15bd09c662ccf340 Mon Sep 17 00:00:00 2001 From: Kevin Schaper Date: Tue, 12 Dec 2023 17:06:03 -0800 Subject: [PATCH 2/2] Update semsearch to take a search category enumeration value rather than a raw prefix, plus generate fixtures and manually repair the model so that the scores are numbers rather than strings. --- .../src/monarch_py/api/additional_models.py | 4 +- backend/src/monarch_py/api/semsim.py | 22 +- .../fixtures/association_counts_response.py | 2 +- .../fixtures/phenotype_explorer_search.py | 1852 ++++++++++------- backend/tests/fixtures/search_response.py | 2 +- .../fixtures/phenotype-explorer-search.json | 1842 ++++++++-------- frontend/src/api/model.ts | 12 +- frontend/src/components/AppPredicateBadge.vue | 4 +- frontend/src/components/AppTable.vue | 4 +- scripts/generate_fixtures.py | 2 +- 10 files changed, 2122 insertions(+), 1624 deletions(-) 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'] =