Skip to content

Commit

Permalink
use original_predicate for maxo_relation column in medical actions ta…
Browse files Browse the repository at this point in the history
…ble, add some unfortunate hardcoding for external CHEBI links when we don't have the CHEBI node
  • Loading branch information
kevinschaper committed Jan 14, 2025
1 parent 07d9acb commit efccb45
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions frontend/src/pages/node/AssociationsTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,11 @@
<AppPredicateBadge :association="row" />
</template>

<!-- maxorelation -->
<template #maxorelation="{ row }">
{{ row.original_predicate }}
</template>

<!-- object-->
<template #object="{ row }">
<AppNodeBadge
Expand All @@ -90,6 +95,12 @@
}"
:breadcrumbs="getBreadcrumbs(node, row, 'subject')"
/>
<!-- unfortunate link hardcoding for CHEBI IDs that we don't have in the graph, TODO: replace with prefix expansion in the browser -->
<span v-else-if="row.subject_specialization_qualifier?.startsWith('CHEBI')">
<AppLink :to="'http://purl.obolibrary.org/obo/CHEBI_' + row.subject_specialization_qualifier.split(':')[1]">
{{ row.subject_specialization_qualifier }}
</AppLink>
</span>
<span v-else>{{ row.subject_specialization_qualifier }}</span>
</template>

Expand Down Expand Up @@ -288,9 +299,9 @@ const medicalActionColumns = computed<Cols<Datum>>(() => {
heading: "Extension",
},
{
slot: "predicate",
key: "predicate",
heading: "Association",
slot: "maxorelation",
key: "original_predicate",
heading: "MaXO Relation",
},
{
slot: "object",
Expand Down

0 comments on commit efccb45

Please sign in to comment.