|
24 | 24 | :total="associations.total"
|
25 | 25 | @download="download"
|
26 | 26 | >
|
| 27 | + <!-- ortholog --> |
| 28 | + <template #ortholog="{ row }"> |
| 29 | + <AppNodeBadge |
| 30 | + v-if="row.direction === AssociationDirectionEnum.outgoing" |
| 31 | + :node="{ |
| 32 | + id: row.object, |
| 33 | + name: row.object_label, |
| 34 | + category: 'biolink:Gene', |
| 35 | + info: row.object_taxon_label, |
| 36 | + }" |
| 37 | + :breadcrumbs="getBreadcrumbs(node, row, 'subject')" |
| 38 | + /> |
| 39 | + |
| 40 | + <AppNodeBadge |
| 41 | + v-if="row.direction === AssociationDirectionEnum.incoming" |
| 42 | + :node="{ |
| 43 | + id: row.subject, |
| 44 | + name: row.subject_label, |
| 45 | + category: 'biolink:Gene', |
| 46 | + info: row.subject_taxon_label, |
| 47 | + }" |
| 48 | + :breadcrumbs="getBreadcrumbs(node, row, 'object')" |
| 49 | + /> |
| 50 | + </template> |
| 51 | + |
27 | 52 | <!-- subject -->
|
28 | 53 | <template #subject="{ row }">
|
29 | 54 | <AppNodeBadge
|
|
65 | 90 | <span v-else class="empty">No info</span>
|
66 | 91 | </template>
|
67 | 92 |
|
| 93 | + <template #has_evidence="{ row }"> |
| 94 | + <AppLink |
| 95 | + v-for="source in row.has_evidence_links" |
| 96 | + :key="source.id" |
| 97 | + :to="source.url || ''" |
| 98 | + >{{ source.id }}</AppLink |
| 99 | + > |
| 100 | + </template> |
| 101 | + |
68 | 102 | <!-- button to show details -->
|
69 | 103 | <template #details="{ row }">
|
70 | 104 | <AppButton text="Details" icon="info-circle" @click="openModal(row)" />
|
@@ -180,8 +214,46 @@ const search = ref("");
|
180 | 214 |
|
181 | 215 | type Datum = keyof DirectionalAssociation;
|
182 | 216 |
|
| 217 | +/** Orholog columns */ |
| 218 | + |
| 219 | +const orthologColoumns = computed<Cols<Datum>>(() => { |
| 220 | + return [ |
| 221 | + { |
| 222 | + slot: "taxon", |
| 223 | + key: "taxon" as Datum, |
| 224 | + heading: "Taxon", |
| 225 | + }, |
| 226 | + { |
| 227 | + slot: "ortholog", |
| 228 | + key: "ortholog" as Datum, |
| 229 | + heading: "Ortholog", |
| 230 | + }, |
| 231 | + { |
| 232 | + slot: "has_evidence", |
| 233 | + key: "has_evidence" as Datum, |
| 234 | + heading: "Evidence", |
| 235 | + }, |
| 236 | + { |
| 237 | + slot: "primary_knowledge_source", |
| 238 | + key: "primary_knowledge_source" as Datum, |
| 239 | + heading: "Source", |
| 240 | + }, |
| 241 | + { slot: "divider" }, |
| 242 | + { |
| 243 | + slot: "details", |
| 244 | + key: "evidence_count", |
| 245 | + heading: "Details", |
| 246 | + align: "center", |
| 247 | + }, |
| 248 | + ]; |
| 249 | +}); |
| 250 | + |
183 | 251 | /** table columns */
|
184 | 252 | const cols = computed((): Cols<Datum> => {
|
| 253 | + if (props.category.id.includes("GeneToGeneHomology")) { |
| 254 | + return orthologColoumns.value; |
| 255 | + } |
| 256 | + |
185 | 257 | /** standard columns, always present */
|
186 | 258 | const baseCols: Cols<Datum> = [
|
187 | 259 | {
|
@@ -219,14 +291,12 @@ const cols = computed((): Cols<Datum> => {
|
219 | 291 | let extraCols: Cols<Datum> = [];
|
220 | 292 |
|
221 | 293 | /** taxon column. exists for many categories, so just add if any row has taxon. */
|
222 |
| - if ( |
223 |
| - props.category.id.includes("GeneToGeneHomology") || |
224 |
| - props.category.id.includes("Interaction") |
225 |
| - ) |
| 294 | + if (props.category.id.includes("Interaction")) { |
226 | 295 | extraCols.push({
|
227 | 296 | slot: "taxon",
|
228 | 297 | heading: "Taxon",
|
229 | 298 | });
|
| 299 | + } |
230 | 300 |
|
231 | 301 | if (
|
232 | 302 | props.node.in_taxon_label == "Homo sapiens" &&
|
|
0 commit comments