Closed nathandunn closed 3 years ago
Using defaultBAGeneSetsSample1_reordered (and plain) .
Pathway scores are the same for pathways minus a small rounding error. Visually, the sample pathway
Using a smaller sample size:
Need to create another BPA GMT file
Using a smaller set:
RLF_tf_targets RALA EPHB2 SMN1
MELK_tf_targets MELK CDC25B
DCP1A_tf_targets GABPA GATA2
ERV3_tf_targets NFYA NFYB TAL1 GATA2
The color with the hover data is consistent with the colors shown
The coloring error is because the maxValue is different for both sets due to the size. In the vertical gene set array, we are using:
function calculateColorArray(maxValue,score){
const key = maxValue+'::'+score
if(!colorArrayGeneExpressionCache[key]){
colorArrayGeneExpressionCache[key] = getColorArray(interpolateGenesetScoreFunction(maxValue )(score))
}
return colorArrayGeneExpressionCache[key]
}
...
export const interpolateGenesetScoreFunction = max => {
if(!interpolationTable[max]){
interpolationTable[max] = d3.scaleLinear().domain([-max,0,max]).range(['blue','white','red']).interpolate(d3.interpolateRgb)
}
return interpolationTable[max]
}
However, the other ones all use:
export let interpolateGeneExpression = (score) => score==='NaN' ? 'gray' : interpolateGeneExpressionFunction(score)
So, we can either use a "max" that uses 2 all the time, or use the max scale, which we already indicate. The latter is most likely better.
In the "working" samples it goes: 23, 72, 25
in the non-working, it goes: 25, 23, 72
However, they seems to be aligned properly. On both sides.
Using defaultBPAGeneSetSample3, we can look at a much smaller set (only 2 gene sets) to evaluate differences in sample order:
MYST2_tf_targets YY1 THAP1 NR3C1 KLK3
HIP1_tf_targets NR3C1 PBX3 KLK3
for: