@jbrowse/plugin-alignments 2.1.6 → 2.2.0
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/AlignmentsTrack/index.d.ts +1 -1
- package/dist/AlignmentsTrack/index.js +16 -6
- package/dist/AlignmentsTrack/index.js.map +1 -1
- package/dist/BamAdapter/BamAdapter.d.ts +6 -2
- package/dist/BamAdapter/BamAdapter.js +35 -31
- package/dist/BamAdapter/BamAdapter.js.map +1 -1
- package/dist/BamAdapter/configSchema.d.ts +2 -2
- package/dist/BamAdapter/configSchema.js +27 -2
- package/dist/BamAdapter/configSchema.js.map +1 -1
- package/dist/CramAdapter/CramAdapter.d.ts +13 -7
- package/dist/CramAdapter/CramAdapter.js +56 -61
- package/dist/CramAdapter/CramAdapter.js.map +1 -1
- package/dist/CramAdapter/CramSlightlyLazyFeature.d.ts +14 -13
- package/dist/CramAdapter/CramSlightlyLazyFeature.js +28 -22
- package/dist/CramAdapter/CramSlightlyLazyFeature.js.map +1 -1
- package/dist/CramAdapter/configSchema.d.ts +2 -3
- package/dist/CramAdapter/configSchema.js +44 -22
- package/dist/CramAdapter/configSchema.js.map +1 -1
- package/dist/CramAdapter/index.js +1 -1
- package/dist/CramAdapter/index.js.map +1 -1
- package/dist/HtsgetBamAdapter/HtsgetBamAdapter.d.ts +5 -2
- package/dist/HtsgetBamAdapter/HtsgetBamAdapter.js +15 -20
- package/dist/HtsgetBamAdapter/HtsgetBamAdapter.js.map +1 -1
- package/dist/HtsgetBamAdapter/configSchema.d.ts +2 -2
- package/dist/HtsgetBamAdapter/configSchema.js +20 -3
- package/dist/HtsgetBamAdapter/configSchema.js.map +1 -1
- package/dist/LinearAlignmentsDisplay/models/configSchema.d.ts +1 -1
- package/dist/LinearAlignmentsDisplay/models/configSchema.js +23 -6
- package/dist/LinearAlignmentsDisplay/models/configSchema.js.map +1 -1
- package/dist/LinearAlignmentsDisplay/models/model.d.ts +72 -5
- package/dist/LinearAlignmentsDisplay/models/model.js +95 -2
- package/dist/LinearAlignmentsDisplay/models/model.js.map +1 -1
- package/dist/LinearPileupDisplay/configSchema.js +20 -3
- package/dist/LinearPileupDisplay/configSchema.js.map +1 -1
- package/dist/LinearPileupDisplay/model.d.ts +88 -4
- package/dist/LinearPileupDisplay/model.js +616 -503
- package/dist/LinearPileupDisplay/model.js.map +1 -1
- package/dist/LinearSNPCoverageDisplay/models/configSchema.js +33 -4
- package/dist/LinearSNPCoverageDisplay/models/configSchema.js.map +1 -1
- package/dist/LinearSNPCoverageDisplay/models/model.d.ts +86 -3
- package/dist/LinearSNPCoverageDisplay/models/model.js +240 -159
- package/dist/LinearSNPCoverageDisplay/models/model.js.map +1 -1
- package/dist/PileupRenderer/PileupRenderer.d.ts +1 -1
- package/dist/PileupRenderer/PileupRenderer.js +5 -6
- package/dist/PileupRenderer/PileupRenderer.js.map +1 -1
- package/dist/PileupRenderer/configSchema.d.ts +2 -2
- package/dist/PileupRenderer/configSchema.js +37 -2
- package/dist/PileupRenderer/configSchema.js.map +1 -1
- package/dist/SNPCoverageAdapter/configSchema.d.ts +2 -2
- package/dist/SNPCoverageAdapter/configSchema.js +11 -3
- package/dist/SNPCoverageAdapter/configSchema.js.map +1 -1
- package/dist/SNPCoverageRenderer/configSchema.d.ts +2 -2
- package/dist/SNPCoverageRenderer/configSchema.js +21 -1
- package/dist/SNPCoverageRenderer/configSchema.js.map +1 -1
- package/dist/SNPCoverageRenderer/index.d.ts +0 -1
- package/dist/SNPCoverageRenderer/index.js +1 -4
- package/dist/SNPCoverageRenderer/index.js.map +1 -1
- package/esm/AlignmentsTrack/index.d.ts +1 -1
- package/esm/AlignmentsTrack/index.js +16 -6
- package/esm/AlignmentsTrack/index.js.map +1 -1
- package/esm/BamAdapter/BamAdapter.d.ts +6 -2
- package/esm/BamAdapter/BamAdapter.js +35 -31
- package/esm/BamAdapter/BamAdapter.js.map +1 -1
- package/esm/BamAdapter/configSchema.d.ts +2 -2
- package/esm/BamAdapter/configSchema.js +27 -2
- package/esm/BamAdapter/configSchema.js.map +1 -1
- package/esm/CramAdapter/CramAdapter.d.ts +13 -7
- package/esm/CramAdapter/CramAdapter.js +56 -61
- package/esm/CramAdapter/CramAdapter.js.map +1 -1
- package/esm/CramAdapter/CramSlightlyLazyFeature.d.ts +14 -13
- package/esm/CramAdapter/CramSlightlyLazyFeature.js +28 -22
- package/esm/CramAdapter/CramSlightlyLazyFeature.js.map +1 -1
- package/esm/CramAdapter/configSchema.d.ts +2 -3
- package/esm/CramAdapter/configSchema.js +44 -22
- package/esm/CramAdapter/configSchema.js.map +1 -1
- package/esm/CramAdapter/index.js +2 -2
- package/esm/CramAdapter/index.js.map +1 -1
- package/esm/HtsgetBamAdapter/HtsgetBamAdapter.d.ts +5 -2
- package/esm/HtsgetBamAdapter/HtsgetBamAdapter.js +15 -20
- package/esm/HtsgetBamAdapter/HtsgetBamAdapter.js.map +1 -1
- package/esm/HtsgetBamAdapter/configSchema.d.ts +2 -2
- package/esm/HtsgetBamAdapter/configSchema.js +20 -3
- package/esm/HtsgetBamAdapter/configSchema.js.map +1 -1
- package/esm/LinearAlignmentsDisplay/models/configSchema.d.ts +1 -1
- package/esm/LinearAlignmentsDisplay/models/configSchema.js +23 -6
- package/esm/LinearAlignmentsDisplay/models/configSchema.js.map +1 -1
- package/esm/LinearAlignmentsDisplay/models/model.d.ts +72 -5
- package/esm/LinearAlignmentsDisplay/models/model.js +95 -2
- package/esm/LinearAlignmentsDisplay/models/model.js.map +1 -1
- package/esm/LinearPileupDisplay/configSchema.js +20 -3
- package/esm/LinearPileupDisplay/configSchema.js.map +1 -1
- package/esm/LinearPileupDisplay/model.d.ts +88 -4
- package/esm/LinearPileupDisplay/model.js +616 -503
- package/esm/LinearPileupDisplay/model.js.map +1 -1
- package/esm/LinearSNPCoverageDisplay/models/configSchema.js +33 -4
- package/esm/LinearSNPCoverageDisplay/models/configSchema.js.map +1 -1
- package/esm/LinearSNPCoverageDisplay/models/model.d.ts +86 -3
- package/esm/LinearSNPCoverageDisplay/models/model.js +240 -159
- package/esm/LinearSNPCoverageDisplay/models/model.js.map +1 -1
- package/esm/PileupRenderer/PileupRenderer.d.ts +1 -1
- package/esm/PileupRenderer/PileupRenderer.js +5 -6
- package/esm/PileupRenderer/PileupRenderer.js.map +1 -1
- package/esm/PileupRenderer/configSchema.d.ts +2 -2
- package/esm/PileupRenderer/configSchema.js +37 -2
- package/esm/PileupRenderer/configSchema.js.map +1 -1
- package/esm/SNPCoverageAdapter/configSchema.d.ts +2 -2
- package/esm/SNPCoverageAdapter/configSchema.js +11 -3
- package/esm/SNPCoverageAdapter/configSchema.js.map +1 -1
- package/esm/SNPCoverageRenderer/configSchema.d.ts +2 -2
- package/esm/SNPCoverageRenderer/configSchema.js +21 -1
- package/esm/SNPCoverageRenderer/configSchema.js.map +1 -1
- package/esm/SNPCoverageRenderer/index.d.ts +0 -1
- package/esm/SNPCoverageRenderer/index.js +1 -3
- package/esm/SNPCoverageRenderer/index.js.map +1 -1
- package/package.json +3 -3
- package/src/AlignmentsFeatureDetail/__snapshots__/index.test.js.snap +54 -54
- package/src/AlignmentsTrack/index.ts +18 -12
- package/src/BamAdapter/BamAdapter.ts +39 -39
- package/src/BamAdapter/configSchema.ts +57 -29
- package/src/CramAdapter/CramAdapter.test.ts +1 -2
- package/src/CramAdapter/CramAdapter.ts +83 -84
- package/src/CramAdapter/CramSlightlyLazyFeature.ts +34 -25
- package/src/CramAdapter/configSchema.ts +55 -30
- package/src/CramAdapter/index.ts +2 -2
- package/src/HtsgetBamAdapter/HtsgetBamAdapter.ts +14 -21
- package/src/HtsgetBamAdapter/configSchema.ts +36 -19
- package/src/LinearAlignmentsDisplay/models/configSchema.ts +23 -10
- package/src/LinearAlignmentsDisplay/models/model.tsx +99 -4
- package/src/LinearPileupDisplay/configSchema.ts +23 -5
- package/src/LinearPileupDisplay/model.ts +120 -4
- package/src/LinearSNPCoverageDisplay/models/configSchema.ts +36 -9
- package/src/LinearSNPCoverageDisplay/models/model.ts +83 -4
- package/src/PileupRenderer/PileupRenderer.tsx +5 -9
- package/src/PileupRenderer/configSchema.ts +39 -2
- package/src/SNPCoverageAdapter/configSchema.ts +18 -10
- package/src/SNPCoverageRenderer/configSchema.ts +23 -1
- package/src/SNPCoverageRenderer/index.ts +1 -8
- package/src/declare.d.ts +0 -1
|
@@ -8,7 +8,6 @@ import {
|
|
|
8
8
|
} from '@jbrowse/core/configuration'
|
|
9
9
|
import { linearWiggleDisplayModelFactory } from '@jbrowse/plugin-wiggle'
|
|
10
10
|
import { LinearGenomeViewModel } from '@jbrowse/plugin-linear-genome-view'
|
|
11
|
-
|
|
12
11
|
import PluginManager from '@jbrowse/core/PluginManager'
|
|
13
12
|
import { getContainingView } from '@jbrowse/core/util'
|
|
14
13
|
|
|
@@ -21,19 +20,38 @@ const rendererTypes = new Map([['snpcoverage', 'SNPCoverageRenderer']])
|
|
|
21
20
|
|
|
22
21
|
type LGV = LinearGenomeViewModel
|
|
23
22
|
|
|
24
|
-
|
|
23
|
+
/**
|
|
24
|
+
* #stateModel LinearSNPCoverageDisplay
|
|
25
|
+
* extends `LinearWiggleDisplay`
|
|
26
|
+
*/
|
|
27
|
+
function stateModelFactory(
|
|
25
28
|
pluginManager: PluginManager,
|
|
26
29
|
configSchema: AnyConfigurationSchemaType,
|
|
27
|
-
)
|
|
28
|
-
types
|
|
30
|
+
) {
|
|
31
|
+
return types
|
|
29
32
|
.compose(
|
|
30
33
|
'LinearSNPCoverageDisplay',
|
|
31
34
|
linearWiggleDisplayModelFactory(pluginManager, configSchema),
|
|
32
35
|
types.model({
|
|
36
|
+
/**
|
|
37
|
+
* #property
|
|
38
|
+
*/
|
|
33
39
|
type: types.literal('LinearSNPCoverageDisplay'),
|
|
40
|
+
/**
|
|
41
|
+
* #property
|
|
42
|
+
*/
|
|
34
43
|
drawInterbaseCounts: types.maybe(types.boolean),
|
|
44
|
+
/**
|
|
45
|
+
* #property
|
|
46
|
+
*/
|
|
35
47
|
drawIndicators: types.maybe(types.boolean),
|
|
48
|
+
/**
|
|
49
|
+
* #property
|
|
50
|
+
*/
|
|
36
51
|
drawArcs: types.maybe(types.boolean),
|
|
52
|
+
/**
|
|
53
|
+
* #property
|
|
54
|
+
*/
|
|
37
55
|
filterBy: types.optional(
|
|
38
56
|
types.model({
|
|
39
57
|
flagInclude: types.optional(types.number, 0),
|
|
@@ -45,6 +63,9 @@ const stateModelFactory = (
|
|
|
45
63
|
}),
|
|
46
64
|
{},
|
|
47
65
|
),
|
|
66
|
+
/**
|
|
67
|
+
* #property
|
|
68
|
+
*/
|
|
48
69
|
colorBy: types.maybe(
|
|
49
70
|
types.model({
|
|
50
71
|
type: types.string,
|
|
@@ -57,9 +78,15 @@ const stateModelFactory = (
|
|
|
57
78
|
modificationTagMap: observable.map({}),
|
|
58
79
|
}))
|
|
59
80
|
.actions(self => ({
|
|
81
|
+
/**
|
|
82
|
+
* #action
|
|
83
|
+
*/
|
|
60
84
|
setConfig(configuration: AnyConfigurationModel) {
|
|
61
85
|
self.configuration = configuration
|
|
62
86
|
},
|
|
87
|
+
/**
|
|
88
|
+
* #action
|
|
89
|
+
*/
|
|
63
90
|
setFilterBy(filter: {
|
|
64
91
|
flagInclude: number
|
|
65
92
|
flagExclude: number
|
|
@@ -68,10 +95,16 @@ const stateModelFactory = (
|
|
|
68
95
|
}) {
|
|
69
96
|
self.filterBy = cast(filter)
|
|
70
97
|
},
|
|
98
|
+
/**
|
|
99
|
+
* #action
|
|
100
|
+
*/
|
|
71
101
|
setColorBy(colorBy?: { type: string; tag?: string }) {
|
|
72
102
|
self.colorBy = cast(colorBy)
|
|
73
103
|
},
|
|
74
104
|
|
|
105
|
+
/**
|
|
106
|
+
* #action
|
|
107
|
+
*/
|
|
75
108
|
updateModificationColorMap(uniqueModifications: string[]) {
|
|
76
109
|
const colorPalette = ['red', 'blue', 'green', 'orange', 'purple']
|
|
77
110
|
let i = 0
|
|
@@ -87,6 +120,9 @@ const stateModelFactory = (
|
|
|
87
120
|
.views(self => {
|
|
88
121
|
const { renderProps: superRenderProps } = self
|
|
89
122
|
return {
|
|
123
|
+
/**
|
|
124
|
+
* #getter
|
|
125
|
+
*/
|
|
90
126
|
get rendererConfig() {
|
|
91
127
|
const configBlob =
|
|
92
128
|
getConf(self, ['renderers', self.rendererTypeName]) || {}
|
|
@@ -102,17 +138,26 @@ const stateModelFactory = (
|
|
|
102
138
|
getEnv(self),
|
|
103
139
|
)
|
|
104
140
|
},
|
|
141
|
+
/**
|
|
142
|
+
* #getter
|
|
143
|
+
*/
|
|
105
144
|
get drawArcsSetting() {
|
|
106
145
|
return (
|
|
107
146
|
self.drawArcs ?? readConfObject(this.rendererConfig, 'drawArcs')
|
|
108
147
|
)
|
|
109
148
|
},
|
|
149
|
+
/**
|
|
150
|
+
* #getter
|
|
151
|
+
*/
|
|
110
152
|
get drawInterbaseCountsSetting() {
|
|
111
153
|
return (
|
|
112
154
|
self.drawInterbaseCounts ??
|
|
113
155
|
readConfObject(this.rendererConfig, 'drawInterbaseCounts')
|
|
114
156
|
)
|
|
115
157
|
},
|
|
158
|
+
/**
|
|
159
|
+
* #getter
|
|
160
|
+
*/
|
|
116
161
|
get drawIndicatorsSetting() {
|
|
117
162
|
return (
|
|
118
163
|
self.drawIndicators ??
|
|
@@ -120,6 +165,9 @@ const stateModelFactory = (
|
|
|
120
165
|
)
|
|
121
166
|
},
|
|
122
167
|
|
|
168
|
+
/**
|
|
169
|
+
* #getter
|
|
170
|
+
*/
|
|
123
171
|
get modificationsReady() {
|
|
124
172
|
return self.colorBy?.type === 'modifications'
|
|
125
173
|
? Object.keys(JSON.parse(JSON.stringify(self.modificationTagMap)))
|
|
@@ -127,6 +175,9 @@ const stateModelFactory = (
|
|
|
127
175
|
: true
|
|
128
176
|
},
|
|
129
177
|
|
|
178
|
+
/**
|
|
179
|
+
* #method
|
|
180
|
+
*/
|
|
130
181
|
renderProps() {
|
|
131
182
|
const superProps = superRenderProps()
|
|
132
183
|
const { colorBy, filterBy, modificationTagMap } = self
|
|
@@ -144,12 +195,21 @@ const stateModelFactory = (
|
|
|
144
195
|
}
|
|
145
196
|
})
|
|
146
197
|
.actions(self => ({
|
|
198
|
+
/**
|
|
199
|
+
* #action
|
|
200
|
+
*/
|
|
147
201
|
toggleDrawIndicators() {
|
|
148
202
|
self.drawIndicators = !self.drawIndicatorsSetting
|
|
149
203
|
},
|
|
204
|
+
/**
|
|
205
|
+
* #action
|
|
206
|
+
*/
|
|
150
207
|
toggleDrawInterbaseCounts() {
|
|
151
208
|
self.drawInterbaseCounts = !self.drawInterbaseCountsSetting
|
|
152
209
|
},
|
|
210
|
+
/**
|
|
211
|
+
* #action
|
|
212
|
+
*/
|
|
153
213
|
toggleDrawArcs() {
|
|
154
214
|
self.drawArcs = !self.drawArcsSetting
|
|
155
215
|
},
|
|
@@ -195,10 +255,16 @@ const stateModelFactory = (
|
|
|
195
255
|
.views(self => {
|
|
196
256
|
const { trackMenuItems: superTrackMenuItems } = self
|
|
197
257
|
return {
|
|
258
|
+
/**
|
|
259
|
+
* #getter
|
|
260
|
+
*/
|
|
198
261
|
get TooltipComponent() {
|
|
199
262
|
return Tooltip
|
|
200
263
|
},
|
|
201
264
|
|
|
265
|
+
/**
|
|
266
|
+
* #getter
|
|
267
|
+
*/
|
|
202
268
|
get adapterConfig() {
|
|
203
269
|
const subadapter = getConf(self.parentTrack, 'adapter')
|
|
204
270
|
return {
|
|
@@ -207,18 +273,30 @@ const stateModelFactory = (
|
|
|
207
273
|
}
|
|
208
274
|
},
|
|
209
275
|
|
|
276
|
+
/**
|
|
277
|
+
* #getter
|
|
278
|
+
*/
|
|
210
279
|
get rendererTypeName() {
|
|
211
280
|
return rendererTypes.get('snpcoverage')
|
|
212
281
|
},
|
|
213
282
|
|
|
283
|
+
/**
|
|
284
|
+
* #getter
|
|
285
|
+
*/
|
|
214
286
|
get needsScalebar() {
|
|
215
287
|
return true
|
|
216
288
|
},
|
|
217
289
|
|
|
290
|
+
/**
|
|
291
|
+
* #method
|
|
292
|
+
*/
|
|
218
293
|
contextMenuItems() {
|
|
219
294
|
return []
|
|
220
295
|
},
|
|
221
296
|
|
|
297
|
+
/**
|
|
298
|
+
* #method
|
|
299
|
+
*/
|
|
222
300
|
trackMenuItems() {
|
|
223
301
|
return [
|
|
224
302
|
...superTrackMenuItems(),
|
|
@@ -244,6 +322,7 @@ const stateModelFactory = (
|
|
|
244
322
|
},
|
|
245
323
|
}
|
|
246
324
|
})
|
|
325
|
+
}
|
|
247
326
|
|
|
248
327
|
export type SNPCoverageDisplayModel = ReturnType<typeof stateModelFactory>
|
|
249
328
|
|
|
@@ -150,7 +150,7 @@ export default class PileupRenderer extends BoxRendererType {
|
|
|
150
150
|
|
|
151
151
|
// get width and height of chars the height is an approximation: width
|
|
152
152
|
// letter M is approximately the height
|
|
153
|
-
getCharWidthHeight(
|
|
153
|
+
getCharWidthHeight() {
|
|
154
154
|
const charWidth = measureText('A')
|
|
155
155
|
const charHeight = measureText('M') - 2
|
|
156
156
|
return { charWidth, charHeight }
|
|
@@ -237,11 +237,7 @@ export default class PileupRenderer extends BoxRendererType {
|
|
|
237
237
|
|
|
238
238
|
const maxClippingSize = readConfObject(config, 'maxClippingSize')
|
|
239
239
|
const { start, end } = region
|
|
240
|
-
const
|
|
241
|
-
const bpExpansion = Math.max(
|
|
242
|
-
len,
|
|
243
|
-
showSoftClip ? Math.round(maxClippingSize) : 0,
|
|
244
|
-
)
|
|
240
|
+
const bpExpansion = showSoftClip ? Math.round(maxClippingSize) : 0
|
|
245
241
|
|
|
246
242
|
return {
|
|
247
243
|
// xref https://github.com/mobxjs/mobx-state-tree/issues/1524 for Omit
|
|
@@ -1058,7 +1054,7 @@ export default class PileupRenderer extends BoxRendererType {
|
|
|
1058
1054
|
const minFeatWidth = readConfObject(config, 'minSubfeatureWidth')
|
|
1059
1055
|
const mismatches: Mismatch[] = feature.get('mismatches')
|
|
1060
1056
|
const seq = feature.get('seq')
|
|
1061
|
-
const { charWidth, charHeight } = this.getCharWidthHeight(
|
|
1057
|
+
const { charWidth, charHeight } = this.getCharWidthHeight()
|
|
1062
1058
|
const { bases } = theme.palette
|
|
1063
1059
|
const colorForBase: { [key: string]: string } = {
|
|
1064
1060
|
A: bases.A.main,
|
|
@@ -1161,7 +1157,7 @@ export default class PileupRenderer extends BoxRendererType {
|
|
|
1161
1157
|
}
|
|
1162
1158
|
ctx.font = 'bold 10px Courier New,monospace'
|
|
1163
1159
|
|
|
1164
|
-
const { charWidth, charHeight } = this.getCharWidthHeight(
|
|
1160
|
+
const { charWidth, charHeight } = this.getCharWidthHeight()
|
|
1165
1161
|
const drawSNPsMuted = shouldDrawSNPsMuted(colorBy?.type)
|
|
1166
1162
|
const drawIndels = shouldDrawIndels(colorBy?.type)
|
|
1167
1163
|
for (let i = 0; i < layoutRecords.length; i++) {
|
|
@@ -1271,13 +1267,13 @@ export default class PileupRenderer extends BoxRendererType {
|
|
|
1271
1267
|
const features = await this.getFeatures(renderProps)
|
|
1272
1268
|
const layout = this.createLayoutInWorker(renderProps)
|
|
1273
1269
|
const { regions, bpPerPx } = renderProps
|
|
1270
|
+
const [region] = regions
|
|
1274
1271
|
|
|
1275
1272
|
const layoutRecords = this.layoutFeats({
|
|
1276
1273
|
...renderProps,
|
|
1277
1274
|
features,
|
|
1278
1275
|
layout,
|
|
1279
1276
|
})
|
|
1280
|
-
const [region] = regions
|
|
1281
1277
|
|
|
1282
1278
|
// only need reference sequence if there are features and only for some
|
|
1283
1279
|
// cases
|
|
@@ -1,16 +1,28 @@
|
|
|
1
1
|
import { ConfigurationSchema } from '@jbrowse/core/configuration'
|
|
2
2
|
import { types } from 'mobx-state-tree'
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
/**
|
|
5
|
+
* #config PileupRenderer
|
|
6
|
+
*/
|
|
7
|
+
function x() {} // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
8
|
+
|
|
9
|
+
const PileupRenderer = ConfigurationSchema(
|
|
5
10
|
'PileupRenderer',
|
|
6
11
|
{
|
|
7
|
-
|
|
12
|
+
/**
|
|
13
|
+
* #slot
|
|
14
|
+
* default magenta here is used to detect the user has not customized this
|
|
15
|
+
*/
|
|
8
16
|
color: {
|
|
9
17
|
type: 'color',
|
|
10
18
|
description: 'the color of each feature in a pileup alignment',
|
|
11
19
|
defaultValue: '#f0f',
|
|
12
20
|
contextVariable: ['feature'],
|
|
13
21
|
},
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* #slot
|
|
25
|
+
*/
|
|
14
26
|
orientationType: {
|
|
15
27
|
type: 'stringEnum',
|
|
16
28
|
model: types.enumeration('orientationType', ['fr', 'rf', 'ff']),
|
|
@@ -18,6 +30,9 @@ export default ConfigurationSchema(
|
|
|
18
30
|
description:
|
|
19
31
|
'read sequencer orienation. fr is normal "reads pointing at each other ---> <--- while some other sequencers can use other options',
|
|
20
32
|
},
|
|
33
|
+
/**
|
|
34
|
+
* #slot
|
|
35
|
+
*/
|
|
21
36
|
displayMode: {
|
|
22
37
|
type: 'stringEnum',
|
|
23
38
|
model: types.enumeration('displayMode', [
|
|
@@ -28,39 +43,60 @@ export default ConfigurationSchema(
|
|
|
28
43
|
description: 'Alternative display modes',
|
|
29
44
|
defaultValue: 'normal',
|
|
30
45
|
},
|
|
46
|
+
/**
|
|
47
|
+
* #slot
|
|
48
|
+
*/
|
|
31
49
|
minSubfeatureWidth: {
|
|
32
50
|
type: 'number',
|
|
33
51
|
description:
|
|
34
52
|
'the minimum width in px for a pileup mismatch feature. use for increasing/decreasing mismatch marker widths when zoomed out, e.g. 0 or 1',
|
|
35
53
|
defaultValue: 0.7,
|
|
36
54
|
},
|
|
55
|
+
/**
|
|
56
|
+
* #slot
|
|
57
|
+
*/
|
|
37
58
|
maxHeight: {
|
|
38
59
|
type: 'integer',
|
|
39
60
|
description: 'the maximum height to be used in a pileup rendering',
|
|
40
61
|
defaultValue: 1200,
|
|
41
62
|
},
|
|
63
|
+
/**
|
|
64
|
+
* #slot
|
|
65
|
+
*/
|
|
42
66
|
maxClippingSize: {
|
|
43
67
|
type: 'integer',
|
|
44
68
|
description: 'the max clip size to be used in a pileup rendering',
|
|
45
69
|
defaultValue: 10000,
|
|
46
70
|
},
|
|
71
|
+
/**
|
|
72
|
+
* #slot
|
|
73
|
+
*/
|
|
47
74
|
height: {
|
|
48
75
|
type: 'number',
|
|
49
76
|
description: 'the height of each feature in a pileup alignment',
|
|
50
77
|
defaultValue: 7,
|
|
51
78
|
contextVariable: ['feature'],
|
|
52
79
|
},
|
|
80
|
+
/**
|
|
81
|
+
* #slot
|
|
82
|
+
*/
|
|
53
83
|
noSpacing: {
|
|
54
84
|
type: 'boolean',
|
|
55
85
|
description: 'remove spacing between features',
|
|
56
86
|
defaultValue: false,
|
|
57
87
|
},
|
|
88
|
+
/**
|
|
89
|
+
* #slot
|
|
90
|
+
*/
|
|
58
91
|
largeInsertionIndicatorScale: {
|
|
59
92
|
type: 'number',
|
|
60
93
|
description:
|
|
61
94
|
'scale at which to draw the large insertion indicators (bp/pixel)',
|
|
62
95
|
defaultValue: 10,
|
|
63
96
|
},
|
|
97
|
+
/**
|
|
98
|
+
* #slot
|
|
99
|
+
*/
|
|
64
100
|
mismatchAlpha: {
|
|
65
101
|
type: 'boolean',
|
|
66
102
|
defaultValue: false,
|
|
@@ -69,3 +105,4 @@ export default ConfigurationSchema(
|
|
|
69
105
|
},
|
|
70
106
|
{ explicitlyTyped: true },
|
|
71
107
|
)
|
|
108
|
+
export default PileupRenderer
|
|
@@ -1,14 +1,22 @@
|
|
|
1
1
|
import { ConfigurationSchema } from '@jbrowse/core/configuration'
|
|
2
2
|
import PluginManager from '@jbrowse/core/PluginManager'
|
|
3
|
-
import { types } from 'mobx-state-tree'
|
|
4
3
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
4
|
+
/**
|
|
5
|
+
* #config SNPCoverageAdapter
|
|
6
|
+
*/
|
|
7
|
+
function x() {} // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
8
|
+
|
|
9
|
+
const SNPCoverageAdapter = (pluginManager: PluginManager) =>
|
|
10
|
+
ConfigurationSchema(
|
|
11
|
+
'SNPCoverageAdapter',
|
|
12
|
+
{
|
|
13
|
+
/**
|
|
14
|
+
* #slot
|
|
15
|
+
* normally refers to a BAM or CRAM adapter
|
|
16
|
+
*/
|
|
17
|
+
subadapter: pluginManager.pluggableConfigSchemaType('adapter'),
|
|
18
|
+
},
|
|
19
|
+
{ explicitlyTyped: true },
|
|
14
20
|
)
|
|
21
|
+
|
|
22
|
+
export default SNPCoverageAdapter
|
|
@@ -1,30 +1,50 @@
|
|
|
1
1
|
import { ConfigurationSchema } from '@jbrowse/core/configuration'
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
/**
|
|
4
|
+
* #config SNPCoverageRenderer
|
|
5
|
+
*/
|
|
6
|
+
function x() {} // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
7
|
+
|
|
8
|
+
const SNPCoverageRenderer = ConfigurationSchema(
|
|
4
9
|
'SNPCoverageRenderer',
|
|
5
10
|
{
|
|
11
|
+
/**
|
|
12
|
+
* #slot
|
|
13
|
+
*/
|
|
6
14
|
clipColor: {
|
|
7
15
|
type: 'color',
|
|
8
16
|
description: 'the color of the clipping marker',
|
|
9
17
|
defaultValue: 'red',
|
|
10
18
|
},
|
|
19
|
+
/**
|
|
20
|
+
* #slot
|
|
21
|
+
*/
|
|
11
22
|
indicatorThreshold: {
|
|
12
23
|
type: 'number',
|
|
13
24
|
description:
|
|
14
25
|
'the proportion of reads containing a insertion/clip indicator',
|
|
15
26
|
defaultValue: 0.4,
|
|
16
27
|
},
|
|
28
|
+
/**
|
|
29
|
+
* #slot
|
|
30
|
+
*/
|
|
17
31
|
drawArcs: {
|
|
18
32
|
type: 'boolean',
|
|
19
33
|
description: 'Draw sashimi-style arcs for intron features',
|
|
20
34
|
defaultValue: true,
|
|
21
35
|
},
|
|
36
|
+
/**
|
|
37
|
+
* #slot
|
|
38
|
+
*/
|
|
22
39
|
drawInterbaseCounts: {
|
|
23
40
|
type: 'boolean',
|
|
24
41
|
description:
|
|
25
42
|
'draw count "upsidedown histogram" of the interbase events that don\'t contribute to the coverage count so are not drawn in the normal histogram',
|
|
26
43
|
defaultValue: true,
|
|
27
44
|
},
|
|
45
|
+
/**
|
|
46
|
+
* #slot
|
|
47
|
+
*/
|
|
28
48
|
drawIndicators: {
|
|
29
49
|
type: 'boolean',
|
|
30
50
|
description:
|
|
@@ -34,3 +54,5 @@ export default ConfigurationSchema(
|
|
|
34
54
|
},
|
|
35
55
|
{ explicitlyTyped: true },
|
|
36
56
|
)
|
|
57
|
+
|
|
58
|
+
export default SNPCoverageRenderer
|
|
@@ -1,16 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
import ConfigSchema from './configSchema'
|
|
1
|
+
import configSchema from './configSchema'
|
|
3
2
|
import PluginManager from '@jbrowse/core/PluginManager'
|
|
4
3
|
import SNPCoverageRenderer from './SNPCoverageRenderer'
|
|
5
4
|
|
|
6
5
|
import { WiggleRendering } from '@jbrowse/plugin-wiggle'
|
|
7
6
|
|
|
8
|
-
export const configSchema = ConfigurationSchema(
|
|
9
|
-
'SNPCoverageRenderer',
|
|
10
|
-
{},
|
|
11
|
-
{ baseConfiguration: ConfigSchema, explicitlyTyped: true },
|
|
12
|
-
)
|
|
13
|
-
|
|
14
7
|
export default function register(pluginManager: PluginManager) {
|
|
15
8
|
pluginManager.addRendererType(
|
|
16
9
|
() =>
|
package/src/declare.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
declare module '@gmod/cram'
|