Skip to content

Commit 006471c

Browse files
committed
Lint
1 parent b0fbb59 commit 006471c

File tree

6 files changed

+27
-27
lines changed

6 files changed

+27
-27
lines changed

plugins/linear-comparative-view/src/LinearComparativeView/components/MinLengthSlider.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ import { Box, Slider, Tooltip, Typography } from '@mui/material'
44
import { observer } from 'mobx-react'
55
import { makeStyles } from 'tss-react/mui'
66

7-
import type { LinearComparativeViewModel } from '../model'
87
import type { LinearSyntenyDisplayModel } from '../../LinearSyntenyDisplay/model'
8+
import type { LinearComparativeViewModel } from '../model'
99
import type { SliderValueLabelProps } from '@mui/material'
1010

1111
const useStyles = makeStyles()({
@@ -65,17 +65,17 @@ const MinLengthSlider = observer(function ({
6565
<Slider
6666
value={minLengthValue}
6767
onChange={(_, val) => {
68-
setMinLengthValue(val as number)
68+
setMinLengthValue(val)
6969
}}
7070
onChangeCommitted={() => {
7171
const newMinLength = Math.round(2 ** (minLengthValue / 100))
7272
// Set minAlignmentLength for all synteny displays across all levels
7373
for (const level of levels) {
7474
for (const track of level.tracks) {
7575
for (const display of track.displays) {
76-
;(
77-
display as LinearSyntenyDisplayModel
78-
).setMinAlignmentLength(newMinLength)
76+
;(display as LinearSyntenyDisplayModel).setMinAlignmentLength(
77+
newMinLength,
78+
)
7979
}
8080
}
8181
}

plugins/linear-comparative-view/src/LinearComparativeView/components/OpacitySlider.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import { Box, Slider, Tooltip, Typography } from '@mui/material'
22
import { observer } from 'mobx-react'
33
import { makeStyles } from 'tss-react/mui'
44

5-
import type { LinearComparativeViewModel } from '../model'
65
import type { LinearSyntenyDisplayModel } from '../../LinearSyntenyDisplay/model'
6+
import type { LinearComparativeViewModel } from '../model'
77
import type { SliderValueLabelProps } from '@mui/material'
88

99
const useStyles = makeStyles()({

plugins/linear-comparative-view/src/LinearSyntenyDisplay/afterAttach.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ export function doAfterAttach(self: LinearSyntenyDisplayModel) {
6666
}
6767

6868
// Access alpha to make autorun react to alpha changes
69+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
6970
const { alpha } = self
7071
const height = self.height
7172
const width = view.width
@@ -90,6 +91,7 @@ export function doAfterAttach(self: LinearSyntenyDisplayModel) {
9091
return
9192
}
9293
// Access reactive properties so autorun is triggered when they change
94+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
9395
const { clickId, mouseoverId } = self
9496
// Draw mouseover with light debounce for performance
9597
debouncedDrawMouseoverClickMap(self)

plugins/linear-comparative-view/src/LinearSyntenyDisplay/drawSynteny.ts

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,6 @@ export function drawCigarClickMap(
9797
const unitMultiplier2 = Math.floor(MAX_COLOR_RANGE / cigar.length)
9898

9999
for (let j = 0; j < cigar.length; j += 2) {
100-
const idx = j * unitMultiplier2 + 1
101-
102100
const len = +cigar[j]!
103101
const op = cigar[j + 1] as keyof typeof colorMap
104102

@@ -146,8 +144,19 @@ export function drawCigarClickMap(
146144
Math.abs(cx2 - px2) > 1)
147145

148146
if (shouldDraw) {
147+
const idx = j * unitMultiplier2 + 1
149148
cigarClickMapCanvas.fillStyle = makeColor(idx)
150-
draw(cigarClickMapCanvas, px1, cx1, y1, cx2, px2, y2, mid, drawCurves)
149+
draw(
150+
cigarClickMapCanvas,
151+
px1,
152+
cx1,
153+
y1,
154+
cx2,
155+
px2,
156+
y2,
157+
mid,
158+
drawCurves,
159+
)
151160
cigarClickMapCanvas.fill()
152161
}
153162
}
@@ -283,8 +292,6 @@ export function drawRef(
283292
const unitMultiplier2 = Math.floor(MAX_COLOR_RANGE / cigar.length)
284293

285294
for (let j = 0; j < cigar.length; j += 2) {
286-
const idx = j * unitMultiplier2 + 1
287-
288295
const len = +cigar[j]!
289296
const op = cigar[j + 1] as keyof typeof colorMap
290297

@@ -398,7 +405,8 @@ export function drawRef(
398405

399406
// Filter by total alignment length for this query sequence
400407
if (minAlignmentLength > 0) {
401-
const queryName = feature.f.get('name') || feature.f.get('id') || feature.f.id()
408+
const queryName =
409+
feature.f.get('name') || feature.f.get('id') || feature.f.id()
402410
const totalLength = queryTotalLengths.get(queryName) || 0
403411
if (totalLength < minAlignmentLength) {
404412
continue

plugins/linear-comparative-view/src/LinearSyntenyView/components/DiagonalizationProgressDialog.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ import { observer } from 'mobx-react'
1414

1515
import { diagonalizeRegions } from '../util/diagonalize'
1616

17-
import type { AlignmentData } from '../util/diagonalize'
1817
import type { LinearSyntenyViewModel } from '../model'
18+
import type { AlignmentData } from '../util/diagonalize'
1919

2020
const DiagonalizationProgressDialog = observer(function ({
2121
handleClose,

plugins/linear-comparative-view/src/LinearSyntenyView/util/diagonalize.ts

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,10 @@ export interface DiagonalizationResult {
3131
}
3232
}
3333

34-
export interface ProgressCallback {
35-
(progress: number, message: string): void | Promise<void>
36-
}
34+
export type ProgressCallback = (
35+
progress: number,
36+
message: string,
37+
) => void | Promise<void>
3738

3839
/**
3940
* Diagonalize a set of regions based on alignment data.
@@ -159,15 +160,6 @@ export async function diagonalizeRegions(
159160
const newQueryRegions: Region[] = []
160161
let regionsReversed = 0
161162

162-
console.log('Query ordering:', queryOrdering)
163-
console.log(
164-
'Current query regions:',
165-
currentRegions.map(r => ({
166-
refName: r.refName,
167-
assemblyName: r.assemblyName,
168-
})),
169-
)
170-
171163
for (const { refName, shouldReverse } of queryOrdering) {
172164
const region = currentRegions.find(r => r.refName === refName)
173165
if (region) {
@@ -183,8 +175,6 @@ export async function diagonalizeRegions(
183175
}
184176
}
185177

186-
console.log('New query regions count:', newQueryRegions.length)
187-
188178
await updateProgress(100, 'Diagonalization complete!')
189179

190180
return {

0 commit comments

Comments
 (0)