From 4c42ee6883c00b44f259c750bccd03028fe1ba02 Mon Sep 17 00:00:00 2001 From: Kevin Schaper Date: Thu, 17 Oct 2024 14:47:14 -0700 Subject: [PATCH 1/2] Show disease context qualifier column only for human g2p, also only show taxon for interaction & orthology --- frontend/src/pages/node/AssociationsTable.vue | 20 +++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/frontend/src/pages/node/AssociationsTable.vue b/frontend/src/pages/node/AssociationsTable.vue index 0c6314f1..5152299a 100644 --- a/frontend/src/pages/node/AssociationsTable.vue +++ b/frontend/src/pages/node/AssociationsTable.vue @@ -80,7 +80,9 @@ : row.subject_taxon_label }} - + @@ -210,15 +212,24 @@ const cols = computed((): Cols => { /** taxon column. exists for many categories, so just add if any row has taxon. */ if ( - associations.value.items.some( - (item) => item.subject_taxon_label || item.object_taxon_label, - ) + props.category.id.includes("GeneToGeneHomology") || + props.category.id.includes("Interaction") ) extraCols.push({ slot: "taxon", heading: "Taxon", }); + if ( + props.node.in_taxon_label == "Homo sapiens" && + props.category.id.includes("GeneToPhenotypicFeature") + ) { + extraCols.push({ + key: "disease_context_qualifier_label", + heading: "Disease Context", + sortable: true, + }); + } /** phenotype specific columns */ if (props.category.id.includes("PhenotypicFeature")) { extraCols.push( @@ -235,6 +246,7 @@ const cols = computed((): Cols => { }, ); } + //include original subject and call it Source for D2P if (props.category.id.includes("DiseaseToPhenotypicFeature")) { extraCols.push({ From 5117639b04de989dc1d6e9b6bfb07c1db15b03e9 Mon Sep 17 00:00:00 2001 From: Kevin Schaper Date: Thu, 17 Oct 2024 15:12:48 -0700 Subject: [PATCH 2/2] Make disease context qualifier a link, drive by cleanup of 'already on this page' check --- frontend/src/components/AppNodeBadge.vue | 2 +- frontend/src/pages/node/AssociationsTable.vue | 15 ++++++++++++--- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/frontend/src/components/AppNodeBadge.vue b/frontend/src/components/AppNodeBadge.vue index 620a820c..449167e6 100644 --- a/frontend/src/components/AppNodeBadge.vue +++ b/frontend/src/components/AppNodeBadge.vue @@ -88,7 +88,7 @@ const info = computed(() => const isLink = computed(() => { /** make sure we're already on page we're linking to */ return ( - !window.location.pathname.endsWith("/node/" + (props.node.id || "")) && + !window.location.pathname.endsWith("/" + (props.node.id || "")) && /** make sure id is a valid curie */ !!props.node.id?.match(/^\w/) ); diff --git a/frontend/src/pages/node/AssociationsTable.vue b/frontend/src/pages/node/AssociationsTable.vue index 5152299a..6006c8cf 100644 --- a/frontend/src/pages/node/AssociationsTable.vue +++ b/frontend/src/pages/node/AssociationsTable.vue @@ -80,8 +80,16 @@ : row.subject_taxon_label }} -