diff --git a/components/content/pdockqMatrix.vue b/components/content/pdockqMatrix.vue index 540fa6b37f81c7d283698af8a608f143e82e0e9a..f32f1cebdf8ccbcf5b1dd3087656f86096df9afd 100644 --- a/components/content/pdockqMatrix.vue +++ b/components/content/pdockqMatrix.vue @@ -81,18 +81,22 @@ const computedSystem = computed(() => { const groupedPdocks = computed(() => { const toValData = toValue(data) + const getSeqName = (d) => { + if (d.includes("__")) { + return d.split("__")[1] + } else { + return d + } + } if (toValData?.hits) { return d3.groups(toValData.hits.flatMap(({ System_name_ok, pDockQ, pdb, nb_sys, proteins_in_the_prediction, system_genes }) => { if (proteins_in_the_prediction.length === 2) { - const sanitizedSystemGenes = system_genes.map(d => d.split("__")[1]) - const sanitizedProteins = proteins_in_the_prediction.map(d => d.split("__")[1]) + const sanitizedSystemGenes = system_genes.map(getSeqName) + const sanitizedProteins = proteins_in_the_prediction.map(getSeqName) const setProteins = new Set(sanitizedProteins) - - if (setProteins.size === 2) { - return sanitizedProteins.map((prot, i) => { if (i === 0) { return { System_name_ok, system_genes: sanitizedSystemGenes, pDockQ, pdb, nb_sys, proteins_in_the_prediction: sanitizedProteins, protX: prot, protY: sanitizedProteins[i + 1] } @@ -108,7 +112,7 @@ const groupedPdocks = computed(() => { } else { throw createError(`More than 2 proteins in a dimer structure for system ${computedSystem.value} !`) } - }), d => d.system_genes.sort().join("--")) + }), d => d.system_genes.sort().join(" / ")) } else { return [] } })