jbrowse-plugin-mafviewer 1.2.0 → 1.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/BgzipTaffyAdapter/BgzipTaffyAdapter.js +0 -1
- package/dist/BgzipTaffyAdapter/BgzipTaffyAdapter.js.map +1 -1
- package/dist/LinearMafDisplay/components/ColorLegend.js +1 -1
- package/dist/LinearMafDisplay/components/ColorLegend.js.map +1 -1
- package/dist/LinearMafDisplay/components/RectBg.js +1 -1
- package/dist/LinearMafDisplay/stateModel.d.ts +10 -0
- package/dist/LinearMafDisplay/stateModel.js +31 -11
- package/dist/LinearMafDisplay/stateModel.js.map +1 -1
- package/dist/LinearMafRenderer/makeImageData.js +1 -1
- package/dist/LinearMafRenderer/makeImageData.js.map +1 -1
- package/dist/LinearMafRenderer/util.js.map +1 -1
- package/dist/MafTabixAdapter/MafTabixAdapter.js +1 -6
- package/dist/MafTabixAdapter/MafTabixAdapter.js.map +1 -1
- package/dist/jbrowse-plugin-mafviewer.umd.production.min.js +7 -7
- package/dist/jbrowse-plugin-mafviewer.umd.production.min.js.map +3 -3
- package/package.json +2 -1
- package/src/BgzipTaffyAdapter/BgzipTaffyAdapter.ts +1 -2
- package/src/LinearMafDisplay/components/ColorLegend.tsx +2 -2
- package/src/LinearMafDisplay/components/RectBg.tsx +1 -1
- package/src/LinearMafDisplay/stateModel.ts +31 -11
- package/src/LinearMafRenderer/makeImageData.ts +0 -1
- package/src/LinearMafRenderer/util.ts +1 -0
- package/src/MafTabixAdapter/MafTabixAdapter.ts +1 -11
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.2.
|
|
2
|
+
"version": "1.2.2",
|
|
3
3
|
"license": "MIT",
|
|
4
4
|
"name": "jbrowse-plugin-mafviewer",
|
|
5
5
|
"keywords": [
|
|
@@ -66,6 +66,7 @@
|
|
|
66
66
|
"buffer": "^6.0.3",
|
|
67
67
|
"d3-array": "^3.2.4",
|
|
68
68
|
"d3-hierarchy": "^3.1.2",
|
|
69
|
+
"fast-deep-equal": "^3.1.3",
|
|
69
70
|
"generic-filehandle2": "^1.0.0",
|
|
70
71
|
"long": "^5.2.3"
|
|
71
72
|
}
|
|
@@ -17,9 +17,9 @@ import VirtualOffset from './virtualOffset'
|
|
|
17
17
|
import parseNewick from '../parseNewick'
|
|
18
18
|
import { normalize } from '../util'
|
|
19
19
|
import { parseRowInstructions } from './rowInstructions'
|
|
20
|
+
import { parseLineByLine } from './util'
|
|
20
21
|
|
|
21
22
|
import type { IndexData, OrganismRecord } from './types'
|
|
22
|
-
import { parseLineByLine } from './util'
|
|
23
23
|
interface Entry {
|
|
24
24
|
type: string
|
|
25
25
|
row: number
|
|
@@ -101,7 +101,6 @@ export default class BgzipTaffyAdapter extends BaseFeatureDataAdapter {
|
|
|
101
101
|
|
|
102
102
|
getFeatures(query: Region, opts?: BaseOptions) {
|
|
103
103
|
const { statusCallback = () => {} } = opts || {}
|
|
104
|
-
console.log(query.start, query.end, 'wtf')
|
|
105
104
|
return ObservableCreate<Feature>(async observer => {
|
|
106
105
|
try {
|
|
107
106
|
const byteRanges = await this.setup()
|
|
@@ -43,10 +43,10 @@ const ColorLegend = observer(function ({
|
|
|
43
43
|
? samples.map((sample, idx) => (
|
|
44
44
|
<text
|
|
45
45
|
key={`${sample.id}-${idx}`}
|
|
46
|
-
y={idx * rowHeight + rowHeight / 2}
|
|
47
46
|
dominantBaseline="middle"
|
|
48
|
-
x={2}
|
|
49
47
|
fontSize={svgFontSize}
|
|
48
|
+
x={2}
|
|
49
|
+
y={idx * rowHeight + rowHeight / 2}
|
|
50
50
|
>
|
|
51
51
|
{sample.label}
|
|
52
52
|
</text>
|
|
@@ -3,9 +3,9 @@ import { getEnv, getSession } from '@jbrowse/core/util'
|
|
|
3
3
|
import { getRpcSessionId } from '@jbrowse/core/util/tracks'
|
|
4
4
|
import { ascending } from 'd3-array'
|
|
5
5
|
import { cluster, hierarchy } from 'd3-hierarchy'
|
|
6
|
+
import deepEqual from 'fast-deep-equal'
|
|
6
7
|
import { autorun } from 'mobx'
|
|
7
8
|
import { addDisposer, isAlive, types } from 'mobx-state-tree'
|
|
8
|
-
import deepEqual from 'fast-deep-equal'
|
|
9
9
|
|
|
10
10
|
import SetRowHeightDialog from './components/SetRowHeight'
|
|
11
11
|
import { maxLength, setBrLength } from './types'
|
|
@@ -244,7 +244,7 @@ export default function stateModelFactory(
|
|
|
244
244
|
return {
|
|
245
245
|
...s,
|
|
246
246
|
notReady:
|
|
247
|
-
!self.volatileSamples
|
|
247
|
+
(!self.volatileSamples && !self.volatileTree) || super.notReady,
|
|
248
248
|
config: rendererConfig,
|
|
249
249
|
samples,
|
|
250
250
|
rowHeight,
|
|
@@ -260,16 +260,36 @@ export default function stateModelFactory(
|
|
|
260
260
|
return [
|
|
261
261
|
...superTrackMenuItems(),
|
|
262
262
|
{
|
|
263
|
-
label: 'Set
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
263
|
+
label: 'Set feature height',
|
|
264
|
+
type: 'subMenu',
|
|
265
|
+
subMenu: [
|
|
266
|
+
{
|
|
267
|
+
label: 'Normal',
|
|
268
|
+
onClick: () => {
|
|
269
|
+
self.setRowHeight(15)
|
|
270
|
+
self.setRowProportion(0.8)
|
|
270
271
|
},
|
|
271
|
-
|
|
272
|
-
|
|
272
|
+
},
|
|
273
|
+
{
|
|
274
|
+
label: 'Compact',
|
|
275
|
+
onClick: () => {
|
|
276
|
+
self.setRowHeight(8)
|
|
277
|
+
self.setRowProportion(0.9)
|
|
278
|
+
},
|
|
279
|
+
},
|
|
280
|
+
{
|
|
281
|
+
label: 'Manually set height',
|
|
282
|
+
onClick: () => {
|
|
283
|
+
getSession(self).queueDialog(handleClose => [
|
|
284
|
+
SetRowHeightDialog,
|
|
285
|
+
{
|
|
286
|
+
model: self,
|
|
287
|
+
handleClose,
|
|
288
|
+
},
|
|
289
|
+
])
|
|
290
|
+
},
|
|
291
|
+
},
|
|
292
|
+
],
|
|
273
293
|
},
|
|
274
294
|
{
|
|
275
295
|
label: 'Show all letters',
|
|
@@ -85,6 +85,7 @@ export default class MafTabixAdapter extends BaseFeatureDataAdapter {
|
|
|
85
85
|
const data = (feature.get('field5') as string).split(',')
|
|
86
86
|
const alignments = {} as Record<string, OrganismRecord>
|
|
87
87
|
|
|
88
|
+
// eslint-disable-next-line @typescript-eslint/prefer-for-of
|
|
88
89
|
for (let j = 0; j < data.length; j++) {
|
|
89
90
|
const elt = data[j]!
|
|
90
91
|
const seq = elt.split(':')[5]!
|
|
@@ -116,17 +117,6 @@ export default class MafTabixAdapter extends BaseFeatureDataAdapter {
|
|
|
116
117
|
}
|
|
117
118
|
}
|
|
118
119
|
|
|
119
|
-
console.log(
|
|
120
|
-
{
|
|
121
|
-
alignments,
|
|
122
|
-
firstAssemblyNameFound,
|
|
123
|
-
refAssemblyName,
|
|
124
|
-
q: query.assemblyName,
|
|
125
|
-
},
|
|
126
|
-
alignments[refAssemblyName],
|
|
127
|
-
alignments[query.assemblyName],
|
|
128
|
-
alignments[firstAssemblyNameFound],
|
|
129
|
-
)
|
|
130
120
|
observer.next(
|
|
131
121
|
new SimpleFeature({
|
|
132
122
|
id: feature.id(),
|