Skip to content

Commit 67ed285

Browse files
bw2phildarnowsky-broad
authored andcommitted
added more options to y-scale drop down
1 parent ffbf281 commit 67ed285

File tree

4 files changed

+18
-5
lines changed

4 files changed

+18
-5
lines changed

browser/src/ShortTandemRepeatPage/ShortTandemRepeatAdjacentRepeatSection.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,10 @@ const ShortTandemRepeatAdjacentRepeatSection = ({
122122
}}
123123
>
124124
<option value="linear">Linear</option>
125-
<option value="linear-truncated">Linear: Truncated</option>
126125
<option value="log">Log</option>
126+
<option value="linear-truncated-50">Linear: Truncated at 50</option>
127+
<option value="linear-truncated-200">Linear: Truncated at 200</option>
128+
<option value="linear-truncated-1000">Linear: Truncated at 1000</option>
127129
</Select>
128130
</label>
129131
</ControlSection>

browser/src/ShortTandemRepeatPage/ShortTandemRepeatAlleleSizeDistributionPlot.tsx

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,12 @@ const BarWithHoverEffect = styled(Bar)`
2828
}
2929
`
3030

31-
export type ScaleType = 'linear' | 'linear-truncated' | 'log'
31+
export type ScaleType =
32+
| 'linear'
33+
| 'linear-truncated-50'
34+
| 'linear-truncated-200'
35+
| 'linear-truncated-1000'
36+
| 'log'
3237

3338
export const genotypeQualityKeys = [
3439
'low',
@@ -290,8 +295,12 @@ const ShortTandemRepeatAlleleSizeDistributionPlot = withSize()(
290295
.domain([1, 10 ** maxLog])
291296
.range([plotHeight, 0])
292297
.clamp(true)
293-
} else if (scaleType === 'linear-truncated') {
298+
} else if (scaleType === 'linear-truncated-50') {
294299
yScale = scaleLinear().domain([0, 50]).range([plotHeight, 0]).clamp(true)
300+
} else if (scaleType === 'linear-truncated-200') {
301+
yScale = scaleLinear().domain([0, 200]).range([plotHeight, 0]).clamp(true)
302+
} else if (scaleType === 'linear-truncated-1000') {
303+
yScale = scaleLinear().domain([0, 1000]).range([plotHeight, 0]).clamp(true)
295304
} else {
296305
yScale = scaleLinear()
297306
.domain([0, max(data, (d) => d.fullFrequency) || 1])

browser/src/ShortTandemRepeatPage/ShortTandemRepeatColorBySelect.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ const ShortTandemRepeatColorBySelect = ({
3030
onChange={(e: { target: { value: ColorBy | '' } }) => {
3131
setSelectedColorBy(e.target.value)
3232
if (e.target.value === 'quality_description') {
33-
setSelectedScaleType('linear-truncated')
33+
setSelectedScaleType('linear-truncated-50')
3434
}
3535
}}
3636
>

browser/src/ShortTandemRepeatPage/ShortTandemRepeatPage.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -424,8 +424,10 @@ const ShortTandemRepeatPage = ({ datasetId, shortTandemRepeat }: ShortTandemRepe
424424
}}
425425
>
426426
<option value="linear">Linear</option>
427-
<option value="linear-truncated">Linear: Truncated</option>
428427
{logScaleAllowed(selectedColorBy) && <option value="log">Log</option>}
428+
<option value="linear-truncated-50">Linear: Truncated at 50</option>
429+
<option value="linear-truncated-200">Linear: Truncated at 200</option>
430+
<option value="linear-truncated-1000">Linear: Truncated at 1000</option>
429431
</Select>
430432
</label>
431433
</ControlSection>

0 commit comments

Comments
 (0)