From 5039560ddc80a53f5d601a7d3fe21e9015eea6cc Mon Sep 17 00:00:00 2001 From: Remi PLANEL <rplanel@pasteur.fr> Date: Tue, 28 Nov 2023 10:16:53 +0100 Subject: [PATCH] Use refinedUrl for pfam file --- composables/useRefinedUrl.ts | 1 - stores/pfam.ts | 4 +++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/composables/useRefinedUrl.ts b/composables/useRefinedUrl.ts index 5dae55fb..057021a2 100644 --- a/composables/useRefinedUrl.ts +++ b/composables/useRefinedUrl.ts @@ -10,7 +10,6 @@ export function useRefinedUrl(url: string | Ref<string>) { const _base = withLeadingSlash( withTrailingSlash(useRuntimeConfig().app.baseURL) ); - console.log(_base) if (_base !== "/" && !sanitzedUrl.startsWith(_base)) { return joinURL(_base, sanitzedUrl); } diff --git a/stores/pfam.ts b/stores/pfam.ts index b6eb282c..d00394ed 100644 --- a/stores/pfam.ts +++ b/stores/pfam.ts @@ -3,6 +3,8 @@ import { ref } from 'vue' import * as d3 from "d3"; import { unref } from 'vue' + +const { refinedUrl: refinedPfamUrl } = useRefinedUrl('/pfam-a-hmm.csv') export interface PfamContent { body: PfamHmm[] } @@ -24,7 +26,7 @@ export const usePfamStore = defineStore('pfam', () => { async function initPfam() { if (pfam.value.size < 1) { - const data = await d3.csv("/pfam-a-hmm.csv"); + const data = await d3.csv(refinedPfamUrl.value); if (data.length > 1) { pfam.value = new Map(data.map(pfam => { return [pfam.AC.split(".")[0], { ...unref(pfam) }]; -- GitLab