diff --git a/components/content/MolstarPdbePlugin.vue b/components/content/MolstarPdbePlugin.vue index 2cc1e5cafb989d6978900bd778817e6f52036d71..731bccdebe06b07c32662d74f449302edbd01a02 100644 --- a/components/content/MolstarPdbePlugin.vue +++ b/components/content/MolstarPdbePlugin.vue @@ -104,9 +104,20 @@ const selectedPaePath = computed(() => { const paeData = ref([]) watch(selectedPaePath, async (newPaePath) => { if (newPaePath !== null) { - const data = await d3.tsv(newPaePath); - // console.log(data) - paeData.value = data + try { + const data = await d3.tsv(newPaePath); + console.log(data.length) + if (data.length > 500) { + paeData.value = [] + } + else { + paeData.value = data + } + + } + catch (error) { + console.log(error) + } } else { paeData.value = [] } @@ -116,9 +127,11 @@ watch(selectedPaePath, async (newPaePath) => { const sanitizedPaeData = computed(() => { return paeData.value.reduce((acc, curr, index) => { const scoredResidue = index + // let newAcc = [...acc] for (const [alignedResidue, value] of Object.entries(curr)) { // console.log(value) acc.push({ alignedResidue: parseInt(alignedResidue), scoredResidue: parseInt(scoredResidue), value: parseFloat(value) }) + // newAcc = [...newAcc, ...[{ alignedResidue: parseInt(alignedResidue), scoredResidue: parseInt(scoredResidue), value: parseFloat(value) }]] } return acc @@ -188,8 +201,9 @@ watch(selectedPdb, (selectedPdb, prevSelectPdb) => { custom-data-format="cif"></pdbe-molstar> </v-sheet> </v-col> - <v-col v-if="sanitizedPaeData?.length > 0"> - <PlotFigure defer :options="plotPaeOptions"></PlotFigure> + <v-col > + <PlotFigure v-if="sanitizedPaeData?.length > 0" defer :options="plotPaeOptions"></PlotFigure> + <v-alert type="warning">The PAE is to large</v-alert> <v-card flat color="transparent"> <v-card-title>Model Confidence</v-card-title> diff --git a/components/content/StructureDb.vue b/components/content/StructureDb.vue index 4757a26771ed05b07d20d65983148aec1d4ccebe..bf0ba15a59dc00c1b2754470356d807727b5acd1 100644 --- a/components/content/StructureDb.vue +++ b/components/content/StructureDb.vue @@ -43,6 +43,11 @@ function pdbNameToCif(pdbPath: string) { return `${cifPath}.cif` } + +function toSystemName(rawName: string) { + return rawName.split(/_|-0/)[0].toLocaleLowerCase() + +} </script> <template> <ServerDbTable title="Predicted Structures" db="structure" :sortBy="sortBy" :facets="facets" @@ -58,7 +63,7 @@ function pdbNameToCif(pdbPath: string) { <td :colspan="columns.length"> <v-card flat color="transparent"> <v-card-text> - <MolstarPdbePlugin :data-urls="[`/${item.system.toLowerCase()}/${pdbNameToCif(item.pdb)}`]"> + <MolstarPdbePlugin :data-urls="[`/${toSystemName(item.system)}/${pdbNameToCif(item.pdb)}`]"> </MolstarPdbePlugin> </v-card-text> </v-card> diff --git a/deploy/df-wiki/templates/deployment.yaml b/deploy/df-wiki/templates/deployment.yaml index 6ac7bd1976d21d82013e962bbf595021c630a309..10e0c872613d1fe9566ce7b280aaa46ccb8e9423 100644 --- a/deploy/df-wiki/templates/deployment.yaml +++ b/deploy/df-wiki/templates/deployment.yaml @@ -54,6 +54,8 @@ spec: name: tmp - name: nginx-config mountPath: /etc/nginx/conf.d/ + - name: structure-data-pvc + mountPath: /structure-data {{- with .Values.nodeSelector }} @@ -74,4 +76,6 @@ spec: - name: nginx-config configMap: name: nginx-config - + - name: structure-data-pvc + persistentVolumeClaim: + claimName: structure-data-pvc diff --git a/deploy/df-wiki/templates/pvc-structure.yaml b/deploy/df-wiki/templates/pvc-structure.yaml new file mode 100644 index 0000000000000000000000000000000000000000..ec9612a0710bfaab0dad2549da0543e0900b858e --- /dev/null +++ b/deploy/df-wiki/templates/pvc-structure.yaml @@ -0,0 +1,12 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: structure-data-pvc +spec: + accessModes: + - ReadWriteMany + resources: + requests: + storage: 40Gi + storageClassName: isilon + volumeMode: Filesystem \ No newline at end of file diff --git a/packages/df-wiki-cli/df_wiki_cli/content/main.py b/packages/df-wiki-cli/df_wiki_cli/content/main.py index d01337bc0ce3edcefe9116f0d53b2b9c49c75713..32333d1601245e3c17bec85923cd043c05e5f621 100644 --- a/packages/df-wiki-cli/df_wiki_cli/content/main.py +++ b/packages/df-wiki-cli/df_wiki_cli/content/main.py @@ -105,7 +105,7 @@ def structure( for f in dir.iterdir(): console.print(f"[green] {f.name}") # get the system name - system = re.split("_|\.", f.name)[0].lower() + system = re.split("_|\.|-0", f.name)[0].lower() console.print(system) systemDir = output / system