Skip to content
Snippets Groups Projects
Commit 23c1dbe7 authored by Jean  CURY's avatar Jean CURY Committed by Remi PLANEL
Browse files

fix way to guess system's name

parent 21d61764
No related branches found
No related tags found
1 merge request!165fix way to guess system's name
...@@ -56,14 +56,8 @@ function pdbNameToCif(pdbPath: string) { ...@@ -56,14 +56,8 @@ function pdbNameToCif(pdbPath: string) {
function toSystemName(rawName: string) { function toSystemName(rawName: string) {
// split on -0 if exists else on _ // split on __ in system_genes
if (rawName.includes("-0")) { return rawName.split("__")[0].toLocaleLowerCase()
return rawName.split("-0")[0].toLocaleLowerCase()
} else {
return rawName.split("_")[0].toLocaleLowerCase()
}
} }
...@@ -100,7 +94,7 @@ function remove(key) { ...@@ -100,7 +94,7 @@ function remove(key) {
</template> </template>
<template #[`item.structure`]="{ item }"> <template #[`item.structure`]="{ item }">
<MolstarPdbePlugin v-if="item?.pdb && item.pdb !== 'na'" <MolstarPdbePlugin v-if="item?.pdb && item.pdb !== 'na'"
:data-urls="[`/${toSystemName(item.system)}/${pdbNameToCif(item.pdb)}`]" uniq> :data-urls="[`/${toSystemName(item.system_genes)}/${pdbNameToCif(item.pdb)}`]" uniq>
</MolstarPdbePlugin> </MolstarPdbePlugin>
<span v-else class="d-flex flex-wrap align-center justify-center"> <span v-else class="d-flex flex-wrap align-center justify-center">
<v-icon color="warning" icon="md:dangerous"></v-icon> <v-icon color="warning" icon="md:dangerous"></v-icon>
......
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