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

Merge branch 'operon-struct-type' into operon-struct-type-article

parents 25c89204 2ffe49c0
No related branches found
No related tags found
No related merge requests found
......@@ -17,7 +17,7 @@ const { mobile } = useDisplay();
const { page } = useContent();
const dbName = "structure"
const filterBase = ref<string[]>([
"prediction_type='multimer(dimer)'",
"prediction_type='multimer(dimer)' OR prediction_type='multimer(homodimer)'",
"completed='true'"
])
const structureTitle = ref("Structure")
......@@ -77,15 +77,9 @@ function extractGeneName(name: string) {
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, pDockQ, pdb, nb_sys, proteins_in_the_prediction, system_genes }) => {
const flattenMap = toValData.hits.flatMap(({ system, pDockQ, pdb, nb_sys, proteins_in_the_prediction, system_genes }) => {
if (proteins_in_the_prediction.length === 2) {
const sanitizedSystemGenes = system_genes.map(extractGeneName)
const sanitizedProteins = proteins_in_the_prediction.map(extractGeneName)
......@@ -102,12 +96,14 @@ const groupedPdocks = computed(() => {
})
} else {
return { key, system, system_genes: sanitizedSystemGenes, pDockQ, pdb, nb_sys, proteins_in_the_prediction: sanitizedProteins, protX: sanitizedProteins[0], protY: sanitizedProteins[1] }
return [{ key, system, system_genes: sanitizedSystemGenes, pDockQ, pdb, nb_sys, proteins_in_the_prediction: sanitizedProteins, protX: sanitizedProteins[0], protY: sanitizedProteins[1] }]
}
} else {
throw createError(`More than 2 proteins in a dimer structure for system ${computedSystem.value} !`)
}
}), d => d.system_genes.sort().join(" / "))
})
const groups = d3.groups(flattenMap, d => d.system_genes.sort().join(" / "))
return groups
} else { return [] }
})
......
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