Skip to content
Snippets Groups Projects
Commit 5039560d authored by Remi  PLANEL's avatar Remi PLANEL
Browse files

Use refinedUrl for pfam file

parent d08773ed
No related branches found
No related tags found
No related merge requests found
Pipeline #117039 failed with stages
in 11 minutes and 10 seconds
...@@ -10,7 +10,6 @@ export function useRefinedUrl(url: string | Ref<string>) { ...@@ -10,7 +10,6 @@ export function useRefinedUrl(url: string | Ref<string>) {
const _base = withLeadingSlash( const _base = withLeadingSlash(
withTrailingSlash(useRuntimeConfig().app.baseURL) withTrailingSlash(useRuntimeConfig().app.baseURL)
); );
console.log(_base)
if (_base !== "/" && !sanitzedUrl.startsWith(_base)) { if (_base !== "/" && !sanitzedUrl.startsWith(_base)) {
return joinURL(_base, sanitzedUrl); return joinURL(_base, sanitzedUrl);
} }
......
...@@ -3,6 +3,8 @@ import { ref } from 'vue' ...@@ -3,6 +3,8 @@ import { ref } from 'vue'
import * as d3 from "d3"; import * as d3 from "d3";
import { unref } from 'vue' import { unref } from 'vue'
const { refinedUrl: refinedPfamUrl } = useRefinedUrl('/pfam-a-hmm.csv')
export interface PfamContent { export interface PfamContent {
body: PfamHmm[] body: PfamHmm[]
} }
...@@ -24,7 +26,7 @@ export const usePfamStore = defineStore('pfam', () => { ...@@ -24,7 +26,7 @@ export const usePfamStore = defineStore('pfam', () => {
async function initPfam() { async function initPfam() {
if (pfam.value.size < 1) { 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) { if (data.length > 1) {
pfam.value = new Map(data.map(pfam => { pfam.value = new Map(data.map(pfam => {
return [pfam.AC.split(".")[0], { ...unref(pfam) }]; return [pfam.AC.split(".")[0], { ...unref(pfam) }];
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment