diff --git a/backend/src/monarch_py/implementations/solr/solr_query_utils.py b/backend/src/monarch_py/implementations/solr/solr_query_utils.py index 730b25bd9..7130315da 100644 --- a/backend/src/monarch_py/implementations/solr/solr_query_utils.py +++ b/backend/src/monarch_py/implementations/solr/solr_query_utils.py @@ -283,14 +283,20 @@ def blank_search_boost() -> str: return f"product({boost})" -def entity_query_fields(): +def autocomplete_query_fields(): """ - Shared query field list between search and autocomplete, - since the field list and boosts are currently the same + Fields and boosts used for autocomplete """ return "id^100 name^10 name_t^5 name_ac symbol^10 symbol_t^5 symbol_ac synonym synonym_t synonym_ac" +def entity_query_fields(): + """ + Fields and boosts used for entity search, includes autocomplete fields and expands upon them beyond pure name fields + """ + return f"{autocomplete_query_fields()} description_t" + + def association_search_query_fields(): """ Shared field list for free text search on associations (e.g. for the association table) diff --git a/backend/src/monarch_py/service/curie_service.py b/backend/src/monarch_py/service/curie_service.py index 044f78b43..11d5dea19 100644 --- a/backend/src/monarch_py/service/curie_service.py +++ b/backend/src/monarch_py/service/curie_service.py @@ -9,3 +9,5 @@ # this is a magic keyword that represents the "merged" context from Chris M's algorithm # (https://github.com/linkml/prefixmaps/blob/main/src/prefixmaps/data/merged.csv) converter = load_converter("merged") +converter.add_prefix("GARD", "https://rarediseases.info.nih.gov/diseases/") +converter.add_prefix("Orphanet", "https://www.orpha.net/en/disease/detail/", merge=True) diff --git a/backend/src/monarch_py/utils/utils.py b/backend/src/monarch_py/utils/utils.py index 68cde75e6..c47b02a5d 100644 --- a/backend/src/monarch_py/utils/utils.py +++ b/backend/src/monarch_py/utils/utils.py @@ -68,7 +68,15 @@ def set_log_level(log_level: str): def get_links_for_field(field: List[str]) -> List[ExpandedCurie]: # TODO should be able to remove curie.replace("PMID", "PUBMED")) since the converter should handle prefix synonyms - return [ExpandedCurie(id=curie, url=converter.expand(curie.replace("PMID", "PUBMED"))) for curie in field] + expanded_curies = [ExpandedCurie(id=curie, url=get_link_for_curie(curie)) for curie in field] + return expanded_curies + + +def get_link_for_curie(curie: str) -> ExpandedCurie: + url = converter.expand(curie.replace("PMID", "PUBMED")) + if curie.startswith("GARD:"): + url += "/index" + return url def get_provided_by_link(provided_by: str) -> ExpandedCurie: diff --git a/backend/tests/fixtures/association_counts_response.py b/backend/tests/fixtures/association_counts_response.py index 626b41014..fe99032cf 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": 0, + "QTime": 1, "params": { "facet.query": [ '(category:"biolink:DiseaseToPhenotypicFeatureAssociation") AND (subject:"MONDO:0020121" OR subject_closure:"MONDO:0020121")', diff --git a/backend/tests/fixtures/autocomplete_query.py b/backend/tests/fixtures/autocomplete_query.py index 69bdd5bf1..e1eff3e3e 100644 --- a/backend/tests/fixtures/autocomplete_query.py +++ b/backend/tests/fixtures/autocomplete_query.py @@ -12,7 +12,7 @@ def autocomplete_query(): "facet_fields": [], "facet_queries": [], "filter_queries": [], - "query_fields": "id^100 name^10 name_t^5 name_ac symbol^10 symbol_t^5 symbol_ac synonym synonym_t synonym_ac", + "query_fields": "id^100 name^10 name_t^5 name_ac symbol^10 symbol_t^5 symbol_ac synonym synonym_t synonym_ac description_t", "def_type": "edismax", "q_op": "AND", "mm": "100%", diff --git a/backend/tests/fixtures/autocomplete_response.py b/backend/tests/fixtures/autocomplete_response.py index bdf1ed258..5434d11ba 100644 --- a/backend/tests/fixtures/autocomplete_response.py +++ b/backend/tests/fixtures/autocomplete_response.py @@ -5,13 +5,13 @@ def autocomplete_response(): return { "responseHeader": { - "QTime": 0, + "QTime": 1, "params": { "mm": "100%", "q": "fanc", "defType": "edismax", "facet_min_count": "1", - "qf": "id^100 name^10 name_t^5 name_ac symbol^10 symbol_t^5 symbol_ac synonym synonym_t synonym_ac", + "qf": "id^100 name^10 name_t^5 name_ac symbol^10 symbol_t^5 symbol_ac synonym synonym_t synonym_ac description_t", "start": "0", "q.op": "AND", "boost": 'product(if(termfreq(category,"biolink:PhenotypicFeature"),1.1,1),if(termfreq(category,"biolink:Disease"),1.3,1),if(and(termfreq(in_taxon,"NCBITaxon:9606"),termfreq(category,"biolink:Gene")),1.1,1),if(termfreq(deprecated,"true"),0.1,1))', diff --git a/backend/tests/fixtures/node.py b/backend/tests/fixtures/node.py index bc68d133e..e585286b3 100644 --- a/backend/tests/fixtures/node.py +++ b/backend/tests/fixtures/node.py @@ -42,20 +42,20 @@ def node(): {"id": "DOID:9884", "url": "http://purl.obolibrary.org/obo/DOID_9884"}, {"id": "ICD10CM:G71.0", "url": "https://icd.codes/icd10cm/G71.0"}, {"id": "NCIT:C84910", "url": "http://purl.obolibrary.org/obo/NCIT_C84910"}, - {"id": "Orphanet:98473", "url": None}, + {"id": "Orphanet:98473", "url": "https://www.orpha.net/en/disease/detail/98473"}, {"id": "SCTID:73297009", "url": "http://identifiers.org/snomedct/73297009"}, {"id": "UMLS:C0026850", "url": "http://identifiers.org/umls/C0026850"}, {"id": "MESH:D009136", "url": "http://identifiers.org/mesh/D009136"}, ], "external_links": [ {"id": "DOID:9884", "url": "http://purl.obolibrary.org/obo/DOID_9884"}, - {"id": "GARD:7922", "url": None}, + {"id": "GARD:7922", "url": "https://rarediseases.info.nih.gov/diseases/7922/index"}, {"id": "ICD10CM:G71.0", "url": "https://icd.codes/icd10cm/G71.0"}, {"id": "ICD9:359.1", "url": None}, {"id": "MESH:D009136", "url": "http://identifiers.org/mesh/D009136"}, {"id": "MedDRA:10028356", "url": None}, {"id": "NCIT:C84910", "url": "http://purl.obolibrary.org/obo/NCIT_C84910"}, - {"id": "Orphanet:98473", "url": None}, + {"id": "Orphanet:98473", "url": "https://www.orpha.net/en/disease/detail/98473"}, {"id": "SCTID:73297009", "url": "http://identifiers.org/snomedct/73297009"}, {"id": "UMLS:C0026850", "url": "http://identifiers.org/umls/C0026850"}, ], diff --git a/backend/tests/fixtures/object_formatted.py b/backend/tests/fixtures/object_formatted.py index cad4eb42e..8a5581405 100644 --- a/backend/tests/fixtures/object_formatted.py +++ b/backend/tests/fixtures/object_formatted.py @@ -54,7 +54,7 @@ def node_json(): }, { "id": "Orphanet:98473", - "url": null + "url": "https://www.orpha.net/en/disease/detail/98473" }, { "id": "SCTID:73297009", @@ -76,7 +76,7 @@ def node_json(): }, { "id": "GARD:7922", - "url": null + "url": "https://rarediseases.info.nih.gov/diseases/7922/index" }, { "id": "ICD10CM:G71.0", @@ -100,7 +100,7 @@ def node_json(): }, { "id": "Orphanet:98473", - "url": null + "url": "https://www.orpha.net/en/disease/detail/98473" }, { "id": "SCTID:73297009", @@ -476,7 +476,7 @@ def node_json(): def node_tsv(): return """ id category name full_name deprecated description xref provided_by in_taxon in_taxon_label symbol synonym uri iri namespace has_phenotype has_phenotype_label has_phenotype_closure has_phenotype_closure_label has_phenotype_count inheritance causal_gene causes_disease mappings external_links provided_by_link association_counts node_hierarchy -MONDO:0020121 biolink:Disease muscular dystrophy None None Muscular dystrophy (MD) refers to a group of more than 30 genetic diseases characterized by progressive weakness and degeneration of the skeletal muscles that control movement. Some forms of MD are seen in newborns, infants or children, while others have late-onset and may not appear until middle age or later. The disorders differ in terms of the distribution and extent of muscle weakness (some forms of MD also affect cardiac muscle), age of onset, rate of progression, and pattern of inheritance. The prognosis for people with MD varies according to the type and progression of the disorder. There is no specific treatment to stop or reverse any form of MD. Treatment is supportive and may include physical therapy, respiratory therapy, speech therapy, orthopedic appliances used for support, corrective orthopedic surgery, and medicationsincluding corticosteroids, anticonvulsants (seizure medications), immunosuppressants, and antibiotics. Some individuals may need assisted ventilation to treat respiratory muscle weaknessor a pacemaker for cardiac (heart)abnormalities. ['DOID:9884', 'GARD:7922', 'ICD10CM:G71.0', 'ICD9:359.1', 'MESH:D009136', 'MedDRA:10028356', 'NCIT:C84910', 'Orphanet:98473', 'SCTID:73297009', 'UMLS:C0026850'] phenio_nodes None None None [] http://purl.obolibrary.org/obo/MONDO_0020121 None MONDO [] [] [] [] 0 None [] [] [{'id': 'DOID:9884', 'url': 'http://purl.obolibrary.org/obo/DOID_9884'}, {'id': 'ICD10CM:G71.0', 'url': 'https://icd.codes/icd10cm/G71.0'}, {'id': 'NCIT:C84910', 'url': 'http://purl.obolibrary.org/obo/NCIT_C84910'}, {'id': 'Orphanet:98473', 'url': None}, {'id': 'SCTID:73297009', 'url': 'http://identifiers.org/snomedct/73297009'}, {'id': 'UMLS:C0026850', 'url': 'http://identifiers.org/umls/C0026850'}, {'id': 'MESH:D009136', 'url': 'http://identifiers.org/mesh/D009136'}] [{'id': 'DOID:9884', 'url': 'http://purl.obolibrary.org/obo/DOID_9884'}, {'id': 'GARD:7922', 'url': None}, {'id': 'ICD10CM:G71.0', 'url': 'https://icd.codes/icd10cm/G71.0'}, {'id': 'ICD9:359.1', 'url': None}, {'id': 'MESH:D009136', 'url': 'http://identifiers.org/mesh/D009136'}, {'id': 'MedDRA:10028356', 'url': None}, {'id': 'NCIT:C84910', 'url': 'http://purl.obolibrary.org/obo/NCIT_C84910'}, {'id': 'Orphanet:98473', 'url': None}, {'id': 'SCTID:73297009', 'url': 'http://identifiers.org/snomedct/73297009'}, {'id': 'UMLS:C0026850', 'url': 'http://identifiers.org/umls/C0026850'}] {'id': 'phenio', 'url': 'https://monarch-initiative.github.io/monarch-ingest/Sources/phenio/#'} [{'label': 'Phenotypes', 'count': 3859, 'category': 'biolink:DiseaseToPhenotypicFeatureAssociation'}, {'label': 'Causal Genes', 'count': 119, 'category': 'biolink:CausalGeneToDiseaseAssociation'}, {'label': 'Correlated Genes', 'count': 139, 'category': 'biolink:CorrelatedGeneToDiseaseAssociation'}] {'super_classes': [{'id': 'MONDO:0100546', 'category': 'biolink:Disease', 'name': 'hereditary neuromuscular disease', 'full_name': None, 'deprecated': None, 'description': None, 'xref': [], 'provided_by': None, 'in_taxon': None, 'in_taxon_label': None, 'symbol': None, 'synonym': [], 'uri': None, 'iri': None, 'namespace': None, 'has_phenotype': [], 'has_phenotype_label': [], 'has_phenotype_closure': [], 'has_phenotype_closure_label': [], 'has_phenotype_count': None}, {'id': 'MONDO:0700223', 'category': 'biolink:Disease', 'name': 'hereditary skeletal muscle disorder', 'full_name': None, 'deprecated': None, 'description': None, 'xref': [], 'provided_by': None, 'in_taxon': None, 'in_taxon_label': None, 'symbol': None, 'synonym': [], 'uri': None, 'iri': None, 'namespace': None, 'has_phenotype': [], 'has_phenotype_label': [], 'has_phenotype_closure': [], 'has_phenotype_closure_label': [], 'has_phenotype_count': None}, {'id': 'MONDO:0005336', 'category': 'biolink:Disease', 'name': 'myopathy', 'full_name': None, 'deprecated': None, 'description': None, 'xref': [], 'provided_by': None, 'in_taxon': None, 'in_taxon_label': None, 'symbol': None, 'synonym': [], 'uri': None, 'iri': None, 'namespace': None, 'has_phenotype': [], 'has_phenotype_label': [], 'has_phenotype_closure': [], 'has_phenotype_closure_label': [], 'has_phenotype_count': None}], 'sub_classes': [{'id': 'MONDO:0008028', 'category': 'biolink:Disease', 'name': 'muscular dystrophy, Barnes type', 'full_name': None, 'deprecated': None, 'description': None, 'xref': [], 'provided_by': None, 'in_taxon': None, 'in_taxon_label': None, 'symbol': None, 'synonym': [], 'uri': None, 'iri': None, 'namespace': None, 'has_phenotype': [], 'has_phenotype_label': [], 'has_phenotype_closure': [], 'has_phenotype_closure_label': [], 'has_phenotype_count': None}, {'id': 'MONDO:0010311', 'category': 'biolink:Disease', 'name': 'Becker muscular dystrophy', 'full_name': None, 'deprecated': None, 'description': None, 'xref': [], 'provided_by': None, 'in_taxon': None, 'in_taxon_label': None, 'symbol': None, 'synonym': [], 'uri': None, 'iri': None, 'namespace': None, 'has_phenotype': [], 'has_phenotype_label': [], 'has_phenotype_closure': [], 'has_phenotype_closure_label': [], 'has_phenotype_count': None}, {'id': 'MONDO:0010675', 'category': 'biolink:Disease', 'name': 'muscular dystrophy, cardiac type', 'full_name': None, 'deprecated': None, 'description': None, 'xref': [], 'provided_by': None, 'in_taxon': None, 'in_taxon_label': None, 'symbol': None, 'synonym': [], 'uri': None, 'iri': None, 'namespace': None, 'has_phenotype': [], 'has_phenotype_label': [], 'has_phenotype_closure': [], 'has_phenotype_closure_label': [], 'has_phenotype_count': None}, {'id': 'MONDO:0010676', 'category': 'biolink:Disease', 'name': 'muscular dystrophy, Hemizygous lethal type', 'full_name': None, 'deprecated': None, 'description': None, 'xref': [], 'provided_by': None, 'in_taxon': None, 'in_taxon_label': None, 'symbol': None, 'synonym': [], 'uri': None, 'iri': None, 'namespace': None, 'has_phenotype': [], 'has_phenotype_label': [], 'has_phenotype_closure': [], 'has_phenotype_closure_label': [], 'has_phenotype_count': None}, {'id': 'MONDO:0010677', 'category': 'biolink:Disease', 'name': 'muscular dystrophy, Mabry type', 'full_name': None, 'deprecated': None, 'description': None, 'xref': [], 'provided_by': None, 'in_taxon': None, 'in_taxon_label': None, 'symbol': None, 'synonym': [], 'uri': None, 'iri': None, 'namespace': None, 'has_phenotype': [], 'has_phenotype_label': [], 'has_phenotype_closure': [], 'has_phenotype_closure_label': [], 'has_phenotype_count': None}, {'id': 'MONDO:0010678', 'category': 'biolink:Disease', 'name': 'muscular dystrophy, progressive Pectorodorsal', 'full_name': None, 'deprecated': None, 'description': None, 'xref': [], 'provided_by': None, 'in_taxon': None, 'in_taxon_label': None, 'symbol': None, 'synonym': [], 'uri': None, 'iri': None, 'namespace': None, 'has_phenotype': [], 'has_phenotype_label': [], 'has_phenotype_closure': [], 'has_phenotype_closure_label': [], 'has_phenotype_count': None}, {'id': 'MONDO:0010679', 'category': 'biolink:Disease', 'name': 'Duchenne muscular dystrophy', 'full_name': None, 'deprecated': None, 'description': None, 'xref': [], 'provided_by': None, 'in_taxon': None, 'in_taxon_label': None, 'symbol': None, 'synonym': [], 'uri': None, 'iri': None, 'namespace': None, 'has_phenotype': [], 'has_phenotype_label': [], 'has_phenotype_closure': [], 'has_phenotype_closure_label': [], 'has_phenotype_count': None}, {'id': 'MONDO:0016106', 'category': 'biolink:Disease', 'name': 'progressive muscular dystrophy', 'full_name': None, 'deprecated': None, 'description': None, 'xref': [], 'provided_by': None, 'in_taxon': None, 'in_taxon_label': None, 'symbol': None, 'synonym': [], 'uri': None, 'iri': None, 'namespace': None, 'has_phenotype': [], 'has_phenotype_label': [], 'has_phenotype_closure': [], 'has_phenotype_closure_label': [], 'has_phenotype_count': None}, {'id': 'MONDO:0019950', 'category': 'biolink:Disease', 'name': 'congenital muscular dystrophy', 'full_name': None, 'deprecated': None, 'description': None, 'xref': [], 'provided_by': None, 'in_taxon': None, 'in_taxon_label': None, 'symbol': None, 'synonym': [], 'uri': None, 'iri': None, 'namespace': None, 'has_phenotype': [], 'has_phenotype_label': [], 'has_phenotype_closure': [], 'has_phenotype_closure_label': [], 'has_phenotype_count': None}, {'id': 'MONDO:0018949', 'category': 'biolink:Disease', 'name': 'distal myopathy', 'full_name': None, 'deprecated': None, 'description': None, 'xref': [], 'provided_by': None, 'in_taxon': None, 'in_taxon_label': None, 'symbol': None, 'synonym': [], 'uri': None, 'iri': None, 'namespace': None, 'has_phenotype': [], 'has_phenotype_label': [], 'has_phenotype_closure': [], 'has_phenotype_closure_label': [], 'has_phenotype_count': None}, {'id': 'MONDO:0023204', 'category': 'biolink:Disease', 'name': 'Fukuda-Miyanomae-Nakata syndrome', 'full_name': None, 'deprecated': None, 'description': None, 'xref': [], 'provided_by': None, 'in_taxon': None, 'in_taxon_label': None, 'symbol': None, 'synonym': [], 'uri': None, 'iri': None, 'namespace': None, 'has_phenotype': [], 'has_phenotype_label': [], 'has_phenotype_closure': [], 'has_phenotype_closure_label': [], 'has_phenotype_count': None}, {'id': 'MONDO:0100228', 'category': 'biolink:Disease', 'name': 'LAMA2-related muscular dystrophy', 'full_name': None, 'deprecated': None, 'description': None, 'xref': [], 'provided_by': None, 'in_taxon': None, 'in_taxon_label': None, 'symbol': None, 'synonym': [], 'uri': None, 'iri': None, 'namespace': None, 'has_phenotype': [], 'has_phenotype_label': [], 'has_phenotype_closure': [], 'has_phenotype_closure_label': [], 'has_phenotype_count': None}]} +MONDO:0020121 biolink:Disease muscular dystrophy None None Muscular dystrophy (MD) refers to a group of more than 30 genetic diseases characterized by progressive weakness and degeneration of the skeletal muscles that control movement. Some forms of MD are seen in newborns, infants or children, while others have late-onset and may not appear until middle age or later. The disorders differ in terms of the distribution and extent of muscle weakness (some forms of MD also affect cardiac muscle), age of onset, rate of progression, and pattern of inheritance. The prognosis for people with MD varies according to the type and progression of the disorder. There is no specific treatment to stop or reverse any form of MD. Treatment is supportive and may include physical therapy, respiratory therapy, speech therapy, orthopedic appliances used for support, corrective orthopedic surgery, and medicationsincluding corticosteroids, anticonvulsants (seizure medications), immunosuppressants, and antibiotics. Some individuals may need assisted ventilation to treat respiratory muscle weaknessor a pacemaker for cardiac (heart)abnormalities. ['DOID:9884', 'GARD:7922', 'ICD10CM:G71.0', 'ICD9:359.1', 'MESH:D009136', 'MedDRA:10028356', 'NCIT:C84910', 'Orphanet:98473', 'SCTID:73297009', 'UMLS:C0026850'] phenio_nodes None None None [] http://purl.obolibrary.org/obo/MONDO_0020121 None MONDO [] [] [] [] 0 None [] [] [{'id': 'DOID:9884', 'url': 'http://purl.obolibrary.org/obo/DOID_9884'}, {'id': 'ICD10CM:G71.0', 'url': 'https://icd.codes/icd10cm/G71.0'}, {'id': 'NCIT:C84910', 'url': 'http://purl.obolibrary.org/obo/NCIT_C84910'}, {'id': 'Orphanet:98473', 'url': 'https://www.orpha.net/en/disease/detail/98473'}, {'id': 'SCTID:73297009', 'url': 'http://identifiers.org/snomedct/73297009'}, {'id': 'UMLS:C0026850', 'url': 'http://identifiers.org/umls/C0026850'}, {'id': 'MESH:D009136', 'url': 'http://identifiers.org/mesh/D009136'}] [{'id': 'DOID:9884', 'url': 'http://purl.obolibrary.org/obo/DOID_9884'}, {'id': 'GARD:7922', 'url': 'https://rarediseases.info.nih.gov/diseases/7922/index'}, {'id': 'ICD10CM:G71.0', 'url': 'https://icd.codes/icd10cm/G71.0'}, {'id': 'ICD9:359.1', 'url': None}, {'id': 'MESH:D009136', 'url': 'http://identifiers.org/mesh/D009136'}, {'id': 'MedDRA:10028356', 'url': None}, {'id': 'NCIT:C84910', 'url': 'http://purl.obolibrary.org/obo/NCIT_C84910'}, {'id': 'Orphanet:98473', 'url': 'https://www.orpha.net/en/disease/detail/98473'}, {'id': 'SCTID:73297009', 'url': 'http://identifiers.org/snomedct/73297009'}, {'id': 'UMLS:C0026850', 'url': 'http://identifiers.org/umls/C0026850'}] {'id': 'phenio', 'url': 'https://monarch-initiative.github.io/monarch-ingest/Sources/phenio/#'} [{'label': 'Phenotypes', 'count': 3859, 'category': 'biolink:DiseaseToPhenotypicFeatureAssociation'}, {'label': 'Causal Genes', 'count': 119, 'category': 'biolink:CausalGeneToDiseaseAssociation'}, {'label': 'Correlated Genes', 'count': 139, 'category': 'biolink:CorrelatedGeneToDiseaseAssociation'}] {'super_classes': [{'id': 'MONDO:0100546', 'category': 'biolink:Disease', 'name': 'hereditary neuromuscular disease', 'full_name': None, 'deprecated': None, 'description': None, 'xref': [], 'provided_by': None, 'in_taxon': None, 'in_taxon_label': None, 'symbol': None, 'synonym': [], 'uri': None, 'iri': None, 'namespace': None, 'has_phenotype': [], 'has_phenotype_label': [], 'has_phenotype_closure': [], 'has_phenotype_closure_label': [], 'has_phenotype_count': None}, {'id': 'MONDO:0700223', 'category': 'biolink:Disease', 'name': 'hereditary skeletal muscle disorder', 'full_name': None, 'deprecated': None, 'description': None, 'xref': [], 'provided_by': None, 'in_taxon': None, 'in_taxon_label': None, 'symbol': None, 'synonym': [], 'uri': None, 'iri': None, 'namespace': None, 'has_phenotype': [], 'has_phenotype_label': [], 'has_phenotype_closure': [], 'has_phenotype_closure_label': [], 'has_phenotype_count': None}, {'id': 'MONDO:0005336', 'category': 'biolink:Disease', 'name': 'myopathy', 'full_name': None, 'deprecated': None, 'description': None, 'xref': [], 'provided_by': None, 'in_taxon': None, 'in_taxon_label': None, 'symbol': None, 'synonym': [], 'uri': None, 'iri': None, 'namespace': None, 'has_phenotype': [], 'has_phenotype_label': [], 'has_phenotype_closure': [], 'has_phenotype_closure_label': [], 'has_phenotype_count': None}], 'sub_classes': [{'id': 'MONDO:0008028', 'category': 'biolink:Disease', 'name': 'muscular dystrophy, Barnes type', 'full_name': None, 'deprecated': None, 'description': None, 'xref': [], 'provided_by': None, 'in_taxon': None, 'in_taxon_label': None, 'symbol': None, 'synonym': [], 'uri': None, 'iri': None, 'namespace': None, 'has_phenotype': [], 'has_phenotype_label': [], 'has_phenotype_closure': [], 'has_phenotype_closure_label': [], 'has_phenotype_count': None}, {'id': 'MONDO:0010311', 'category': 'biolink:Disease', 'name': 'Becker muscular dystrophy', 'full_name': None, 'deprecated': None, 'description': None, 'xref': [], 'provided_by': None, 'in_taxon': None, 'in_taxon_label': None, 'symbol': None, 'synonym': [], 'uri': None, 'iri': None, 'namespace': None, 'has_phenotype': [], 'has_phenotype_label': [], 'has_phenotype_closure': [], 'has_phenotype_closure_label': [], 'has_phenotype_count': None}, {'id': 'MONDO:0010675', 'category': 'biolink:Disease', 'name': 'muscular dystrophy, cardiac type', 'full_name': None, 'deprecated': None, 'description': None, 'xref': [], 'provided_by': None, 'in_taxon': None, 'in_taxon_label': None, 'symbol': None, 'synonym': [], 'uri': None, 'iri': None, 'namespace': None, 'has_phenotype': [], 'has_phenotype_label': [], 'has_phenotype_closure': [], 'has_phenotype_closure_label': [], 'has_phenotype_count': None}, {'id': 'MONDO:0010676', 'category': 'biolink:Disease', 'name': 'muscular dystrophy, Hemizygous lethal type', 'full_name': None, 'deprecated': None, 'description': None, 'xref': [], 'provided_by': None, 'in_taxon': None, 'in_taxon_label': None, 'symbol': None, 'synonym': [], 'uri': None, 'iri': None, 'namespace': None, 'has_phenotype': [], 'has_phenotype_label': [], 'has_phenotype_closure': [], 'has_phenotype_closure_label': [], 'has_phenotype_count': None}, {'id': 'MONDO:0010677', 'category': 'biolink:Disease', 'name': 'muscular dystrophy, Mabry type', 'full_name': None, 'deprecated': None, 'description': None, 'xref': [], 'provided_by': None, 'in_taxon': None, 'in_taxon_label': None, 'symbol': None, 'synonym': [], 'uri': None, 'iri': None, 'namespace': None, 'has_phenotype': [], 'has_phenotype_label': [], 'has_phenotype_closure': [], 'has_phenotype_closure_label': [], 'has_phenotype_count': None}, {'id': 'MONDO:0010678', 'category': 'biolink:Disease', 'name': 'muscular dystrophy, progressive Pectorodorsal', 'full_name': None, 'deprecated': None, 'description': None, 'xref': [], 'provided_by': None, 'in_taxon': None, 'in_taxon_label': None, 'symbol': None, 'synonym': [], 'uri': None, 'iri': None, 'namespace': None, 'has_phenotype': [], 'has_phenotype_label': [], 'has_phenotype_closure': [], 'has_phenotype_closure_label': [], 'has_phenotype_count': None}, {'id': 'MONDO:0010679', 'category': 'biolink:Disease', 'name': 'Duchenne muscular dystrophy', 'full_name': None, 'deprecated': None, 'description': None, 'xref': [], 'provided_by': None, 'in_taxon': None, 'in_taxon_label': None, 'symbol': None, 'synonym': [], 'uri': None, 'iri': None, 'namespace': None, 'has_phenotype': [], 'has_phenotype_label': [], 'has_phenotype_closure': [], 'has_phenotype_closure_label': [], 'has_phenotype_count': None}, {'id': 'MONDO:0016106', 'category': 'biolink:Disease', 'name': 'progressive muscular dystrophy', 'full_name': None, 'deprecated': None, 'description': None, 'xref': [], 'provided_by': None, 'in_taxon': None, 'in_taxon_label': None, 'symbol': None, 'synonym': [], 'uri': None, 'iri': None, 'namespace': None, 'has_phenotype': [], 'has_phenotype_label': [], 'has_phenotype_closure': [], 'has_phenotype_closure_label': [], 'has_phenotype_count': None}, {'id': 'MONDO:0019950', 'category': 'biolink:Disease', 'name': 'congenital muscular dystrophy', 'full_name': None, 'deprecated': None, 'description': None, 'xref': [], 'provided_by': None, 'in_taxon': None, 'in_taxon_label': None, 'symbol': None, 'synonym': [], 'uri': None, 'iri': None, 'namespace': None, 'has_phenotype': [], 'has_phenotype_label': [], 'has_phenotype_closure': [], 'has_phenotype_closure_label': [], 'has_phenotype_count': None}, {'id': 'MONDO:0018949', 'category': 'biolink:Disease', 'name': 'distal myopathy', 'full_name': None, 'deprecated': None, 'description': None, 'xref': [], 'provided_by': None, 'in_taxon': None, 'in_taxon_label': None, 'symbol': None, 'synonym': [], 'uri': None, 'iri': None, 'namespace': None, 'has_phenotype': [], 'has_phenotype_label': [], 'has_phenotype_closure': [], 'has_phenotype_closure_label': [], 'has_phenotype_count': None}, {'id': 'MONDO:0023204', 'category': 'biolink:Disease', 'name': 'Fukuda-Miyanomae-Nakata syndrome', 'full_name': None, 'deprecated': None, 'description': None, 'xref': [], 'provided_by': None, 'in_taxon': None, 'in_taxon_label': None, 'symbol': None, 'synonym': [], 'uri': None, 'iri': None, 'namespace': None, 'has_phenotype': [], 'has_phenotype_label': [], 'has_phenotype_closure': [], 'has_phenotype_closure_label': [], 'has_phenotype_count': None}, {'id': 'MONDO:0100228', 'category': 'biolink:Disease', 'name': 'LAMA2-related muscular dystrophy', 'full_name': None, 'deprecated': None, 'description': None, 'xref': [], 'provided_by': None, 'in_taxon': None, 'in_taxon_label': None, 'symbol': None, 'synonym': [], 'uri': None, 'iri': None, 'namespace': None, 'has_phenotype': [], 'has_phenotype_label': [], 'has_phenotype_closure': [], 'has_phenotype_closure_label': [], 'has_phenotype_count': None}]} """ @@ -514,7 +514,7 @@ def node_yaml(): - id: DOID:9884 url: http://purl.obolibrary.org/obo/DOID_9884 - id: GARD:7922 - url: null + url: https://rarediseases.info.nih.gov/diseases/7922/index - id: ICD10CM:G71.0 url: https://icd.codes/icd10cm/G71.0 - id: ICD9:359.1 @@ -526,7 +526,7 @@ def node_yaml(): - id: NCIT:C84910 url: http://purl.obolibrary.org/obo/NCIT_C84910 - id: Orphanet:98473 - url: null + url: https://www.orpha.net/en/disease/detail/98473 - id: SCTID:73297009 url: http://identifiers.org/snomedct/73297009 - id: UMLS:C0026850 @@ -550,7 +550,7 @@ def node_yaml(): - id: NCIT:C84910 url: http://purl.obolibrary.org/obo/NCIT_C84910 - id: Orphanet:98473 - url: null + url: https://www.orpha.net/en/disease/detail/98473 - id: SCTID:73297009 url: http://identifiers.org/snomedct/73297009 - id: UMLS:C0026850 diff --git a/backend/tests/fixtures/search.py b/backend/tests/fixtures/search.py index 033a8c881..143a69cbf 100644 --- a/backend/tests/fixtures/search.py +++ b/backend/tests/fixtures/search.py @@ -6,7 +6,7 @@ def search(): return { "limit": 20, "offset": 0, - "total": 101, + "total": 117, "items": [ { "id": "MONDO:0019391", diff --git a/backend/tests/fixtures/search_query.py b/backend/tests/fixtures/search_query.py index b389c3774..9571e1a24 100644 --- a/backend/tests/fixtures/search_query.py +++ b/backend/tests/fixtures/search_query.py @@ -12,7 +12,7 @@ def search_query(): "facet_fields": [], "facet_queries": [], "filter_queries": ["name:*"], - "query_fields": "id^100 name^10 name_t^5 name_ac symbol^10 symbol_t^5 symbol_ac synonym synonym_t synonym_ac", + "query_fields": "id^100 name^10 name_t^5 name_ac symbol^10 symbol_t^5 symbol_ac synonym synonym_t synonym_ac description_t", "def_type": "edismax", "q_op": "AND", "mm": "100%", diff --git a/backend/tests/fixtures/search_response.py b/backend/tests/fixtures/search_response.py index 08aa81c6b..c89d34a65 100644 --- a/backend/tests/fixtures/search_response.py +++ b/backend/tests/fixtures/search_response.py @@ -5,13 +5,13 @@ def search_response(): return { "responseHeader": { - "QTime": 0, + "QTime": 3, "params": { "mm": "100%", "q": "fanconi", "defType": "edismax", "facet_min_count": "1", - "qf": "id^100 name^10 name_t^5 name_ac symbol^10 symbol_t^5 symbol_ac synonym synonym_t synonym_ac", + "qf": "id^100 name^10 name_t^5 name_ac symbol^10 symbol_t^5 symbol_ac synonym synonym_t synonym_ac description_t", "start": "0", "q.op": "AND", "boost": 'product(if(termfreq(category,"biolink:PhenotypicFeature"),1.1,1),if(termfreq(category,"biolink:Disease"),1.3,1),if(and(termfreq(in_taxon,"NCBITaxon:9606"),termfreq(category,"biolink:Gene")),1.1,1),if(termfreq(deprecated,"true"),0.1,1))', @@ -21,7 +21,7 @@ def search_response(): }, }, "response": { - "num_found": 101, + "num_found": 117, "start": 0, "docs": [ { diff --git a/frontend/fixtures/node.json b/frontend/fixtures/node.json index b1cb0aaad..c08f46433 100644 --- a/frontend/fixtures/node.json +++ b/frontend/fixtures/node.json @@ -48,7 +48,7 @@ }, { "id": "Orphanet:98473", - "url": null + "url": "https://www.orpha.net/en/disease/detail/98473" }, { "id": "SCTID:73297009", @@ -70,7 +70,7 @@ }, { "id": "GARD:7922", - "url": null + "url": "https://rarediseases.info.nih.gov/diseases/7922/index" }, { "id": "ICD10CM:G71.0", @@ -94,7 +94,7 @@ }, { "id": "Orphanet:98473", - "url": null + "url": "https://www.orpha.net/en/disease/detail/98473" }, { "id": "SCTID:73297009", diff --git a/frontend/fixtures/phenotype-explorer-multi-compare.json b/frontend/fixtures/phenotype-explorer-multi-compare.json index 0c5dbb527..6b0ea6fbe 100644 --- a/frontend/fixtures/phenotype-explorer-multi-compare.json +++ b/frontend/fixtures/phenotype-explorer-multi-compare.json @@ -22,28 +22,28 @@ "has_phenotype_closure_label": [], "has_phenotype_count": null }, - "score": 0.5499139182472516, + "score": 0.5499139182472517, "similarity": { "subject_termset": { + "HP:0004944": { + "id": "HP:0004944", + "label": "Dilatation of the cerebral artery (HPO)" + }, "HP:0002616": { "id": "HP:0002616", "label": "Aortic root aneurysm (HPO)" }, + "HP:0001533": { "id": "HP:0001533", "label": "Slender build (HPO)" }, "HP:0002020": { "id": "HP:0002020", "label": "Gastroesophageal reflux (HPO)" }, + "HP:0010749": { "id": "HP:0010749", "label": "Blepharochalasis (HPO)" }, "HP:0012450": { "id": "HP:0012450", "label": "Chronic constipation (HPO)" }, - "HP:0001533": { "id": "HP:0001533", "label": "Slender build (HPO)" }, - "HP:0001763": { "id": "HP:0001763", "label": "Pes planus (HPO)" }, - "HP:0004944": { - "id": "HP:0004944", - "label": "Dilatation of the cerebral artery (HPO)" - }, - "HP:0010749": { "id": "HP:0010749", "label": "Blepharochalasis (HPO)" } + "HP:0001763": { "id": "HP:0001763", "label": "Pes planus (HPO)" } }, "object_termset": { "HP:0000268": { "id": "HP:0000268", "label": "Dolichocephaly (HPO)" }, @@ -51,16 +51,16 @@ "id": "HP:0002616", "label": "Aortic root aneurysm (HPO)" }, - "HP:0000767": { "id": "HP:0000767", "label": "Pectus excavatum (HPO)" }, - "HP:0000545": { "id": "HP:0000545", "label": "Myopia (HPO)" }, + "HP:0100785": { "id": "HP:0100785", "label": "Insomnia (HPO)" }, "HP:0000023": { "id": "HP:0000023", "label": "Inguinal hernia (HPO)" }, - "HP:0001763": { "id": "HP:0001763", "label": "Pes planus (HPO)" }, "HP:0000490": { "id": "HP:0000490", "label": "Deeply set eye (HPO)" }, - "HP:0100785": { "id": "HP:0100785", "label": "Insomnia (HPO)" }, + "HP:0001763": { "id": "HP:0001763", "label": "Pes planus (HPO)" }, "HP:0002108": { "id": "HP:0002108", "label": "Spontaneous pneumothorax (HPO)" - } + }, + "HP:0000545": { "id": "HP:0000545", "label": "Myopia (HPO)" }, + "HP:0000767": { "id": "HP:0000767", "label": "Pectus excavatum (HPO)" } }, "subject_best_matches": { "HP:0001533": { @@ -206,16 +206,16 @@ "HP:0010749": { "match_source": "HP:0010749", "match_source_label": "Blepharochalasis (HPO)", - "match_target": "HP:0000545", - "match_target_label": "Myopia (HPO)", - "score": 0.3389830508474576, + "match_target": "HP:0000490", + "match_target_label": "Deeply set eye (HPO)", + "score": 0.4, "match_subsumer": null, "match_subsumer_label": null, "similarity": { "subject_id": "HP:0010749", "subject_label": null, "subject_source": null, - "object_id": "HP:0000545", + "object_id": "HP:0000490", "object_label": null, "object_source": null, "ancestor_id": "HP:0000315", @@ -224,10 +224,10 @@ "object_information_content": null, "subject_information_content": null, "ancestor_information_content": 7.709281511796768, - "jaccard_similarity": 0.3389830508474576, + "jaccard_similarity": 0.4, "cosine_similarity": null, "dice_similarity": null, - "phenodigm_score": 1.6165753204570361 + "phenodigm_score": 1.7560502853616429 }, "score_metric": "jaccard_similarity" }, @@ -432,16 +432,16 @@ "HP:0002108": { "match_source": "HP:0002108", "match_source_label": "Spontaneous pneumothorax (HPO)", - "match_target": "HP:0004944", - "match_target_label": "Dilatation of the cerebral artery (HPO)", - "score": 0.2807017543859649, + "match_target": "HP:0001763", + "match_target_label": "Pes planus (HPO)", + "score": 0.32653061224489793, "match_subsumer": null, "match_subsumer_label": null, "similarity": { "subject_id": "HP:0002108", "subject_label": null, "subject_source": null, - "object_id": "HP:0004944", + "object_id": "HP:0001763", "object_label": null, "object_source": null, "ancestor_id": "HP:0000118", @@ -450,10 +450,10 @@ "object_information_content": null, "subject_information_content": null, "ancestor_information_content": 4.118848568918744, - "jaccard_similarity": 0.2807017543859649, + "jaccard_similarity": 0.32653061224489793, "cosine_similarity": null, "dice_similarity": null, - "phenodigm_score": 1.0752525374746216 + "phenodigm_score": 1.1597112334340214 }, "score_metric": "jaccard_similarity" }, @@ -514,7 +514,7 @@ "score_metric": "jaccard_similarity" } }, - "average_score": 0.5499139182472516, + "average_score": 0.5499139182472517, "best_score": 1.0, "metric": "JaccardSimilarity" } @@ -542,9 +542,12 @@ "has_phenotype_closure_label": [], "has_phenotype_count": null }, - "score": 0.83497558824921, + "score": 0.8349755882492099, "similarity": { "subject_termset": { + "HP:0010749": { "id": "HP:0010749", "label": "Blepharochalasis (HPO)" }, + "HP:0001763": { "id": "HP:0001763", "label": "Pes planus (HPO)" }, + "HP:0001533": { "id": "HP:0001533", "label": "Slender build (HPO)" }, "HP:0012450": { "id": "HP:0012450", "label": "Chronic constipation (HPO)" @@ -557,16 +560,30 @@ "id": "HP:0002616", "label": "Aortic root aneurysm (HPO)" }, - "HP:0001533": { "id": "HP:0001533", "label": "Slender build (HPO)" }, - "HP:0010749": { "id": "HP:0010749", "label": "Blepharochalasis (HPO)" }, - "HP:0001763": { "id": "HP:0001763", "label": "Pes planus (HPO)" }, "HP:0004944": { "id": "HP:0004944", "label": "Dilatation of the cerebral artery (HPO)" } }, "object_termset": { - "HP:0003394": { "id": "HP:0003394", "label": "Muscle spasm (HPO)" }, + "HP:0002829": { "id": "HP:0002829", "label": "Arthralgia (HPO)" }, + "HP:0010749": { "id": "HP:0010749", "label": "Blepharochalasis (HPO)" }, + "HP:0001763": { "id": "HP:0001763", "label": "Pes planus (HPO)" }, + "HP:0001533": { "id": "HP:0001533", "label": "Slender build (HPO)" }, + "HP:0012378": { "id": "HP:0012378", "label": "Fatigue (HPO)" }, + "HP:0002999": { + "id": "HP:0002999", + "label": "Patellar dislocation (HPO)" + }, + "HP:0001278": { + "id": "HP:0001278", + "label": "Orthostatic hypotension (HPO)" + }, + "HP:0003771": { + "id": "HP:0003771", + "label": "Pulp calcification (HPO)" + }, + "HP:0002827": { "id": "HP:0002827", "label": "Hip dislocation (HPO)" }, "HP:0012450": { "id": "HP:0012450", "label": "Chronic constipation (HPO)" @@ -575,36 +592,19 @@ "id": "HP:0002020", "label": "Gastroesophageal reflux (HPO)" }, - "HP:0002829": { "id": "HP:0002829", "label": "Arthralgia (HPO)" }, - "HP:0002999": { - "id": "HP:0002999", - "label": "Patellar dislocation (HPO)" - }, - "HP:0002827": { "id": "HP:0002827", "label": "Hip dislocation (HPO)" }, "HP:0002616": { "id": "HP:0002616", "label": "Aortic root aneurysm (HPO)" }, - "HP:0001533": { "id": "HP:0001533", "label": "Slender build (HPO)" }, - "HP:0003771": { - "id": "HP:0003771", - "label": "Pulp calcification (HPO)" - }, - "HP:0010749": { "id": "HP:0010749", "label": "Blepharochalasis (HPO)" }, - "HP:0001763": { "id": "HP:0001763", "label": "Pes planus (HPO)" }, "HP:0003010": { "id": "HP:0003010", "label": "Prolonged bleeding time (HPO)" }, - "HP:0012378": { "id": "HP:0012378", "label": "Fatigue (HPO)" }, "HP:0004944": { "id": "HP:0004944", "label": "Dilatation of the cerebral artery (HPO)" }, - "HP:0001278": { - "id": "HP:0001278", - "label": "Orthostatic hypotension (HPO)" - } + "HP:0003394": { "id": "HP:0003394", "label": "Muscle spasm (HPO)" } }, "subject_best_matches": { "HP:0001533": { @@ -976,16 +976,16 @@ "HP:0002829": { "match_source": "HP:0002829", "match_source_label": "Arthralgia (HPO)", - "match_target": "HP:0001763", - "match_target_label": "Pes planus (HPO)", - "score": 0.23809523809523808, + "match_target": "HP:0002616", + "match_target_label": "Aortic root aneurysm (HPO)", + "score": 0.2631578947368421, "match_subsumer": null, "match_subsumer_label": null, "similarity": { "subject_id": "HP:0002829", "subject_label": null, "subject_source": null, - "object_id": "HP:0001763", + "object_id": "HP:0002616", "object_label": null, "object_source": null, "ancestor_id": "HP:0000118", @@ -994,10 +994,10 @@ "object_information_content": null, "subject_information_content": null, "ancestor_information_content": 4.118848568918744, - "jaccard_similarity": 0.23809523809523808, + "jaccard_similarity": 0.2631578947368421, "cosine_similarity": null, "dice_similarity": null, - "phenodigm_score": 0.990291992644058 + "phenodigm_score": 1.0411087926516187 }, "score_metric": "jaccard_similarity" }, @@ -1032,16 +1032,16 @@ "HP:0003010": { "match_source": "HP:0003010", "match_source_label": "Prolonged bleeding time (HPO)", - "match_target": "HP:0004944", - "match_target_label": "Dilatation of the cerebral artery (HPO)", - "score": 0.21568627450980393, + "match_target": "HP:0001533", + "match_target_label": "Slender build (HPO)", + "score": 0.25, "match_subsumer": null, "match_subsumer_label": null, "similarity": { "subject_id": "HP:0003010", "subject_label": null, "subject_source": null, - "object_id": "HP:0004944", + "object_id": "HP:0001533", "object_label": null, "object_source": null, "ancestor_id": "HP:0000118", @@ -1050,10 +1050,10 @@ "object_information_content": null, "subject_information_content": null, "ancestor_information_content": 4.118848568918744, - "jaccard_similarity": 0.21568627450980393, + "jaccard_similarity": 0.25, "cosine_similarity": null, "dice_similarity": null, - "phenodigm_score": 0.9425386480670812 + "phenodigm_score": 1.0147473292547686 }, "score_metric": "jaccard_similarity" }, @@ -1172,16 +1172,16 @@ "HP:0012378": { "match_source": "HP:0012378", "match_source_label": "Fatigue (HPO)", - "match_target": "HP:0001533", - "match_target_label": "Slender build (HPO)", - "score": 0.23809523809523808, + "match_target": "HP:0010749", + "match_target_label": "Blepharochalasis (HPO)", + "score": 0.18867924528301888, "match_subsumer": null, "match_subsumer_label": null, "similarity": { "subject_id": "HP:0012378", "subject_label": null, "subject_source": null, - "object_id": "HP:0001533", + "object_id": "HP:0010749", "object_label": null, "object_source": null, "ancestor_id": "HP:0000118", @@ -1190,10 +1190,10 @@ "object_information_content": null, "subject_information_content": null, "ancestor_information_content": 4.118848568918744, - "jaccard_similarity": 0.23809523809523808, + "jaccard_similarity": 0.18867924528301888, "cosine_similarity": null, "dice_similarity": null, - "phenodigm_score": 0.990291992644058 + "phenodigm_score": 0.8815561464924574 }, "score_metric": "jaccard_similarity" }, @@ -1226,7 +1226,7 @@ "score_metric": "jaccard_similarity" } }, - "average_score": 0.83497558824921, + "average_score": 0.8349755882492099, "best_score": 1.0, "metric": "JaccardSimilarity" } @@ -1257,83 +1257,83 @@ "score": 0.5309539844387191, "similarity": { "subject_termset": { + "HP:0012450": { + "id": "HP:0012450", + "label": "Chronic constipation (HPO)" + }, "HP:0001763": { "id": "HP:0001763", "label": "Pes planus (HPO)" }, "HP:0002616": { "id": "HP:0002616", "label": "Aortic root aneurysm (HPO)" }, + "HP:0001533": { "id": "HP:0001533", "label": "Slender build (HPO)" }, + "HP:0010749": { "id": "HP:0010749", "label": "Blepharochalasis (HPO)" }, "HP:0004944": { "id": "HP:0004944", "label": "Dilatation of the cerebral artery (HPO)" }, - "HP:0010749": { "id": "HP:0010749", "label": "Blepharochalasis (HPO)" }, - "HP:0012450": { - "id": "HP:0012450", - "label": "Chronic constipation (HPO)" - }, "HP:0002020": { "id": "HP:0002020", "label": "Gastroesophageal reflux (HPO)" - }, - "HP:0001533": { "id": "HP:0001533", "label": "Slender build (HPO)" } + } }, "object_termset": { - "HP:0001763": { "id": "HP:0001763", "label": "Pes planus (HPO)" }, - "HP:0002616": { - "id": "HP:0002616", - "label": "Aortic root aneurysm (HPO)" - }, - "HP:0012432": { "id": "HP:0012432", "label": "Chronic fatigue (HPO)" }, - "HP:0000023": { "id": "HP:0000023", "label": "Inguinal hernia (HPO)" }, - "HP:0000268": { "id": "HP:0000268", "label": "Dolichocephaly (HPO)" }, "HP:0100785": { "id": "HP:0100785", "label": "Insomnia (HPO)" }, - "HP:0000545": { "id": "HP:0000545", "label": "Myopia (HPO)" }, - "HP:0005059": { - "id": "HP:0005059", - "label": "Arthralgia/arthritis (HPO)" - }, - "HP:0001659": { - "id": "HP:0001659", - "label": "Aortic regurgitation (HPO)" - }, - "HP:0001704": { - "id": "HP:0001704", - "label": "Tricuspid valve prolapse (HPO)" + "HP:0002705": { + "id": "HP:0002705", + "label": "High, narrow palate (HPO)" }, "HP:0001634": { "id": "HP:0001634", "label": "Mitral valve prolapse (HPO)" }, - "HP:0007800": { - "id": "HP:0007800", - "label": "Increased axial length of the globe (HPO)" + "HP:0001659": { + "id": "HP:0001659", + "label": "Aortic regurgitation (HPO)" + }, + "HP:0001763": { "id": "HP:0001763", "label": "Pes planus (HPO)" }, + "HP:0004970": { + "id": "HP:0004970", + "label": "Ascending tubular aorta aneurysm (HPO)" }, "HP:0002360": { "id": "HP:0002360", "label": "Sleep disturbance (HPO)" }, - "HP:0004970": { - "id": "HP:0004970", - "label": "Ascending tubular aorta aneurysm (HPO)" + "HP:0001653": { + "id": "HP:0001653", + "label": "Mitral regurgitation (HPO)" }, - "HP:0000490": { "id": "HP:0000490", "label": "Deeply set eye (HPO)" }, - "HP:0002705": { - "id": "HP:0002705", - "label": "High, narrow palate (HPO)" + "HP:0007800": { + "id": "HP:0007800", + "label": "Increased axial length of the globe (HPO)" }, - "HP:0000767": { "id": "HP:0000767", "label": "Pectus excavatum (HPO)" }, + "HP:0002616": { + "id": "HP:0002616", + "label": "Aortic root aneurysm (HPO)" + }, + "HP:0000268": { "id": "HP:0000268", "label": "Dolichocephaly (HPO)" }, "HP:0003179": { "id": "HP:0003179", "label": "Protrusio acetabuli (HPO)" }, - "HP:0001653": { - "id": "HP:0001653", - "label": "Mitral regurgitation (HPO)" + "HP:0000545": { "id": "HP:0000545", "label": "Myopia (HPO)" }, + "HP:0000767": { "id": "HP:0000767", "label": "Pectus excavatum (HPO)" }, + "HP:0012432": { "id": "HP:0012432", "label": "Chronic fatigue (HPO)" }, + "HP:0005059": { + "id": "HP:0005059", + "label": "Arthralgia/arthritis (HPO)" + }, + "HP:0001704": { + "id": "HP:0001704", + "label": "Tricuspid valve prolapse (HPO)" }, + "HP:0000490": { "id": "HP:0000490", "label": "Deeply set eye (HPO)" }, "HP:0002108": { "id": "HP:0002108", "label": "Spontaneous pneumothorax (HPO)" - } + }, + "HP:0000023": { "id": "HP:0000023", "label": "Inguinal hernia (HPO)" } }, "subject_best_matches": { "HP:0001533": { @@ -1479,16 +1479,16 @@ "HP:0010749": { "match_source": "HP:0010749", "match_source_label": "Blepharochalasis (HPO)", - "match_target": "HP:0000545", - "match_target_label": "Myopia (HPO)", - "score": 0.3389830508474576, + "match_target": "HP:0007800", + "match_target_label": "Increased axial length of the globe (HPO)", + "score": 0.38095238095238093, "match_subsumer": null, "match_subsumer_label": null, "similarity": { "subject_id": "HP:0010749", "subject_label": null, "subject_source": null, - "object_id": "HP:0000545", + "object_id": "HP:0007800", "object_label": null, "object_source": null, "ancestor_id": "HP:0000315", @@ -1497,26 +1497,26 @@ "object_information_content": null, "subject_information_content": null, "ancestor_information_content": 7.709281511796768, - "jaccard_similarity": 0.3389830508474576, + "jaccard_similarity": 0.38095238095238093, "cosine_similarity": null, "dice_similarity": null, - "phenodigm_score": 1.6165753204570361 + "phenodigm_score": 1.7137296015857197 }, "score_metric": "jaccard_similarity" }, "HP:0012450": { "match_source": "HP:0012450", "match_source_label": "Chronic constipation (HPO)", - "match_target": "HP:0002705", - "match_target_label": "High, narrow palate (HPO)", - "score": 0.26229508196721313, + "match_target": "HP:0000023", + "match_target_label": "Inguinal hernia (HPO)", + "score": 0.4, "match_subsumer": null, "match_subsumer_label": null, "similarity": { "subject_id": "HP:0012450", "subject_label": null, "subject_source": null, - "object_id": "HP:0002705", + "object_id": "HP:0000023", "object_label": null, "object_source": null, "ancestor_id": "HP:0025031", @@ -1525,10 +1525,10 @@ "object_information_content": null, "subject_information_content": null, "ancestor_information_content": 7.826350815132431, - "jaccard_similarity": 0.26229508196721313, + "jaccard_similarity": 0.4, "cosine_similarity": null, "dice_similarity": null, - "phenodigm_score": 1.432764226437597 + "phenodigm_score": 1.769333299876813 }, "score_metric": "jaccard_similarity" } @@ -1537,16 +1537,16 @@ "HP:0000023": { "match_source": "HP:0000023", "match_source_label": "Inguinal hernia (HPO)", - "match_target": "HP:0002020", - "match_target_label": "Gastroesophageal reflux (HPO)", - "score": 0.36363636363636365, + "match_target": "HP:0012450", + "match_target_label": "Chronic constipation (HPO)", + "score": 0.4, "match_subsumer": null, "match_subsumer_label": null, "similarity": { "subject_id": "HP:0000023", "subject_label": null, "subject_source": null, - "object_id": "HP:0002020", + "object_id": "HP:0012450", "object_label": null, "object_source": null, "ancestor_id": "HP:0025031", @@ -1555,10 +1555,10 @@ "object_information_content": null, "subject_information_content": null, "ancestor_information_content": 7.826350815132431, - "jaccard_similarity": 0.36363636363636365, + "jaccard_similarity": 0.4, "cosine_similarity": null, "dice_similarity": null, - "phenodigm_score": 1.686993109338994 + "phenodigm_score": 1.769333299876813 }, "score_metric": "jaccard_similarity" }, @@ -1761,16 +1761,16 @@ "HP:0001704": { "match_source": "HP:0001704", "match_source_label": "Tricuspid valve prolapse (HPO)", - "match_target": "HP:0004944", - "match_target_label": "Dilatation of the cerebral artery (HPO)", - "score": 0.3333333333333333, + "match_target": "HP:0002616", + "match_target_label": "Aortic root aneurysm (HPO)", + "score": 0.4166666666666667, "match_subsumer": null, "match_subsumer_label": null, "similarity": { "subject_id": "HP:0001704", "subject_label": null, "subject_source": null, - "object_id": "HP:0004944", + "object_id": "HP:0002616", "object_label": null, "object_source": null, "ancestor_id": "HP:0030680", @@ -1779,10 +1779,10 @@ "object_information_content": null, "subject_information_content": null, "ancestor_information_content": 8.449787463668223, - "jaccard_similarity": 0.3333333333333333, + "jaccard_similarity": 0.4166666666666667, "cosine_similarity": null, "dice_similarity": null, - "phenodigm_score": 1.6782716768219443 + "phenodigm_score": 1.8763647770432128 }, "score_metric": "jaccard_similarity" }, @@ -1817,16 +1817,16 @@ "HP:0002108": { "match_source": "HP:0002108", "match_source_label": "Spontaneous pneumothorax (HPO)", - "match_target": "HP:0002020", - "match_target_label": "Gastroesophageal reflux (HPO)", - "score": 0.2926829268292683, + "match_target": "HP:0010749", + "match_target_label": "Blepharochalasis (HPO)", + "score": 0.26229508196721313, "match_subsumer": null, "match_subsumer_label": null, "similarity": { "subject_id": "HP:0002108", "subject_label": null, "subject_source": null, - "object_id": "HP:0002020", + "object_id": "HP:0010749", "object_label": null, "object_source": null, "ancestor_id": "HP:0000118", @@ -1835,10 +1835,10 @@ "object_information_content": null, "subject_information_content": null, "ancestor_information_content": 4.118848568918744, - "jaccard_similarity": 0.2926829268292683, + "jaccard_similarity": 0.26229508196721313, "cosine_similarity": null, "dice_similarity": null, - "phenodigm_score": 1.09796022437868 + "phenodigm_score": 1.0394006556641575 }, "score_metric": "jaccard_similarity" }, @@ -2041,16 +2041,16 @@ "HP:0012432": { "match_source": "HP:0012432", "match_source_label": "Chronic fatigue (HPO)", - "match_target": "HP:0002020", - "match_target_label": "Gastroesophageal reflux (HPO)", - "score": 0.3333333333333333, + "match_target": "HP:0012450", + "match_target_label": "Chronic constipation (HPO)", + "score": 0.38461538461538464, "match_subsumer": null, "match_subsumer_label": null, "similarity": { "subject_id": "HP:0012432", "subject_label": null, "subject_source": null, - "object_id": "HP:0002020", + "object_id": "HP:0012450", "object_label": null, "object_source": null, "ancestor_id": "HP:0000118", @@ -2059,10 +2059,10 @@ "object_information_content": null, "subject_information_content": null, "ancestor_information_content": 4.118848568918744, - "jaccard_similarity": 0.3333333333333333, + "jaccard_similarity": 0.38461538461538464, "cosine_similarity": null, "dice_similarity": null, - "phenodigm_score": 1.171729287409389 + "phenodigm_score": 1.2586391565922337 }, "score_metric": "jaccard_similarity" }, diff --git a/frontend/fixtures/phenotype-explorer-search.json b/frontend/fixtures/phenotype-explorer-search.json index 741fe95b5..24f49e09f 100644 --- a/frontend/fixtures/phenotype-explorer-search.json +++ b/frontend/fixtures/phenotype-explorer-search.json @@ -73,8 +73,8 @@ } }, "object_termset": { - "HP:0002104": { "id": "HP:0002104", "label": "Apnea (HPO)" }, - "HP:0012378": { "id": "HP:0012378", "label": "Fatigue (HPO)" } + "HP:0012378": { "id": "HP:0012378", "label": "Fatigue (HPO)" }, + "HP:0002104": { "id": "HP:0002104", "label": "Apnea (HPO)" } }, "subject_best_matches": { "ZP:0018569": { @@ -240,18 +240,18 @@ "score": 7.234842285670967, "similarity": { "subject_termset": { - "ZP:0018569": { - "id": "ZP:0018569", - "label": "myeloid cell development absent, abnormal (ZPO)" - }, "ZP:0018568": { "id": "ZP:0018568", "label": "primitive hemopoiesis absent, abnormal (ZPO)" + }, + "ZP:0018569": { + "id": "ZP:0018569", + "label": "myeloid cell development absent, abnormal (ZPO)" } }, "object_termset": { - "HP:0012378": { "id": "HP:0012378", "label": "Fatigue (HPO)" }, - "HP:0002104": { "id": "HP:0002104", "label": "Apnea (HPO)" } + "HP:0002104": { "id": "HP:0002104", "label": "Apnea (HPO)" }, + "HP:0012378": { "id": "HP:0012378", "label": "Fatigue (HPO)" } }, "subject_best_matches": { "ZP:0018568": { @@ -315,8 +315,8 @@ "HP:0002104": { "match_source": "HP:0002104", "match_source_label": "Apnea (HPO)", - "match_target": "ZP:0018569", - "match_target_label": "myeloid cell development absent, abnormal (ZPO)", + "match_target": "ZP:0018568", + "match_target_label": "primitive hemopoiesis absent, abnormal (ZPO)", "score": 9.08524944639702, "match_subsumer": null, "match_subsumer_label": null, @@ -324,7 +324,7 @@ "subject_id": "HP:0002104", "subject_label": null, "subject_source": null, - "object_id": "ZP:0018569", + "object_id": "ZP:0018568", "object_label": null, "object_source": null, "ancestor_id": "UPHENO:0034024", @@ -333,10 +333,10 @@ "object_information_content": null, "subject_information_content": null, "ancestor_information_content": 9.08524944639702, - "jaccard_similarity": 0.34615384615384615, + "jaccard_similarity": 0.3333333333333333, "cosine_similarity": null, "dice_similarity": null, - "phenodigm_score": 1.773384910034319 + "phenodigm_score": 1.7402346054863809 }, "score_metric": "ancestor_information_content" }, @@ -453,8 +453,8 @@ } }, "object_termset": { - "HP:0012378": { "id": "HP:0012378", "label": "Fatigue (HPO)" }, - "HP:0002104": { "id": "HP:0002104", "label": "Apnea (HPO)" } + "HP:0002104": { "id": "HP:0002104", "label": "Apnea (HPO)" }, + "HP:0012378": { "id": "HP:0012378", "label": "Fatigue (HPO)" } }, "subject_best_matches": { "ZP:0018568": { @@ -518,8 +518,8 @@ "HP:0002104": { "match_source": "HP:0002104", "match_source_label": "Apnea (HPO)", - "match_target": "ZP:0018569", - "match_target_label": "myeloid cell development absent, abnormal (ZPO)", + "match_target": "ZP:0018568", + "match_target_label": "primitive hemopoiesis absent, abnormal (ZPO)", "score": 9.08524944639702, "match_subsumer": null, "match_subsumer_label": null, @@ -527,7 +527,7 @@ "subject_id": "HP:0002104", "subject_label": null, "subject_source": null, - "object_id": "ZP:0018569", + "object_id": "ZP:0018568", "object_label": null, "object_source": null, "ancestor_id": "UPHENO:0034024", @@ -536,10 +536,10 @@ "object_information_content": null, "subject_information_content": null, "ancestor_information_content": 9.08524944639702, - "jaccard_similarity": 0.34615384615384615, + "jaccard_similarity": 0.3333333333333333, "cosine_similarity": null, "dice_similarity": null, - "phenodigm_score": 1.773384910034319 + "phenodigm_score": 1.7402346054863809 }, "score_metric": "ancestor_information_content" }, @@ -653,13 +653,13 @@ "score": 7.234842285670967, "similarity": { "subject_termset": { - "ZP:0018569": { - "id": "ZP:0018569", - "label": "myeloid cell development absent, abnormal (ZPO)" - }, "ZP:0018568": { "id": "ZP:0018568", "label": "primitive hemopoiesis absent, abnormal (ZPO)" + }, + "ZP:0018569": { + "id": "ZP:0018569", + "label": "myeloid cell development absent, abnormal (ZPO)" } }, "object_termset": { @@ -756,8 +756,8 @@ "HP:0012378": { "match_source": "HP:0012378", "match_source_label": "Fatigue (HPO)", - "match_target": "ZP:0018569", - "match_target_label": "myeloid cell development absent, abnormal (ZPO)", + "match_target": "ZP:0018568", + "match_target_label": "primitive hemopoiesis absent, abnormal (ZPO)", "score": 1.6836208034928104, "match_subsumer": null, "match_subsumer_label": null, @@ -765,7 +765,7 @@ "subject_id": "HP:0012378", "subject_label": null, "subject_source": null, - "object_id": "ZP:0018569", + "object_id": "ZP:0018568", "object_label": null, "object_source": null, "ancestor_id": "UPHENO:0001005", @@ -774,10 +774,10 @@ "object_information_content": null, "subject_information_content": null, "ancestor_information_content": 1.6836208034928104, - "jaccard_similarity": 0.47058823529411764, + "jaccard_similarity": 0.4444444444444444, "cosine_similarity": null, "dice_similarity": null, - "phenodigm_score": 0.8901079388591847 + "phenodigm_score": 0.8650294287846346 }, "score_metric": "ancestor_information_content" } @@ -863,13 +863,13 @@ "score": 7.234842285670967, "similarity": { "subject_termset": { - "ZP:0018569": { - "id": "ZP:0018569", - "label": "myeloid cell development absent, abnormal (ZPO)" - }, "ZP:0018568": { "id": "ZP:0018568", "label": "primitive hemopoiesis absent, abnormal (ZPO)" + }, + "ZP:0018569": { + "id": "ZP:0018569", + "label": "myeloid cell development absent, abnormal (ZPO)" } }, "object_termset": { @@ -938,8 +938,8 @@ "HP:0002104": { "match_source": "HP:0002104", "match_source_label": "Apnea (HPO)", - "match_target": "ZP:0018568", - "match_target_label": "primitive hemopoiesis absent, abnormal (ZPO)", + "match_target": "ZP:0018569", + "match_target_label": "myeloid cell development absent, abnormal (ZPO)", "score": 9.08524944639702, "match_subsumer": null, "match_subsumer_label": null, @@ -947,7 +947,7 @@ "subject_id": "HP:0002104", "subject_label": null, "subject_source": null, - "object_id": "ZP:0018568", + "object_id": "ZP:0018569", "object_label": null, "object_source": null, "ancestor_id": "UPHENO:0034024", @@ -956,10 +956,10 @@ "object_information_content": null, "subject_information_content": null, "ancestor_information_content": 9.08524944639702, - "jaccard_similarity": 0.3333333333333333, + "jaccard_similarity": 0.34615384615384615, "cosine_similarity": null, "dice_similarity": null, - "phenodigm_score": 1.7402346054863809 + "phenodigm_score": 1.773384910034319 }, "score_metric": "ancestor_information_content" }, @@ -1068,18 +1068,18 @@ "score": 5.412148503540145, "similarity": { "subject_termset": { - "ZP:0000945": { - "id": "ZP:0000945", - "label": "pigment cell quality, abnormal (ZPO)" - }, "ZP:0100294": { "id": "ZP:0100294", "label": "visual perception absent, abnormal (ZPO)" + }, + "ZP:0000945": { + "id": "ZP:0000945", + "label": "pigment cell quality, abnormal (ZPO)" } }, "object_termset": { - "HP:0002104": { "id": "HP:0002104", "label": "Apnea (HPO)" }, - "HP:0012378": { "id": "HP:0012378", "label": "Fatigue (HPO)" } + "HP:0012378": { "id": "HP:0012378", "label": "Fatigue (HPO)" }, + "HP:0002104": { "id": "HP:0002104", "label": "Apnea (HPO)" } }, "subject_best_matches": { "ZP:0000945": { @@ -1277,8 +1277,8 @@ } }, "object_termset": { - "HP:0012378": { "id": "HP:0012378", "label": "Fatigue (HPO)" }, - "HP:0002104": { "id": "HP:0002104", "label": "Apnea (HPO)" } + "HP:0002104": { "id": "HP:0002104", "label": "Apnea (HPO)" }, + "HP:0012378": { "id": "HP:0012378", "label": "Fatigue (HPO)" } }, "subject_best_matches": { "ZP:0001841": { @@ -1497,8 +1497,8 @@ } }, "object_termset": { - "HP:0002104": { "id": "HP:0002104", "label": "Apnea (HPO)" }, - "HP:0012378": { "id": "HP:0012378", "label": "Fatigue (HPO)" } + "HP:0012378": { "id": "HP:0012378", "label": "Fatigue (HPO)" }, + "HP:0002104": { "id": "HP:0002104", "label": "Apnea (HPO)" } }, "subject_best_matches": { "ZP:0021445": { diff --git a/frontend/fixtures/search.json b/frontend/fixtures/search.json index ca03a5bcb..f1af0a9dd 100644 --- a/frontend/fixtures/search.json +++ b/frontend/fixtures/search.json @@ -1,7 +1,7 @@ { "limit": 20, "offset": 0, - "total": 101, + "total": 117, "items": [ { "id": "MONDO:0019391", diff --git a/frontend/src/pages/node/SectionOverview.vue b/frontend/src/pages/node/SectionOverview.vue index f6bbb1157..6624a2a83 100644 --- a/frontend/src/pages/node/SectionOverview.vue +++ b/frontend/src/pages/node/SectionOverview.vue @@ -176,7 +176,7 @@ const clinicalSynopsis = computed( ); const infoForPatients = computed( () => - props.node.mappings?.filter(({ id }) => + props.node.external_links?.filter(({ id }) => ["GARD:"].some((prefix) => id.startsWith(prefix)), ) || [], );