Skip to content
Snippets Groups Projects

Download server data

Merged Remi PLANEL requested to merge download-server-data into main
1 file
+ 10
4
Compare changes
  • Side-by-side
  • Inline
@@ -54,14 +54,20 @@ function pdbNameToCif(pdbPath: string) {
@@ -54,14 +54,20 @@ function pdbNameToCif(pdbPath: string) {
return `${cifPath}.cif`
return `${cifPath}.cif`
}
}
function toSystemName(rawName: string) {
function toSystemName(rawName: string) {
// split on __ in system_genes
// split on -0 if exists else on _
return rawName.split("__")[0].toLocaleLowerCase()
if (rawName.includes("-0")) {
 
 
return rawName.split("-0")[0].toLocaleLowerCase()
 
} else {
 
return rawName.split("_")[0].toLocaleLowerCase()
 
}
 
}
}
 
const plddtDistribution = computed(() => {
const plddtDistribution = computed(() => {
if (toValue(msResult)?.facetDistribution?.plddts) {
if (toValue(msResult)?.facetDistribution?.plddts) {
return Object.entries(toValue(msResult).facetDistribution.plddts).map(([key, value]) => { })
return Object.entries(toValue(msResult).facetDistribution.plddts).map(([key, value]) => { })
@@ -94,7 +100,7 @@ function remove(key) {
@@ -94,7 +100,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_genes)}/${pdbNameToCif(item.pdb)}`]" uniq>
:data-urls="[`/${toSystemName(item.system)}/${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>