diff --git a/src/components/SeqvarToolsCard/SeqvarToolsCard.vue b/src/components/SeqvarToolsCard/SeqvarToolsCard.vue index 762af42..b7b9620 100644 --- a/src/components/SeqvarToolsCard/SeqvarToolsCard.vue +++ b/src/components/SeqvarToolsCard/SeqvarToolsCard.vue @@ -123,12 +123,10 @@ const franklinLinkout = computed(() => { }) const jumpToLocus = async () => { - const chrPrefixed = props.seqvar?.chrom.startsWith('chr') - ? props.seqvar?.chrom - : `chr${props.seqvar?.chrom}` + const chrom = props.seqvar?.chrom == 'chrMT' ? 'chrM' : props.seqvar?.chrom // NB: we allow the call to fetch here as it goes to local IGV. await fetch( - `http://127.0.0.1:60151/goto?locus=${chrPrefixed}:${props.seqvar?.pos}-${ + `http://127.0.0.1:60151/goto?locus=${chrom}:${props.seqvar?.pos}-${ (props.seqvar?.pos ?? 0) + (props.seqvar?.del?.length ?? 0) }` ).catch((e) => { diff --git a/src/components/StrucvarToolsCard/StrucvarToolsCard.vue b/src/components/StrucvarToolsCard/StrucvarToolsCard.vue index beb05db..e5a5111 100644 --- a/src/components/StrucvarToolsCard/StrucvarToolsCard.vue +++ b/src/components/StrucvarToolsCard/StrucvarToolsCard.vue @@ -98,14 +98,10 @@ const franklinLinkout = computed((): string => { }) const jumpToLocus = async () => { - const chrPrefixed = props.strucvar?.chrom.startsWith('chr') - ? props.strucvar?.chrom - : `chr${props.strucvar?.chrom}` + const chrom = props.strucvar?.chrom == 'chrMT' ? 'chrM' : props.strucvar?.chrom // NB: we allow the call to fetch here as it goes to local IGV. await fetch( - `http://127.0.0.1:60151/goto?locus=${chrPrefixed}:${props.strucvar?.start}-${svStop( - props.strucvar! - )}` + `http://127.0.0.1:60151/goto?locus=${chrom}:${props.strucvar?.start}-${svStop(props.strucvar!)}` ).catch((e) => { const msg = "Couldn't connect to IGV. Please make sure IGV is running and try again." emit('error', msg)