From 4ca10f9cae0d7a55337e7354cd6325645b3ca995 Mon Sep 17 00:00:00 2001 From: alan-wu Date: Tue, 7 Mar 2023 11:51:11 +1300 Subject: [PATCH 1/2] Make sure body proper is ignore when opening the flatmap. --- pages/maps/index.vue | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/pages/maps/index.vue b/pages/maps/index.vue index 424d3438..ed072926 100644 --- a/pages/maps/index.vue +++ b/pages/maps/index.vue @@ -41,8 +41,17 @@ import { successMessage, failMessage } from '@/utils/notification-messages' const getFlatmapEntry = async ( route ) => { const uberonid = route.query.uberonid let organ_name = undefined + //Specify the gender of human + let biologicalSex = route.query.biologicalSex + if (route.query.taxo && route.query.taxo === "NCBITaxon:9606") { + if (!biologicalSex) + biologicalSex = "PATO:0000384" + } try { organ_name = await scicrunch.getOrganFromUberonId(uberonid) + //We do not want to display the body proper + if (organ_name && organ_name.toLowerCase() === "body proper") + organ_name = undefined } catch (e) { // Error caught return empty data. } @@ -50,7 +59,7 @@ const getFlatmapEntry = async ( route ) => { return { type: "MultiFlatmap", taxo: route.query.taxo, - biologicalSex: route.query.biologicalSex, + biologicalSex: biologicalSex, uuid: route.query.fid, organ: organ_name } From 4b21feab0f57058bd03cf4c713ab2a91aabee3bb Mon Sep 17 00:00:00 2001 From: alan-wu Date: Tue, 7 Mar 2023 13:13:08 +1300 Subject: [PATCH 2/2] ADd curly brackets. --- pages/maps/index.vue | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pages/maps/index.vue b/pages/maps/index.vue index ed072926..8dd943f9 100644 --- a/pages/maps/index.vue +++ b/pages/maps/index.vue @@ -44,14 +44,16 @@ const getFlatmapEntry = async ( route ) => { //Specify the gender of human let biologicalSex = route.query.biologicalSex if (route.query.taxo && route.query.taxo === "NCBITaxon:9606") { - if (!biologicalSex) + if (!biologicalSex) { biologicalSex = "PATO:0000384" + } } try { organ_name = await scicrunch.getOrganFromUberonId(uberonid) //We do not want to display the body proper - if (organ_name && organ_name.toLowerCase() === "body proper") + if (organ_name && organ_name.toLowerCase() === "body proper") { organ_name = undefined + } } catch (e) { // Error caught return empty data. }