diff --git a/packages/libs/components/src/plots/VolcanoPlot.tsx b/packages/libs/components/src/plots/VolcanoPlot.tsx index 9f17eb2774..ca2a6953c5 100755 --- a/packages/libs/components/src/plots/VolcanoPlot.tsx +++ b/packages/libs/components/src/plots/VolcanoPlot.tsx @@ -238,12 +238,12 @@ function assignSignificanceColor( pValue: number, significanceThreshold: number, log2FoldChangeThreshold: number, - significanceColors: string[] // Assuming the order is [high (up regulated), low (down regulated), insignificant] + significanceColors: string[] // Assuming the order is [insignificant, high (up regulated), low (down regulated)] ) { // Name indices of the significanceColors array for easier accessing. - const HIGH = 0; - const LOW = 1; - const INSIGNIFICANT = 2; + const INSIGNIFICANT = 0; + const HIGH = 1; + const LOW = 2; // Test 1. If the y value is higher than the significance threshold, just return not significant if (pValue >= significanceThreshold) { diff --git a/packages/libs/components/src/types/plots/addOns.ts b/packages/libs/components/src/types/plots/addOns.ts index 359b2422ad..4c40d47ac0 100644 --- a/packages/libs/components/src/types/plots/addOns.ts +++ b/packages/libs/components/src/types/plots/addOns.ts @@ -283,8 +283,8 @@ export const gradientConvergingColorscaleMap = scaleLinear() .range(ConvergingGradientColorscale) .interpolate(interpolateLab); -// Significance colors -export const significanceColors = ['#AC3B4E', '#0E8FAB', '#B5B8B4']; +// Significance colors (not significant, high, low) +export const significanceColors = ['#B5B8B4', '#AC3B4E', '#0E8FAB']; /** truncated axis flags */ export type AxisTruncationAddon = {