diff --git a/Makefile b/Makefile index adbd08b77..008a12bda 100644 --- a/Makefile +++ b/Makefile @@ -77,7 +77,7 @@ install-frontend: model: install-backend $(RUN) gen-pydantic $(SCHEMADIR)/model.yaml > $(SCHEMADIR)/model.py $(RUN) gen-typescript $(SCHEMADIR)/model.yaml > frontend/src/api/model.ts - $(RUN) black $(SCHEMADIR)/model.py + make format ### Documentation ### @@ -111,11 +111,20 @@ test-frontend: .PHONY: fixtures fixtures: - @echo "Generating fixtures..." + @echo "Generating fixtures and data..." $(RUN) python scripts/generate_fixtures.py --all-fixtures - $(RUN) black -l 120 backend/tests/fixtures/ - cd frontend && \ - yarn lint + make format + + +.PHONY: data +data: + @echo "Generating frontpage metadata..." + $(RUN) python scripts/generate_fixtures.py --metadata + @echo "Generating publications data..." + $(RUN) python scripts/get_publications.py + @echo "Generating resources data..." + wget https://raw.githubusercontent.com/monarch-initiative/monarch-documentation/main/src/docs/resources/monarch-app-resources.json -O frontend/src/pages/resources/resources.json + make format-frontend ### Development ### diff --git a/backend/tests/fixtures/association_counts_response.py b/backend/tests/fixtures/association_counts_response.py index a19f9b0e4..a36a793cb 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": 3, "params": { "facet.query": [ '(category:"biolink:DiseaseToPhenotypicFeatureAssociation") AND (subject:"MONDO:0020121" OR subject_closure:"MONDO:0020121")', diff --git a/backend/tests/fixtures/histopheno_response.py b/backend/tests/fixtures/histopheno_response.py index 67fb5632e..6bc1cf57b 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": 2, + "QTime": 4, "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 48dccccd0..660f9f571 100644 --- a/backend/tests/fixtures/phenotype_explorer_compare.py +++ b/backend/tests/fixtures/phenotype_explorer_compare.py @@ -69,8 +69,8 @@ def phenotype_explorer_compare(): "HP:0004325": { "match_source": "HP:0004325", "match_source_label": "Decreased body weight (HPO)", - "match_target": "MP:0002169", - "match_target_label": "no abnormal phenotype detected (MPO)", + "match_target": "MP:0010771", + "match_target_label": "integument phenotype (MPO)", "score": 1.4431977534690428, "match_subsumer": None, "match_subsumer_label": None, @@ -78,7 +78,7 @@ def phenotype_explorer_compare(): "subject_id": "HP:0004325", "subject_label": None, "subject_source": None, - "object_id": "MP:0002169", + "object_id": "MP:0010771", "object_label": None, "object_source": None, "ancestor_id": "UPHENO:0001003", @@ -87,10 +87,10 @@ def phenotype_explorer_compare(): "object_information_content": None, "subject_information_content": None, "ancestor_information_content": 1.4431977534690428, - "jaccard_similarity": 0.16216216216216217, + "jaccard_similarity": 0.3333333333333333, "cosine_similarity": None, "dice_similarity": None, - "phenodigm_score": 0.48376861011243283, + "phenodigm_score": 0.6935891563620457, }, } }, diff --git a/backend/tests/fixtures/search_response.py b/backend/tests/fixtures/search_response.py index 07e1cdf67..c096e99ff 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": 1, "params": { "mm": "100%", "q": "fanconi", diff --git a/frontend/fixtures/association-counts.json b/frontend/fixtures/association-counts.json new file mode 100644 index 000000000..207c58a9c --- /dev/null +++ b/frontend/fixtures/association-counts.json @@ -0,0 +1,19 @@ +{ + "items": [ + { + "label": "Phenotypes", + "count": 4027, + "category": "biolink:DiseaseToPhenotypicFeatureAssociation" + }, + { + "label": "Causal Genes", + "count": 124, + "category": "biolink:CausalGeneToDiseaseAssociation" + }, + { + "label": "Correlated Genes", + "count": 151, + "category": "biolink:CorrelatedGeneToDiseaseAssociation" + } + ] +} diff --git a/frontend/fixtures/entity.json b/frontend/fixtures/entity.json new file mode 100644 index 000000000..342d85492 --- /dev/null +++ b/frontend/fixtures/entity.json @@ -0,0 +1,15 @@ +{ + "id": "MONDO:0020121", + "category": "biolink:Disease", + "name": "muscular dystrophy", + "full_name": null, + "deprecated": null, + "description": "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.", + "xref": [], + "provided_by": "phenio_nodes", + "in_taxon": null, + "in_taxon_label": null, + "symbol": null, + "synonym": [], + "uri": "http://purl.obolibrary.org/obo/MONDO_0020121" +} diff --git a/frontend/fixtures/phenotype-explorer-compare.json b/frontend/fixtures/phenotype-explorer-compare.json index da14ac58e..47898790d 100644 --- a/frontend/fixtures/phenotype-explorer-compare.json +++ b/frontend/fixtures/phenotype-explorer-compare.json @@ -75,8 +75,8 @@ "HP:0004325": { "match_source": "HP:0004325", "match_source_label": "Decreased body weight (HPO)", - "match_target": "MP:0002169", - "match_target_label": "no abnormal phenotype detected (MPO)", + "match_target": "MP:0010771", + "match_target_label": "integument phenotype (MPO)", "score": 1.4431977534690428, "match_subsumer": null, "match_subsumer_label": null, @@ -84,7 +84,7 @@ "subject_id": "HP:0004325", "subject_label": null, "subject_source": null, - "object_id": "MP:0002169", + "object_id": "MP:0010771", "object_label": null, "object_source": null, "ancestor_id": "UPHENO:0001003", @@ -93,10 +93,10 @@ "object_information_content": null, "subject_information_content": null, "ancestor_information_content": 1.4431977534690428, - "jaccard_similarity": 0.16216216216216217, + "jaccard_similarity": 0.3333333333333333, "cosine_similarity": null, "dice_similarity": null, - "phenodigm_score": 0.48376861011243283 + "phenodigm_score": 0.6935891563620457 } } }, diff --git a/frontend/src/assets/icons/resource-exomiser.svg b/frontend/src/assets/icons/resource-exomiser.svg new file mode 100644 index 000000000..d4368f4fa --- /dev/null +++ b/frontend/src/assets/icons/resource-exomiser.svg @@ -0,0 +1,22 @@ + + + + + + + diff --git a/frontend/src/assets/icons/resource-hpo.svg b/frontend/src/assets/icons/resource-hpo.svg new file mode 100644 index 000000000..8d23ce137 --- /dev/null +++ b/frontend/src/assets/icons/resource-hpo.svg @@ -0,0 +1,44 @@ + + + + + + + + + + diff --git a/frontend/src/assets/icons/resource-linkml.svg b/frontend/src/assets/icons/resource-linkml.svg new file mode 100644 index 000000000..92028b021 --- /dev/null +++ b/frontend/src/assets/icons/resource-linkml.svg @@ -0,0 +1,38 @@ + + + + + linkml-logo + + + + + + diff --git a/frontend/src/assets/icons/resource-monarch.svg b/frontend/src/assets/icons/resource-monarch.svg new file mode 100644 index 000000000..1914a5c3a --- /dev/null +++ b/frontend/src/assets/icons/resource-monarch.svg @@ -0,0 +1,50 @@ + + + + + + + + + + + diff --git a/frontend/src/assets/icons/resource-mondo.svg b/frontend/src/assets/icons/resource-mondo.svg new file mode 100644 index 000000000..50cfa61c2 --- /dev/null +++ b/frontend/src/assets/icons/resource-mondo.svg @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + diff --git a/frontend/src/assets/icons/resource-oak.svg b/frontend/src/assets/icons/resource-oak.svg new file mode 100644 index 000000000..05c1782f8 --- /dev/null +++ b/frontend/src/assets/icons/resource-oak.svg @@ -0,0 +1,227 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/frontend/src/assets/icons/resource-phenopackets.svg b/frontend/src/assets/icons/resource-phenopackets.svg new file mode 100644 index 000000000..5aa5bd170 --- /dev/null +++ b/frontend/src/assets/icons/resource-phenopackets.svg @@ -0,0 +1,55 @@ + + + + + phenopackets-logo + + + + + + + + diff --git a/frontend/src/assets/icons/resource-sssom.svg b/frontend/src/assets/icons/resource-sssom.svg new file mode 100644 index 000000000..6e84f328c --- /dev/null +++ b/frontend/src/assets/icons/resource-sssom.svg @@ -0,0 +1,37 @@ + + + + + + + + + + diff --git a/frontend/src/assets/icons/resource-upheno.svg b/frontend/src/assets/icons/resource-upheno.svg new file mode 100644 index 000000000..ca4637bd9 --- /dev/null +++ b/frontend/src/assets/icons/resource-upheno.svg @@ -0,0 +1,29 @@ + + + + + upheno-logo + + + + diff --git a/frontend/src/components/AppIcon.vue b/frontend/src/components/AppIcon.vue index d0a1bb4d1..3bb965758 100644 --- a/frontend/src/components/AppIcon.vue +++ b/frontend/src/components/AppIcon.vue @@ -105,6 +105,11 @@ const thickness = computed(() => { .custom { height: 1em; + /** resource icon styles */ + &[data-icon^="resource-"] { + filter: brightness(0.2); + } + /** category icon styles */ &[data-icon^="category-"], &[data-icon^="association-"] { diff --git a/frontend/src/components/TheHeader.vue b/frontend/src/components/TheHeader.vue index 02a2aa4bb..a8a69f231 100644 --- a/frontend/src/components/TheHeader.vue +++ b/frontend/src/components/TheHeader.vue @@ -49,6 +49,13 @@ > Explore + + Resources +