diff --git a/src/components/entropy/entropyD3.js b/src/components/entropy/entropyD3.js index 30e3621fd..a7649ba2d 100644 --- a/src/components/entropy/entropyD3.js +++ b/src/components/entropy/entropyD3.js @@ -104,6 +104,7 @@ EntropyChart.prototype.update = function update({ /* convert amino acid X in gene Y to a nucleotide number */ EntropyChart.prototype._aaToNtCoord = function _aaToNtCoord(gene, aaPos) { + // XXX FIXME: strand if (this.geneMap[gene].strand === "-") { return this.geneMap[gene].end - aaPos * 3 + 1; } @@ -177,9 +178,12 @@ EntropyChart.prototype._drawZoomGenes = function _drawZoomGenes(annotations) { const strokeCol = posInSequence < 1e6 ? "white" : "black"; /* black for large because otherwise disappear against background */ /* check if we've got 2 reading frames (genes on both the "+" & "-" strands) and if so then modify the offset accordingly. If not, plot them all in the middle to save space */ + // XXX FIXME: strand + // XXX FIXME: does this assume there are always strand==="+" annotations? I think so. const genesOnBothStrands = !!annotations.filter((a) => a.strand === "-").length; const readingFrameOffset = (strand) => { if (genesOnBothStrands) { + // XXX FIXME: strand return strand === "-" ? 20 : 0; } return 10; diff --git a/src/components/entropy/infoPanel.js b/src/components/entropy/infoPanel.js index 9496b798a..46d7962cc 100644 --- a/src/components/entropy/infoPanel.js +++ b/src/components/entropy/infoPanel.js @@ -45,8 +45,10 @@ const InfoPanel = ({hovered, width, height, mutType, showCounts, geneMap, t}) => styles.container.bottom = height - pos.y; } + // XXX FIXME: strand const isNegStrand = hovered.d.prot ? geneMap[hovered.d.prot].strand === "-" : null; + // XXX FIXME: strand const nucPos = hovered.d.prot ? mutType === "aa" ? isNegStrand ? geneMap[hovered.d.prot].end - hovered.d.codon * 3 + 3 : @@ -72,6 +74,7 @@ const InfoPanel = ({hovered, width, height, mutType, showCounts, geneMap, t}) =>

+ // XXX FIXME: strand {isNegStrand === null ? `` : isNegStrand ? t("Negative strand") : t("Positive strand")}

diff --git a/src/util/entropyCreateStateFromJsons.js b/src/util/entropyCreateStateFromJsons.js index f46da57c3..e3f81c365 100644 --- a/src/util/entropyCreateStateFromJsons.js +++ b/src/util/entropyCreateStateFromJsons.js @@ -19,6 +19,7 @@ const getAnnotations = (jsonData) => { prot: prot, start: jsonData[prot].start - 1, // see above end: jsonData[prot].end, + // XXX FIXME: strand? strand: jsonData[prot].strand, fill: genotypeColors[aaCount % 10] });