Skip to content

Commit

Permalink
links working
Browse files Browse the repository at this point in the history
  • Loading branch information
moriondo2022 committed Dec 13, 2024
1 parent 83c35a6 commit 85d35f8
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion src/components/researchPortal/ResearchPheWAS.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,11 @@

<span v-for="(ptValue, ptKey) in hoverItems" :key="ptKey">
<strong v-if="!linkPhenotypes">{{ ptKey }}</strong>
<strong v-else><a>{{ ptKey }}</a></strong>
<strong v-else>
<a :href="phenotypeLink(ptKey)">
{{ phenotypeMap[ptKey].description }}
</a>
</strong>
<br />
<span
v-for="(dValue, dKey) in ptValue.data"
Expand Down Expand Up @@ -1083,6 +1087,17 @@ export default Vue.component("ResearchPhewasPlot", {
action: "remove",
});
},
phenotypeLink(rawPhenotype){
let destination = `/phenotype.html?phenotype=${rawPhenotype}`;
if (this.isPigean){
let suffix = `&genesetSize=${this.$store.state.genesetSize
|| bioIndexUtils.DEFAULT_GENESET_SIZE
}&traitGroup=${this.$store.state.traitGroup
|| bioIndexUtils.DEFAULT_TRAIT_GROUP}`;
destination = `/pigean${destination}${suffix}`;
}
return destination;
}
},
});
</script>
Expand Down

0 comments on commit 85d35f8

Please sign in to comment.