where it seems that geneColSel[props?.selectedModality] refers to a column of genesInfo that does not yet exist because genesInfo is still pointing to the previous modality's row data while geneColSel[props?.selectedModality] is new.
I think this is because geneColSel remembers its previous selection (which is good), so when you go to a new modality and then go back to the previous modality, it tries to retrieve the previous selection (so far so good) but the genesInfo has not yet updated. I guess there must be some code that defends against this on the first selection of a new modality, but this is skipped when we re-select a modality that we went to before?
If you have a multi-modal analysis
AND you switch between modalities in the UI
AND the row data is different between the modalities,
we see the following bug:
I've traced this to
https://github.com/kanaverse/kana/blob/e6764a7a607f3e2c4b226cd1d59631f77ef22261/src/components/Markers/index.js#L1154-L1156
where it seems that
geneColSel[props?.selectedModality]
refers to a column ofgenesInfo
that does not yet exist becausegenesInfo
is still pointing to the previous modality's row data whilegeneColSel[props?.selectedModality]
is new.I think this is because
geneColSel
remembers its previous selection (which is good), so when you go to a new modality and then go back to the previous modality, it tries to retrieve the previous selection (so far so good) but thegenesInfo
has not yet updated. I guess there must be some code that defends against this on the first selection of a new modality, but this is skipped when we re-select a modality that we went to before?