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

look at the exangeables as well

parent 4ba78d05
No related branches found
No related tags found
No related merge requests found
Pipeline #129367 failed
...@@ -48,10 +48,15 @@ const sanitizedHits = computed<StructureOperonGeneWithImg[]>(() => { ...@@ -48,10 +48,15 @@ const sanitizedHits = computed<StructureOperonGeneWithImg[]>(() => {
// get structure information for this prot // get structure information for this prot
const monomerStructuresVal = toValue(monomerStructures) const monomerStructuresVal = toValue(monomerStructures)
const sanitizedGene = hit.gene.split("__")[1] const sanitizedGene = hit.gene.split("__")[1]
const sanitizedExangeableGenes = hit.exchangeables.map(g => g.split("__")[1])
const genesAndSynonymous = new Set([sanitizedGene, ...sanitizedExangeableGenes])
if (monomerStructuresVal) { if (monomerStructuresVal) {
const struct = monomerStructuresVal.find((struct) => { const struct = monomerStructuresVal.find((struct) => {
return struct.proteins_in_the_prediction[0] === sanitizedGene return genesAndSynonymous.has(struct.proteins_in_the_prediction[0])
}) })
if (struct === undefined) {
console.log(hit)
}
const rawImgUrl = joinURL(`/${system.toLowerCase()}`, struct?.structImg ?? '') const rawImgUrl = joinURL(`/${system.toLowerCase()}`, struct?.structImg ?? '')
const rawStructUrl = joinURL(`/${system.toLowerCase()}`, struct?.structPath ?? '') const rawStructUrl = joinURL(`/${system.toLowerCase()}`, struct?.structPath ?? '')
const { refinedUrl: structImgHref } = useRefinedUrl(rawImgUrl) const { refinedUrl: structImgHref } = useRefinedUrl(rawImgUrl)
......
...@@ -4,6 +4,8 @@ export interface StructureOperonGene { ...@@ -4,6 +4,8 @@ export interface StructureOperonGene {
subsystem: string subsystem: string
version: string version: string
system: string system: string
exchangeables: string[]
} }
export interface StructureOperonGeneWithImg extends StructureOperonGene { export interface StructureOperonGeneWithImg extends StructureOperonGene {
......
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