Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

show disease context qualifier #855

Merged
merged 2 commits into from
Oct 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion frontend/src/components/AppNodeBadge.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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/)
);
Expand Down
29 changes: 25 additions & 4 deletions frontend/src/pages/node/AssociationsTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,17 @@
: row.subject_taxon_label
}}
</template>

<template #disease_context="{ row }">
<AppNodeBadge
v-if="row.disease_context_qualifier"
:node="{
id: row.disease_context_qualifier,
name: row.disease_context_qualifier_label,
category: 'biolink:Disease',
}"
/>
<span v-else class="empty">No info</span>
</template>
<!-- phenotype specific -->
<!-- no template needed because info just plain text -->

Expand Down Expand Up @@ -210,15 +220,25 @@ const cols = computed((): Cols<Datum> => {

/** 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({
slot: "disease_context",
key: "disease_context_qualifier",
heading: "Disease Context",
sortable: true,
});
}
/** phenotype specific columns */
if (props.category.id.includes("PhenotypicFeature")) {
extraCols.push(
Expand All @@ -235,6 +255,7 @@ const cols = computed((): Cols<Datum> => {
},
);
}

//include original subject and call it Source for D2P
if (props.category.id.includes("DiseaseToPhenotypicFeature")) {
extraCols.push({
Expand Down