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

add pvc for structure data

parent 9c241d08
No related branches found
No related tags found
1 merge request!134Resolve "Table with all PDB files, to make them available to download"
Pipeline #118291 passed
...@@ -104,9 +104,20 @@ const selectedPaePath = computed(() => { ...@@ -104,9 +104,20 @@ const selectedPaePath = computed(() => {
const paeData = ref([]) const paeData = ref([])
watch(selectedPaePath, async (newPaePath) => { watch(selectedPaePath, async (newPaePath) => {
if (newPaePath !== null) { if (newPaePath !== null) {
const data = await d3.tsv(newPaePath); try {
// console.log(data) const data = await d3.tsv(newPaePath);
paeData.value = data console.log(data.length)
if (data.length > 500) {
paeData.value = []
}
else {
paeData.value = data
}
}
catch (error) {
console.log(error)
}
} else { } else {
paeData.value = [] paeData.value = []
} }
...@@ -116,9 +127,11 @@ watch(selectedPaePath, async (newPaePath) => { ...@@ -116,9 +127,11 @@ watch(selectedPaePath, async (newPaePath) => {
const sanitizedPaeData = computed(() => { const sanitizedPaeData = computed(() => {
return paeData.value.reduce((acc, curr, index) => { return paeData.value.reduce((acc, curr, index) => {
const scoredResidue = index const scoredResidue = index
// let newAcc = [...acc]
for (const [alignedResidue, value] of Object.entries(curr)) { for (const [alignedResidue, value] of Object.entries(curr)) {
// console.log(value) // console.log(value)
acc.push({ alignedResidue: parseInt(alignedResidue), scoredResidue: parseInt(scoredResidue), value: parseFloat(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 return acc
...@@ -188,8 +201,9 @@ watch(selectedPdb, (selectedPdb, prevSelectPdb) => { ...@@ -188,8 +201,9 @@ watch(selectedPdb, (selectedPdb, prevSelectPdb) => {
custom-data-format="cif"></pdbe-molstar> custom-data-format="cif"></pdbe-molstar>
</v-sheet> </v-sheet>
</v-col> </v-col>
<v-col v-if="sanitizedPaeData?.length > 0"> <v-col >
<PlotFigure defer :options="plotPaeOptions"></PlotFigure> <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 flat color="transparent">
<v-card-title>Model Confidence</v-card-title> <v-card-title>Model Confidence</v-card-title>
......
...@@ -43,6 +43,11 @@ function pdbNameToCif(pdbPath: string) { ...@@ -43,6 +43,11 @@ function pdbNameToCif(pdbPath: string) {
return `${cifPath}.cif` return `${cifPath}.cif`
} }
function toSystemName(rawName: string) {
return rawName.split(/_|-0/)[0].toLocaleLowerCase()
}
</script> </script>
<template> <template>
<ServerDbTable title="Predicted Structures" db="structure" :sortBy="sortBy" :facets="facets" <ServerDbTable title="Predicted Structures" db="structure" :sortBy="sortBy" :facets="facets"
...@@ -58,7 +63,7 @@ function pdbNameToCif(pdbPath: string) { ...@@ -58,7 +63,7 @@ function pdbNameToCif(pdbPath: string) {
<td :colspan="columns.length"> <td :colspan="columns.length">
<v-card flat color="transparent"> <v-card flat color="transparent">
<v-card-text> <v-card-text>
<MolstarPdbePlugin :data-urls="[`/${item.system.toLowerCase()}/${pdbNameToCif(item.pdb)}`]"> <MolstarPdbePlugin :data-urls="[`/${toSystemName(item.system)}/${pdbNameToCif(item.pdb)}`]">
</MolstarPdbePlugin> </MolstarPdbePlugin>
</v-card-text> </v-card-text>
</v-card> </v-card>
......
...@@ -54,6 +54,8 @@ spec: ...@@ -54,6 +54,8 @@ spec:
name: tmp name: tmp
- name: nginx-config - name: nginx-config
mountPath: /etc/nginx/conf.d/ mountPath: /etc/nginx/conf.d/
- name: structure-data-pvc
mountPath: /structure-data
{{- with .Values.nodeSelector }} {{- with .Values.nodeSelector }}
...@@ -74,4 +76,6 @@ spec: ...@@ -74,4 +76,6 @@ spec:
- name: nginx-config - name: nginx-config
configMap: configMap:
name: nginx-config name: nginx-config
- name: structure-data-pvc
persistentVolumeClaim:
claimName: structure-data-pvc
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
...@@ -105,7 +105,7 @@ def structure( ...@@ -105,7 +105,7 @@ def structure(
for f in dir.iterdir(): for f in dir.iterdir():
console.print(f"[green] {f.name}") console.print(f"[green] {f.name}")
# get the system name # get the system name
system = re.split("_|\.", f.name)[0].lower() system = re.split("_|\.|-0", f.name)[0].lower()
console.print(system) console.print(system)
systemDir = output / system systemDir = output / system
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment