Skip to content

Commit b4691b0

Browse files
committed
fix: use experiment-wide min/max for eFP colour scale instead of group
1 parent 7076524 commit b4691b0

2 files changed

Lines changed: 6 additions & 5 deletions

File tree

Eplant/views/eFP/Viewer/EFPViewer.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ export const EFPViewer = ({
191191
borderRadius: 1,
192192
})}
193193
>
194-
{data.viewData[activeViewIndex].supported ? (
194+
{sortedViewData[activeViewIndex].supported ? (
195195
<>
196196
<div>
197197
<Typography
@@ -204,7 +204,7 @@ export const EFPViewer = ({
204204
</Typography>
205205

206206
<GeneDistributionChart
207-
data={{ ...data.viewData[activeViewIndex] }}
207+
data={{ ...sortedViewData[activeViewIndex] }}
208208
/>
209209
</div>
210210
<MaskModal
@@ -229,7 +229,7 @@ export const EFPViewer = ({
229229
zIndex: 10,
230230
})}
231231
data={{
232-
...data.viewData[activeViewIndex],
232+
...sortedViewData[activeViewIndex],
233233
}}
234234
maskThreshold={state.maskThreshold}
235235
colorMode={state.colorMode}

Eplant/views/eFP/svg.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,12 +124,13 @@ export function getColor(
124124

125125
export function useStyles(
126126
id: string,
127-
{ groups, control }: EFPData,
127+
data: EFPData,
128128
colorMode: ColorMode,
129129
maskThreshold?: number,
130130
maskingEnabled?: boolean
131131
) {
132132
const theme = useTheme()
133+
const { groups, control } = data
133134
const samples = groups
134135
.flatMap((group) =>
135136
group.tissues.map(
@@ -138,7 +139,7 @@ export function useStyles(
138139
tissue.id
139140
} { fill: ${getColor(
140141
tissue.mean,
141-
group,
142+
data,
142143
control ?? 1,
143144
theme,
144145
colorMode,

0 commit comments

Comments
 (0)