diff --git a/components/content/SystemOperonStructure.vue b/components/content/SystemOperonStructure.vue index 092c3dc615a440c7477c39f9e65da0ff96fdfb1a..484fe3638baf4938c5c04b4e16e7570b954f6872 100644 --- a/components/content/SystemOperonStructure.vue +++ b/components/content/SystemOperonStructure.vue @@ -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 ?? '')