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

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

parents cea68e9f 11ef04ab
No related branches found
No related tags found
No related merge requests found
......@@ -63,7 +63,18 @@ const sanitizedHits = computed<StructureOperonGeneWithImg[]>(() => {
const genesAndSynonymous = new Set([sanitizedGene, ...sanitizedExangeableGenes])
if (monomerStructuresVal) {
const struct = monomerStructuresVal.find((struct) => {
return genesAndSynonymous.has(struct.proteins_in_the_prediction[0])
const hasInSet = genesAndSynonymous.has(struct.proteins_in_the_prediction[0])
if (hasInSet) return hasInSet
// try some less restrictive search
return Array.from(genesAndSynonymous).find(dfModelGeneName => {
if (dfModelGeneName !== undefined && struct?.proteins_in_the_prediction !== undefined) {
const protName = struct.proteins_in_the_prediction[0]
if (protName !== undefined) return dfModelGeneName.startsWith(protName)
}
return false
}) !== undefined
})
const rawImgUrl = joinURL(`/${system.toLowerCase()}`, struct?.structImg ?? '')
const rawStructUrl = joinURL(`/${system.toLowerCase()}`, struct?.structPath ?? '')
......
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