@jbrowse/plugin-variants 2.6.1 → 2.6.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/ChordVariantDisplay/index.js +0 -1
- package/dist/ChordVariantDisplay/models/configSchema.js +0 -1
- package/dist/ChordVariantDisplay/models/stateModelFactory.js +0 -1
- package/dist/LinearVariantDisplay/configSchema.js +0 -1
- package/dist/LinearVariantDisplay/index.js +0 -1
- package/dist/LinearVariantDisplay/model.js +0 -1
- package/dist/StructuralVariantChordRenderer/Chord.js +0 -1
- package/dist/StructuralVariantChordRenderer/ReactComponent.js +0 -1
- package/dist/StructuralVariantChordRenderer/configSchema.js +0 -1
- package/dist/StructuralVariantChordRenderer/index.js +0 -1
- package/dist/VariantFeatureWidget/AnnotGrid.js +0 -1
- package/dist/VariantFeatureWidget/BreakendOptionDialog.js +0 -1
- package/dist/VariantFeatureWidget/BreakendPanel.js +0 -1
- package/dist/VariantFeatureWidget/VariantAnnotationTable.js +0 -1
- package/dist/VariantFeatureWidget/VariantFeatureWidget.js +0 -1
- package/dist/VariantFeatureWidget/VariantSampleGrid.js +0 -1
- package/dist/VariantFeatureWidget/index.js +0 -1
- package/dist/VariantTrack/configSchema.js +0 -1
- package/dist/VariantTrack/index.js +0 -1
- package/dist/VcfAdapter/VcfAdapter.js +0 -1
- package/dist/VcfAdapter/configSchema.js +0 -1
- package/dist/VcfAdapter/index.js +0 -1
- package/dist/VcfFeature/index.js +2 -2
- package/dist/VcfFeature/util.js +0 -1
- package/dist/VcfTabixAdapter/VcfTabixAdapter.js +0 -1
- package/dist/VcfTabixAdapter/configSchema.js +0 -1
- package/dist/VcfTabixAdapter/index.js +0 -1
- package/dist/extensionPoints.js +0 -1
- package/dist/index.js +0 -1
- package/esm/ChordVariantDisplay/index.js +0 -1
- package/esm/ChordVariantDisplay/models/configSchema.js +0 -1
- package/esm/ChordVariantDisplay/models/stateModelFactory.js +0 -1
- package/esm/LinearVariantDisplay/configSchema.js +0 -1
- package/esm/LinearVariantDisplay/index.js +0 -1
- package/esm/LinearVariantDisplay/model.js +0 -1
- package/esm/StructuralVariantChordRenderer/Chord.js +0 -1
- package/esm/StructuralVariantChordRenderer/ReactComponent.js +0 -1
- package/esm/StructuralVariantChordRenderer/configSchema.js +0 -1
- package/esm/StructuralVariantChordRenderer/index.js +0 -1
- package/esm/VariantFeatureWidget/AnnotGrid.js +0 -1
- package/esm/VariantFeatureWidget/BreakendOptionDialog.js +0 -1
- package/esm/VariantFeatureWidget/BreakendPanel.js +0 -1
- package/esm/VariantFeatureWidget/VariantAnnotationTable.js +0 -1
- package/esm/VariantFeatureWidget/VariantFeatureWidget.js +0 -1
- package/esm/VariantFeatureWidget/VariantSampleGrid.js +0 -1
- package/esm/VariantFeatureWidget/index.js +0 -1
- package/esm/VariantTrack/configSchema.js +0 -1
- package/esm/VariantTrack/index.js +0 -1
- package/esm/VcfAdapter/VcfAdapter.js +0 -1
- package/esm/VcfAdapter/configSchema.js +0 -1
- package/esm/VcfAdapter/index.js +0 -1
- package/esm/VcfFeature/index.js +2 -2
- package/esm/VcfFeature/util.js +0 -1
- package/esm/VcfTabixAdapter/VcfTabixAdapter.js +0 -1
- package/esm/VcfTabixAdapter/configSchema.js +0 -1
- package/esm/VcfTabixAdapter/index.js +0 -1
- package/esm/extensionPoints.js +0 -1
- package/esm/index.js +0 -1
- package/package.json +3 -4
- package/dist/ChordVariantDisplay/index.js.map +0 -1
- package/dist/ChordVariantDisplay/models/configSchema.js.map +0 -1
- package/dist/ChordVariantDisplay/models/stateModelFactory.js.map +0 -1
- package/dist/LinearVariantDisplay/configSchema.js.map +0 -1
- package/dist/LinearVariantDisplay/index.js.map +0 -1
- package/dist/LinearVariantDisplay/model.js.map +0 -1
- package/dist/StructuralVariantChordRenderer/Chord.js.map +0 -1
- package/dist/StructuralVariantChordRenderer/ReactComponent.js.map +0 -1
- package/dist/StructuralVariantChordRenderer/configSchema.js.map +0 -1
- package/dist/StructuralVariantChordRenderer/index.js.map +0 -1
- package/dist/VariantFeatureWidget/AnnotGrid.js.map +0 -1
- package/dist/VariantFeatureWidget/BreakendOptionDialog.js.map +0 -1
- package/dist/VariantFeatureWidget/BreakendPanel.js.map +0 -1
- package/dist/VariantFeatureWidget/VariantAnnotationTable.js.map +0 -1
- package/dist/VariantFeatureWidget/VariantFeatureWidget.js.map +0 -1
- package/dist/VariantFeatureWidget/VariantSampleGrid.js.map +0 -1
- package/dist/VariantFeatureWidget/index.js.map +0 -1
- package/dist/VariantTrack/configSchema.js.map +0 -1
- package/dist/VariantTrack/index.js.map +0 -1
- package/dist/VcfAdapter/VcfAdapter.js.map +0 -1
- package/dist/VcfAdapter/configSchema.js.map +0 -1
- package/dist/VcfAdapter/index.js.map +0 -1
- package/dist/VcfFeature/index.js.map +0 -1
- package/dist/VcfFeature/util.js.map +0 -1
- package/dist/VcfTabixAdapter/VcfTabixAdapter.js.map +0 -1
- package/dist/VcfTabixAdapter/configSchema.js.map +0 -1
- package/dist/VcfTabixAdapter/index.js.map +0 -1
- package/dist/extensionPoints.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/esm/ChordVariantDisplay/index.js.map +0 -1
- package/esm/ChordVariantDisplay/models/configSchema.js.map +0 -1
- package/esm/ChordVariantDisplay/models/stateModelFactory.js.map +0 -1
- package/esm/LinearVariantDisplay/configSchema.js.map +0 -1
- package/esm/LinearVariantDisplay/index.js.map +0 -1
- package/esm/LinearVariantDisplay/model.js.map +0 -1
- package/esm/StructuralVariantChordRenderer/Chord.js.map +0 -1
- package/esm/StructuralVariantChordRenderer/ReactComponent.js.map +0 -1
- package/esm/StructuralVariantChordRenderer/configSchema.js.map +0 -1
- package/esm/StructuralVariantChordRenderer/index.js.map +0 -1
- package/esm/VariantFeatureWidget/AnnotGrid.js.map +0 -1
- package/esm/VariantFeatureWidget/BreakendOptionDialog.js.map +0 -1
- package/esm/VariantFeatureWidget/BreakendPanel.js.map +0 -1
- package/esm/VariantFeatureWidget/VariantAnnotationTable.js.map +0 -1
- package/esm/VariantFeatureWidget/VariantFeatureWidget.js.map +0 -1
- package/esm/VariantFeatureWidget/VariantSampleGrid.js.map +0 -1
- package/esm/VariantFeatureWidget/index.js.map +0 -1
- package/esm/VariantTrack/configSchema.js.map +0 -1
- package/esm/VariantTrack/index.js.map +0 -1
- package/esm/VcfAdapter/VcfAdapter.js.map +0 -1
- package/esm/VcfAdapter/configSchema.js.map +0 -1
- package/esm/VcfAdapter/index.js.map +0 -1
- package/esm/VcfFeature/index.js.map +0 -1
- package/esm/VcfFeature/util.js.map +0 -1
- package/esm/VcfTabixAdapter/VcfTabixAdapter.js.map +0 -1
- package/esm/VcfTabixAdapter/configSchema.js.map +0 -1
- package/esm/VcfTabixAdapter/index.js.map +0 -1
- package/esm/extensionPoints.js.map +0 -1
- package/esm/index.js.map +0 -1
- package/src/ChordVariantDisplay/index.ts +0 -23
- package/src/ChordVariantDisplay/models/configSchema.ts +0 -33
- package/src/ChordVariantDisplay/models/stateModelFactory.ts +0 -63
- package/src/LinearVariantDisplay/configSchema.ts +0 -30
- package/src/LinearVariantDisplay/index.ts +0 -20
- package/src/LinearVariantDisplay/model.ts +0 -76
- package/src/StructuralVariantChordRenderer/Chord.tsx +0 -141
- package/src/StructuralVariantChordRenderer/ReactComponent.tsx +0 -78
- package/src/StructuralVariantChordRenderer/configSchema.ts +0 -42
- package/src/StructuralVariantChordRenderer/index.ts +0 -17
- package/src/VariantFeatureWidget/AnnotGrid.tsx +0 -51
- package/src/VariantFeatureWidget/BreakendOptionDialog.tsx +0 -117
- package/src/VariantFeatureWidget/BreakendPanel.tsx +0 -93
- package/src/VariantFeatureWidget/VariantAnnotationTable.tsx +0 -27
- package/src/VariantFeatureWidget/VariantFeatureWidget.test.tsx +0 -42
- package/src/VariantFeatureWidget/VariantFeatureWidget.tsx +0 -112
- package/src/VariantFeatureWidget/VariantSampleGrid.tsx +0 -151
- package/src/VariantFeatureWidget/__snapshots__/VariantFeatureWidget.test.tsx.snap +0 -244
- package/src/VariantFeatureWidget/index.ts +0 -32
- package/src/VariantTrack/configSchema.ts +0 -24
- package/src/VariantTrack/index.ts +0 -16
- package/src/VcfAdapter/VcfAdapter.test.ts +0 -28
- package/src/VcfAdapter/VcfAdapter.ts +0 -125
- package/src/VcfAdapter/__snapshots__/VcfAdapter.test.ts.snap +0 -325
- package/src/VcfAdapter/configSchema.ts +0 -22
- package/src/VcfAdapter/index.ts +0 -15
- package/src/VcfAdapter/test_data/volvox.filtered.vcf +0 -73
- package/src/VcfFeature/index.test.ts +0 -132
- package/src/VcfFeature/index.ts +0 -104
- package/src/VcfFeature/util.ts +0 -138
- package/src/VcfTabixAdapter/VcfTabixAdapter.test.ts +0 -69
- package/src/VcfTabixAdapter/VcfTabixAdapter.ts +0 -90
- package/src/VcfTabixAdapter/__snapshots__/VcfTabixAdapter.test.ts.snap +0 -325
- package/src/VcfTabixAdapter/configSchema.ts +0 -43
- package/src/VcfTabixAdapter/index.ts +0 -17
- package/src/VcfTabixAdapter/test_data/volvox.filtered.vcf.gz +0 -0
- package/src/VcfTabixAdapter/test_data/volvox.filtered.vcf.gz.csi +0 -0
- package/src/VcfTabixAdapter/test_data/volvox.filtered.vcf.gz.tbi +0 -0
- package/src/__snapshots__/index.test.ts.snap +0 -20
- package/src/extensionPoints.ts +0 -74
- package/src/index.test.ts +0 -32
- package/src/index.ts +0 -27
|
@@ -1,325 +0,0 @@
|
|
|
1
|
-
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
-
|
|
3
|
-
exports[`adapter can fetch variants from volvox.vcf 1`] = `
|
|
4
|
-
[
|
|
5
|
-
"ctgA",
|
|
6
|
-
]
|
|
7
|
-
`;
|
|
8
|
-
|
|
9
|
-
exports[`adapter can fetch variants from volvox.vcf 2`] = `
|
|
10
|
-
[
|
|
11
|
-
{
|
|
12
|
-
"ALT": [
|
|
13
|
-
"C",
|
|
14
|
-
],
|
|
15
|
-
"CHROM": "ctgA",
|
|
16
|
-
"FILTER": null,
|
|
17
|
-
"ID": null,
|
|
18
|
-
"INFO": {
|
|
19
|
-
"AC1": [
|
|
20
|
-
2,
|
|
21
|
-
],
|
|
22
|
-
"AF1": [
|
|
23
|
-
1,
|
|
24
|
-
],
|
|
25
|
-
"DP": [
|
|
26
|
-
3,
|
|
27
|
-
],
|
|
28
|
-
"DP4": [
|
|
29
|
-
0,
|
|
30
|
-
0,
|
|
31
|
-
3,
|
|
32
|
-
0,
|
|
33
|
-
],
|
|
34
|
-
"FQ": [
|
|
35
|
-
-36,
|
|
36
|
-
],
|
|
37
|
-
"MQ": [
|
|
38
|
-
37,
|
|
39
|
-
],
|
|
40
|
-
"VDB": [
|
|
41
|
-
0.0186,
|
|
42
|
-
],
|
|
43
|
-
},
|
|
44
|
-
"POS": 277,
|
|
45
|
-
"QUAL": 10.4,
|
|
46
|
-
"REF": "T",
|
|
47
|
-
"aliases": undefined,
|
|
48
|
-
"description": "SNV T -> C",
|
|
49
|
-
"end": 277,
|
|
50
|
-
"name": undefined,
|
|
51
|
-
"refName": "ctgA",
|
|
52
|
-
"samples": {
|
|
53
|
-
"sample_data/raw/volvox/volvox-sorted.bam": {
|
|
54
|
-
"GQ": [
|
|
55
|
-
13,
|
|
56
|
-
],
|
|
57
|
-
"GT": [
|
|
58
|
-
"1/1",
|
|
59
|
-
],
|
|
60
|
-
"PL": [
|
|
61
|
-
42,
|
|
62
|
-
9,
|
|
63
|
-
0,
|
|
64
|
-
],
|
|
65
|
-
},
|
|
66
|
-
},
|
|
67
|
-
"start": 276,
|
|
68
|
-
"type": "SNV",
|
|
69
|
-
"uniqueId": "test-0",
|
|
70
|
-
},
|
|
71
|
-
{
|
|
72
|
-
"ALT": [
|
|
73
|
-
"C",
|
|
74
|
-
],
|
|
75
|
-
"CHROM": "ctgA",
|
|
76
|
-
"FILTER": null,
|
|
77
|
-
"ID": null,
|
|
78
|
-
"INFO": {
|
|
79
|
-
"AC1": [
|
|
80
|
-
2,
|
|
81
|
-
],
|
|
82
|
-
"AF1": [
|
|
83
|
-
1,
|
|
84
|
-
],
|
|
85
|
-
"DP": [
|
|
86
|
-
23,
|
|
87
|
-
],
|
|
88
|
-
"DP4": [
|
|
89
|
-
0,
|
|
90
|
-
1,
|
|
91
|
-
8,
|
|
92
|
-
14,
|
|
93
|
-
],
|
|
94
|
-
"FQ": [
|
|
95
|
-
-73,
|
|
96
|
-
],
|
|
97
|
-
"MQ": [
|
|
98
|
-
37,
|
|
99
|
-
],
|
|
100
|
-
"PV4": [
|
|
101
|
-
1,
|
|
102
|
-
1,
|
|
103
|
-
0.42,
|
|
104
|
-
1,
|
|
105
|
-
],
|
|
106
|
-
"VDB": [
|
|
107
|
-
0.0308,
|
|
108
|
-
],
|
|
109
|
-
},
|
|
110
|
-
"POS": 1694,
|
|
111
|
-
"QUAL": 107,
|
|
112
|
-
"REF": "T",
|
|
113
|
-
"aliases": undefined,
|
|
114
|
-
"description": "SNV T -> C",
|
|
115
|
-
"end": 1694,
|
|
116
|
-
"name": undefined,
|
|
117
|
-
"refName": "ctgA",
|
|
118
|
-
"samples": {
|
|
119
|
-
"sample_data/raw/volvox/volvox-sorted.bam": {
|
|
120
|
-
"GQ": [
|
|
121
|
-
89,
|
|
122
|
-
],
|
|
123
|
-
"GT": [
|
|
124
|
-
"1/1",
|
|
125
|
-
],
|
|
126
|
-
"PL": [
|
|
127
|
-
140,
|
|
128
|
-
46,
|
|
129
|
-
0,
|
|
130
|
-
],
|
|
131
|
-
},
|
|
132
|
-
},
|
|
133
|
-
"start": 1693,
|
|
134
|
-
"type": "SNV",
|
|
135
|
-
"uniqueId": "test-1",
|
|
136
|
-
},
|
|
137
|
-
{
|
|
138
|
-
"ALT": [
|
|
139
|
-
"G",
|
|
140
|
-
],
|
|
141
|
-
"CHROM": "ctgA",
|
|
142
|
-
"FILTER": null,
|
|
143
|
-
"ID": null,
|
|
144
|
-
"INFO": {
|
|
145
|
-
"AC1": [
|
|
146
|
-
1,
|
|
147
|
-
],
|
|
148
|
-
"AF1": [
|
|
149
|
-
0.5,
|
|
150
|
-
],
|
|
151
|
-
"DP": [
|
|
152
|
-
22,
|
|
153
|
-
],
|
|
154
|
-
"DP4": [
|
|
155
|
-
6,
|
|
156
|
-
5,
|
|
157
|
-
3,
|
|
158
|
-
8,
|
|
159
|
-
],
|
|
160
|
-
"FQ": [
|
|
161
|
-
45.3,
|
|
162
|
-
],
|
|
163
|
-
"MQ": [
|
|
164
|
-
37,
|
|
165
|
-
],
|
|
166
|
-
"PV4": [
|
|
167
|
-
0.39,
|
|
168
|
-
1,
|
|
169
|
-
1,
|
|
170
|
-
1,
|
|
171
|
-
],
|
|
172
|
-
"VDB": [
|
|
173
|
-
0.0253,
|
|
174
|
-
],
|
|
175
|
-
},
|
|
176
|
-
"POS": 2644,
|
|
177
|
-
"QUAL": 44,
|
|
178
|
-
"REF": "T",
|
|
179
|
-
"aliases": undefined,
|
|
180
|
-
"description": "SNV T -> G",
|
|
181
|
-
"end": 2644,
|
|
182
|
-
"name": undefined,
|
|
183
|
-
"refName": "ctgA",
|
|
184
|
-
"samples": {
|
|
185
|
-
"sample_data/raw/volvox/volvox-sorted.bam": {
|
|
186
|
-
"GQ": [
|
|
187
|
-
75,
|
|
188
|
-
],
|
|
189
|
-
"GT": [
|
|
190
|
-
"0/1",
|
|
191
|
-
],
|
|
192
|
-
"PL": [
|
|
193
|
-
74,
|
|
194
|
-
0,
|
|
195
|
-
77,
|
|
196
|
-
],
|
|
197
|
-
},
|
|
198
|
-
},
|
|
199
|
-
"start": 2643,
|
|
200
|
-
"type": "SNV",
|
|
201
|
-
"uniqueId": "test-2",
|
|
202
|
-
},
|
|
203
|
-
{
|
|
204
|
-
"ALT": [
|
|
205
|
-
"A",
|
|
206
|
-
],
|
|
207
|
-
"CHROM": "ctgA",
|
|
208
|
-
"FILTER": null,
|
|
209
|
-
"ID": null,
|
|
210
|
-
"INFO": {
|
|
211
|
-
"AC1": [
|
|
212
|
-
2,
|
|
213
|
-
],
|
|
214
|
-
"AF1": [
|
|
215
|
-
1,
|
|
216
|
-
],
|
|
217
|
-
"DP": [
|
|
218
|
-
19,
|
|
219
|
-
],
|
|
220
|
-
"DP4": [
|
|
221
|
-
0,
|
|
222
|
-
0,
|
|
223
|
-
8,
|
|
224
|
-
11,
|
|
225
|
-
],
|
|
226
|
-
"FQ": [
|
|
227
|
-
-84,
|
|
228
|
-
],
|
|
229
|
-
"MQ": [
|
|
230
|
-
36,
|
|
231
|
-
],
|
|
232
|
-
"VDB": [
|
|
233
|
-
0.0384,
|
|
234
|
-
],
|
|
235
|
-
},
|
|
236
|
-
"POS": 3213,
|
|
237
|
-
"QUAL": 124,
|
|
238
|
-
"REF": "T",
|
|
239
|
-
"aliases": undefined,
|
|
240
|
-
"description": "SNV T -> A",
|
|
241
|
-
"end": 3213,
|
|
242
|
-
"name": undefined,
|
|
243
|
-
"refName": "ctgA",
|
|
244
|
-
"samples": {
|
|
245
|
-
"sample_data/raw/volvox/volvox-sorted.bam": {
|
|
246
|
-
"GQ": [
|
|
247
|
-
99,
|
|
248
|
-
],
|
|
249
|
-
"GT": [
|
|
250
|
-
"1/1",
|
|
251
|
-
],
|
|
252
|
-
"PL": [
|
|
253
|
-
157,
|
|
254
|
-
57,
|
|
255
|
-
0,
|
|
256
|
-
],
|
|
257
|
-
},
|
|
258
|
-
},
|
|
259
|
-
"start": 3212,
|
|
260
|
-
"type": "SNV",
|
|
261
|
-
"uniqueId": "test-3",
|
|
262
|
-
},
|
|
263
|
-
{
|
|
264
|
-
"ALT": [
|
|
265
|
-
"ct",
|
|
266
|
-
],
|
|
267
|
-
"CHROM": "ctgA",
|
|
268
|
-
"FILTER": null,
|
|
269
|
-
"ID": null,
|
|
270
|
-
"INFO": {
|
|
271
|
-
"AC1": [
|
|
272
|
-
2,
|
|
273
|
-
],
|
|
274
|
-
"AF1": [
|
|
275
|
-
1,
|
|
276
|
-
],
|
|
277
|
-
"DP": [
|
|
278
|
-
15,
|
|
279
|
-
],
|
|
280
|
-
"DP4": [
|
|
281
|
-
0,
|
|
282
|
-
0,
|
|
283
|
-
5,
|
|
284
|
-
6,
|
|
285
|
-
],
|
|
286
|
-
"FQ": [
|
|
287
|
-
-67.5,
|
|
288
|
-
],
|
|
289
|
-
"INDEL": true,
|
|
290
|
-
"MQ": [
|
|
291
|
-
37,
|
|
292
|
-
],
|
|
293
|
-
"VDB": [
|
|
294
|
-
0.0384,
|
|
295
|
-
],
|
|
296
|
-
},
|
|
297
|
-
"POS": 3858,
|
|
298
|
-
"QUAL": 160,
|
|
299
|
-
"REF": "ctt",
|
|
300
|
-
"aliases": undefined,
|
|
301
|
-
"description": "deletion ctt -> ct",
|
|
302
|
-
"end": 3860,
|
|
303
|
-
"name": undefined,
|
|
304
|
-
"refName": "ctgA",
|
|
305
|
-
"samples": {
|
|
306
|
-
"sample_data/raw/volvox/volvox-sorted.bam": {
|
|
307
|
-
"GQ": [
|
|
308
|
-
63,
|
|
309
|
-
],
|
|
310
|
-
"GT": [
|
|
311
|
-
"1/1",
|
|
312
|
-
],
|
|
313
|
-
"PL": [
|
|
314
|
-
201,
|
|
315
|
-
33,
|
|
316
|
-
0,
|
|
317
|
-
],
|
|
318
|
-
},
|
|
319
|
-
},
|
|
320
|
-
"start": 3857,
|
|
321
|
-
"type": "deletion",
|
|
322
|
-
"uniqueId": "test-4",
|
|
323
|
-
},
|
|
324
|
-
]
|
|
325
|
-
`;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { ConfigurationSchema } from '@jbrowse/core/configuration'
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* #config VcfAdapter
|
|
5
|
-
*/
|
|
6
|
-
function x() {} // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
7
|
-
|
|
8
|
-
const VcfAdapter = ConfigurationSchema(
|
|
9
|
-
'VcfAdapter',
|
|
10
|
-
{
|
|
11
|
-
/**
|
|
12
|
-
* #slot
|
|
13
|
-
*/
|
|
14
|
-
vcfLocation: {
|
|
15
|
-
type: 'fileLocation',
|
|
16
|
-
defaultValue: { uri: '/path/to/my.vcf', locationType: 'UriLocation' },
|
|
17
|
-
},
|
|
18
|
-
},
|
|
19
|
-
{ explicitlyTyped: true },
|
|
20
|
-
)
|
|
21
|
-
|
|
22
|
-
export default VcfAdapter
|
package/src/VcfAdapter/index.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import PluginManager from '@jbrowse/core/PluginManager'
|
|
2
|
-
import AdapterType from '@jbrowse/core/pluggableElementTypes/AdapterType'
|
|
3
|
-
import configSchema from './configSchema'
|
|
4
|
-
|
|
5
|
-
export default (pluginManager: PluginManager) => {
|
|
6
|
-
pluginManager.addAdapterType(
|
|
7
|
-
() =>
|
|
8
|
-
new AdapterType({
|
|
9
|
-
name: 'VcfAdapter',
|
|
10
|
-
displayName: 'VCF adapter',
|
|
11
|
-
configSchema,
|
|
12
|
-
getAdapterClass: () => import('./VcfAdapter').then(r => r.default),
|
|
13
|
-
}),
|
|
14
|
-
)
|
|
15
|
-
}
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
##fileformat=VCFv4.1
|
|
2
|
-
##samtoolsVersion=0.1.18 (r982:295)
|
|
3
|
-
##INFO=<ID=DP,Number=1,Type=Integer,Description="Raw read depth">
|
|
4
|
-
##INFO=<ID=DP4,Number=4,Type=Integer,Description="# high-quality ref-forward bases, ref-reverse, alt-forward and alt-reverse bases">
|
|
5
|
-
##INFO=<ID=MQ,Number=1,Type=Integer,Description="Root-mean-square mapping quality of covering reads">
|
|
6
|
-
##INFO=<ID=FQ,Number=1,Type=Float,Description="Phred probability of all samples being the same">
|
|
7
|
-
##INFO=<ID=AF1,Number=1,Type=Float,Description="Max-likelihood estimate of the first ALT allele frequency (assuming HWE)">
|
|
8
|
-
##INFO=<ID=AC1,Number=1,Type=Float,Description="Max-likelihood estimate of the first ALT allele count (no HWE assumption)">
|
|
9
|
-
##INFO=<ID=G3,Number=3,Type=Float,Description="ML estimate of genotype frequencies">
|
|
10
|
-
##INFO=<ID=HWE,Number=1,Type=Float,Description="Chi^2 based HWE test P-value based on G3">
|
|
11
|
-
##INFO=<ID=CLR,Number=1,Type=Integer,Description="Log ratio of genotype likelihoods with and without the constraint">
|
|
12
|
-
##INFO=<ID=UGT,Number=1,Type=String,Description="The most probable unconstrained genotype configuration in the trio">
|
|
13
|
-
##INFO=<ID=CGT,Number=1,Type=String,Description="The most probable constrained genotype configuration in the trio">
|
|
14
|
-
##INFO=<ID=PV4,Number=4,Type=Float,Description="P-values for strand bias, baseQ bias, mapQ bias and tail distance bias">
|
|
15
|
-
##INFO=<ID=INDEL,Number=0,Type=Flag,Description="Indicates that the variant is an INDEL.">
|
|
16
|
-
##INFO=<ID=PC2,Number=2,Type=Integer,Description="Phred probability of the nonRef allele frequency in group1 samples being larger (,smaller) than in group2.">
|
|
17
|
-
##INFO=<ID=PCHI2,Number=1,Type=Float,Description="Posterior weighted chi^2 P-value for testing the association between group1 and group2 samples.">
|
|
18
|
-
##INFO=<ID=QCHI2,Number=1,Type=Integer,Description="Phred scaled PCHI2.">
|
|
19
|
-
##INFO=<ID=PR,Number=1,Type=Integer,Description="# permutations yielding a smaller PCHI2.">
|
|
20
|
-
##INFO=<ID=VDB,Number=1,Type=Float,Description="Variant Distance Bias">
|
|
21
|
-
##FORMAT=<ID=GT,Number=1,Type=String,Description="Genotype">
|
|
22
|
-
##FORMAT=<ID=GQ,Number=1,Type=Integer,Description="Genotype Quality">
|
|
23
|
-
##FORMAT=<ID=GL,Number=3,Type=Float,Description="Likelihoods for RR,RA,AA genotypes (R=ref,A=alt)">
|
|
24
|
-
##FORMAT=<ID=DP,Number=1,Type=Integer,Description="# high-quality bases">
|
|
25
|
-
##FORMAT=<ID=SP,Number=1,Type=Integer,Description="Phred-scaled strand bias P-value">
|
|
26
|
-
##FORMAT=<ID=PL,Number=G,Type=Integer,Description="List of Phred-scaled genotype likelihoods">
|
|
27
|
-
##contig=<ID=ctgA,length=248956422,assembly=GRCh38.d1.vd1>
|
|
28
|
-
#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT sample_data/raw/volvox/volvox-sorted.bam
|
|
29
|
-
ctgA 277 . T C 10.4 . DP=3;VDB=0.0186;AF1=1;AC1=2;DP4=0,0,3,0;MQ=37;FQ=-36 GT:PL:GQ 1/1:42,9,0:13
|
|
30
|
-
ctgA 1694 . T C 107 . DP=23;VDB=0.0308;AF1=1;AC1=2;DP4=0,1,8,14;MQ=37;FQ=-73;PV4=1,1,0.42,1 GT:PL:GQ 1/1:140,46,0:89
|
|
31
|
-
ctgA 2644 . T G 44 . DP=22;VDB=0.0253;AF1=0.5;AC1=1;DP4=6,5,3,8;MQ=37;FQ=45.3;PV4=0.39,1,1,1 GT:PL:GQ 0/1:74,0,77:75
|
|
32
|
-
ctgA 3213 . T A 124 . DP=19;VDB=0.0384;AF1=1;AC1=2;DP4=0,0,8,11;MQ=36;FQ=-84 GT:PL:GQ 1/1:157,57,0:99
|
|
33
|
-
ctgA 3858 . ctt ct 160 . INDEL;DP=15;VDB=0.0384;AF1=1;AC1=2;DP4=0,0,5,6;MQ=37;FQ=-67.5 GT:PL:GQ 1/1:201,33,0:63
|
|
34
|
-
ctgA 5496 . C G 6.98 . DP=18;VDB=0.0011;AF1=0.4999;AC1=1;DP4=5,7,4,2;MQ=37;FQ=9.53;PV4=0.62,1,1,1 GT:PL:GQ 0/1:36,0,92:37
|
|
35
|
-
ctgA 8471 . G T 124 . DP=21;VDB=0.0355;AF1=1;AC1=2;DP4=0,0,11,10;MQ=37;FQ=-90 GT:PL:GQ 1/1:157,63,0:99
|
|
36
|
-
ctgA 9603 . A T 126 . DP=21;VDB=0.0356;AF1=1;AC1=2;DP4=0,0,10,11;MQ=36;FQ=-90 GT:PL:GQ 1/1:159,63,0:99
|
|
37
|
-
ctgA 10423 . T A 25 . DP=19;VDB=0.0404;AF1=0.5;AC1=1;DP4=3,7,3,6;MQ=37;FQ=28;PV4=1,1,1,0.27 GT:PL:GQ 0/1:55,0,73:58
|
|
38
|
-
ctgA 13202 . G T 40 . DP=22;VDB=0.0399;AF1=0.5;AC1=1;DP4=4,8,5,5;MQ=37;FQ=42.8;PV4=0.67,1,1,1 GT:PL:GQ 0/1:70,0,84:73
|
|
39
|
-
ctgA 14247 . ac aCc 61.5 . INDEL;DP=22;VDB=0.0404;AF1=0.5;AC1=1;DP4=3,4,6,0;MQ=37;FQ=62.4;PV4=0.07,1,1,1 GT:PL:GQ 0/1:99,0,101:99
|
|
40
|
-
ctgA 14481 . G A 42 . DP=21;VDB=0.0394;AF1=0.5;AC1=1;DP4=4,6,5,6;MQ=37;FQ=42;PV4=1,1,1,0.12 GT:PL:GQ 0/1:72,0,72:72
|
|
41
|
-
ctgA 15078 . T A 96 . DP=12;VDB=0.0404;AF1=1;AC1=2;DP4=0,0,4,8;MQ=37;FQ=-63 GT:PL:GQ 1/1:129,36,0:69
|
|
42
|
-
ctgA 15163 . gcc gCcc 213 . INDEL;DP=20;VDB=0.0404;AF1=1;AC1=2;DP4=0,0,10,7;MQ=37;FQ=-85.5 GT:PL:GQ 1/1:254,51,0:99
|
|
43
|
-
ctgA 15418 . A G 64 . DP=19;VDB=0.0253;AF1=0.5003;AC1=1;DP4=5,1,5,8;MQ=35;FQ=4.13;PV4=0.14,0.26,0.11,1 GT:PL:GQ 0/1:94,0,29:32
|
|
44
|
-
ctgA 17042 . C T 119 . DP=22;VDB=0.0394;AF1=1;AC1=2;DP4=0,0,13,9;MQ=37;FQ=-93 GT:PL:GQ 1/1:152,66,0:99
|
|
45
|
-
ctgA 18948 . A G 57 . DP=23;VDB=0.0308;AF1=0.5;AC1=1;DP4=6,4,4,9;MQ=37;FQ=39;PV4=0.22,1,0.2,1 GT:PL:GQ 0/1:87,0,66:69
|
|
46
|
-
ctgA 19882 . acg a 98.5 . INDEL;DP=22;VDB=0.0374;AF1=0.5;AC1=1;DP4=4,6,3,5;MQ=37;FQ=101;PV4=1,0.049,1,1 GT:PL:GQ 0/1:136,0,202:99
|
|
47
|
-
ctgA 20675 . T C 40 . DP=18;VDB=0.0401;AF1=0.5;AC1=1;DP4=5,3,4,6;MQ=36;FQ=31.7;PV4=0.64,1,0.19,0.15 GT:PL:GQ 0/1:70,0,59:62
|
|
48
|
-
ctgA 21485 . C T,A 118 . DP=20;VDB=0.0388;AF1=1;AC1=2;DP4=0,0,8,12;MQ=36;FQ=-84 GT:PL:GQ 1/1:151,57,0,150,42,147:99
|
|
49
|
-
ctgA 22326 . C T 107 . DP=14;VDB=0.0399;AF1=1;AC1=2;DP4=0,0,6,8;MQ=36;FQ=-69 GT:PL:GQ 1/1:140,42,0:81
|
|
50
|
-
ctgA 23636 . A C 58 . DP=19;VDB=0.0320;AF1=0.5;AC1=1;DP4=2,5,5,7;MQ=37;FQ=18.1;PV4=0.66,0.23,1,0.037 GT:PL:GQ 0/1:88,0,45:48
|
|
51
|
-
ctgA 23959 . A G 118 . DP=19;VDB=0.0374;AF1=1;AC1=2;DP4=0,0,7,11;MQ=36;FQ=-81 GT:PL:GQ 1/1:151,54,0:99
|
|
52
|
-
ctgA 24978 . C G 127 . DP=22;VDB=0.0355;AF1=1;AC1=2;DP4=0,0,11,11;MQ=35;FQ=-93 GT:PL:GQ 1/1:160,66,0:99
|
|
53
|
-
ctgA 25558 . A C 104 . DP=27;VDB=0.0371;AF1=1;AC1=2;DP4=0,0,18,7;MQ=36;FQ=-102 GT:PL:GQ 1/1:137,75,0:99
|
|
54
|
-
ctgA 26079 . C A 29 . DP=18;VDB=0.0339;AF1=0.5;AC1=1;DP4=6,4,4,4;MQ=36;FQ=31.9;PV4=1,0.14,0.44,0.13 GT:PL:GQ 0/1:59,0,76:62
|
|
55
|
-
ctgA 28463 . T A 27 . DP=20;VDB=0.0399;AF1=0.5;AC1=1;DP4=5,6,4,5;MQ=36;FQ=30;PV4=1,1,1,1 GT:PL:GQ 0/1:57,0,82:60
|
|
56
|
-
ctgA 28719 . T G 39 . DP=18;VDB=0.0333;AF1=0.5;AC1=1;DP4=6,3,5,4;MQ=37;FQ=36.6;PV4=1,1,1,1 GT:PL:GQ 0/1:69,0,65:67
|
|
57
|
-
ctgA 29032 . G T 103 . DP=19;VDB=0.0399;AF1=1;AC1=2;DP4=0,0,13,6;MQ=37;FQ=-84 GT:PL:GQ 1/1:136,57,0:99
|
|
58
|
-
ctgA 29848 . C T 91 . DP=11;VDB=0.0333;AF1=1;AC1=2;DP4=0,0,5,6;MQ=36;FQ=-60 GT:PL:GQ 1/1:124,33,0:63
|
|
59
|
-
ctgA 34015 . T A 85 . DP=10;VDB=0.0339;AF1=1;AC1=2;DP4=0,0,4,6;MQ=37;FQ=-57 GT:PL:GQ 1/1:118,30,0:57
|
|
60
|
-
ctgA 35771 . T A 99 . DP=16;VDB=0.0399;AF1=1;AC1=2;DP4=0,0,3,13;MQ=36;FQ=-75 GT:PL:GQ 1/1:132,48,0:93
|
|
61
|
-
ctgA 38156 . C G 16.1 . DP=12;VDB=0.0168;AF1=0.5;AC1=1;DP4=3,2,3,2;MQ=37;FQ=16.1;PV4=1,1,1,0.43 GT:PL:GQ 0/1:46,0,46:46
|
|
62
|
-
ctgA 39952 . C T 124 . DP=21;VDB=0.0404;AF1=1;AC1=2;DP4=0,0,11,10;MQ=33;FQ=-90 GT:PL:GQ 1/1:157,63,0:99
|
|
63
|
-
ctgA 39966 . T C 11.3 . DP=27;VDB=0.0299;AF1=0.5;AC1=1;DP4=11,5,2,7;MQ=34;FQ=14.2;PV4=0.041,1,0.01,1 GT:PL:GQ 0/1:41,0,88:43
|
|
64
|
-
ctgA 39983 . A T 127 . DP=24;VDB=0.0355;AF1=1;AC1=2;DP4=0,0,13,11;MQ=34;FQ=-99 GT:PL:GQ 1/1:160,72,0:99
|
|
65
|
-
ctgA 41826 . T C 110 . DP=18;VDB=0.0388;AF1=1;AC1=2;DP4=0,0,11,7;MQ=36;FQ=-81 GT:PL:GQ 1/1:143,54,0:99
|
|
66
|
-
ctgA 42608 . G T 31 . DP=24;VDB=0.0404;AF1=0.5;AC1=1;DP4=10,4,3,7;MQ=36;FQ=34;PV4=0.095,0.12,0.044,1 GT:PL:GQ 0/1:61,0,82:64
|
|
67
|
-
ctgA 43007 . T A 36 . DP=19;VDB=0.0355;AF1=0.5;AC1=1;DP4=3,5,9,2;MQ=36;FQ=30.4;PV4=0.074,1,0.11,1 GT:PL:GQ 0/1:66,0,58:60
|
|
68
|
-
ctgA 43354 . A C 35 . DP=20;VDB=0.0147;AF1=0.5;AC1=1;DP4=5,6,5,4;MQ=37;FQ=37.9;PV4=1,1,1,0.39 GT:PL:GQ 0/1:65,0,82:68
|
|
69
|
-
ctgA 45666 . G T,A 91 . DP=16;VDB=0.0388;AF1=1;AC1=2;DP4=0,0,10,6;MQ=36;FQ=-72 GT:PL:GQ 1/1:124,45,0,122,31,119:87
|
|
70
|
-
ctgA 46994 . T A 40 . DP=24;VDB=0.0308;AF1=0.5;AC1=1;DP4=6,7,7,4;MQ=37;FQ=43;PV4=0.44,1,1,0.49 GT:PL:GQ 0/1:70,0,89:73
|
|
71
|
-
ctgA 47847 . C A,T 126 . DP=23;VDB=0.0388;AF1=1;AC1=2;DP4=0,0,9,14;MQ=36;FQ=-93 GT:PL:GQ 1/1:159,66,0,158,51,155:99
|
|
72
|
-
ctgA 48199 . A T 22 . DP=17;VDB=0.0320;AF1=0.5;AC1=1;DP4=2,8,4,3;MQ=36;FQ=25;PV4=0.16,1,0.12,0.0062 GT:PL:GQ 0/1:52,0,71:55
|
|
73
|
-
ctgA 49288 . G A 106 . DP=23;VDB=0.0399;AF1=1;AC1=2;DP4=0,0,16,7;MQ=35;FQ=-96 GT:PL:GQ 1/1:139,69,0:99
|
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
import VcfParser from '@gmod/vcf'
|
|
2
|
-
import VcfFeature from './index'
|
|
3
|
-
|
|
4
|
-
test('test usage of the VcfFeature', () => {
|
|
5
|
-
const parser = new VcfParser({
|
|
6
|
-
header: `#CHROM\tPOS\tID\tREF\tALT\tQUAL\tFILTER\tINFO\tFORMAT\tBAMs/caudaus.sorted.sam`,
|
|
7
|
-
})
|
|
8
|
-
const line = `lcl|Scaffald_1\t80465\trs118266897\tR\tA\t29\tPASS\tNS=3;0,14;AF=0.5;DB;112;PG2.1`
|
|
9
|
-
|
|
10
|
-
const variant = parser.parseLine(line)
|
|
11
|
-
|
|
12
|
-
const f = new VcfFeature({
|
|
13
|
-
parser,
|
|
14
|
-
variant,
|
|
15
|
-
id: 'myuniqueid',
|
|
16
|
-
})
|
|
17
|
-
expect(f.id()).toEqual('myuniqueid')
|
|
18
|
-
expect(f.get('name')).toEqual('rs118266897')
|
|
19
|
-
})
|
|
20
|
-
|
|
21
|
-
test('try INS feature with END less than start', () => {
|
|
22
|
-
const parser = new VcfParser({
|
|
23
|
-
header: `#CHROM\tPOS\tID\tREF\tALT\tQUAL\tFILTER\tINFO\tFORMAT\tBAMs/caudaus.sorted.sam`,
|
|
24
|
-
})
|
|
25
|
-
const line = `chr1\t100\trs123\tR\tA\t29\tPASS\tEND=1;SVTYPE=INS`
|
|
26
|
-
|
|
27
|
-
const variant = parser.parseLine(line)
|
|
28
|
-
|
|
29
|
-
const f = new VcfFeature({
|
|
30
|
-
parser,
|
|
31
|
-
variant,
|
|
32
|
-
id: 'myuniqueid',
|
|
33
|
-
})
|
|
34
|
-
expect(f.id()).toEqual('myuniqueid')
|
|
35
|
-
expect(f.get('start')).toEqual(99)
|
|
36
|
-
expect(f.get('end')).toEqual(100)
|
|
37
|
-
})
|
|
38
|
-
|
|
39
|
-
test('try DEL feature with END info field valid', () => {
|
|
40
|
-
const parser = new VcfParser({
|
|
41
|
-
header: `#CHROM\tPOS\tID\tREF\tALT\tQUAL\tFILTER\tINFO\tFORMAT\tBAMs/caudaus.sorted.sam`,
|
|
42
|
-
})
|
|
43
|
-
const line = `chr1\t100\trs123\tR\t<DEL>\t29\tPASS\tEND=1000;SVTYPE=DEL`
|
|
44
|
-
|
|
45
|
-
const variant = parser.parseLine(line)
|
|
46
|
-
|
|
47
|
-
const f = new VcfFeature({
|
|
48
|
-
parser,
|
|
49
|
-
variant,
|
|
50
|
-
id: 'myuniqueid',
|
|
51
|
-
})
|
|
52
|
-
expect(f.id()).toEqual('myuniqueid')
|
|
53
|
-
expect(f.get('start')).toEqual(99)
|
|
54
|
-
expect(f.get('end')).toEqual(1000)
|
|
55
|
-
})
|
|
56
|
-
|
|
57
|
-
test('multiple SVs', () => {
|
|
58
|
-
const parser = new VcfParser({
|
|
59
|
-
header: `#CHROM\tPOS\tID\tREF\tALT\tQUAL\tFILTER\tINFO\tFORMAT\tBAMs/caudaus.sorted.sam`,
|
|
60
|
-
})
|
|
61
|
-
const line = `chr1\t100\trs123\tR\t<INVDUP>,<INV>\t29\tPASS\tEND=1000;SVTYPE=DEL`
|
|
62
|
-
|
|
63
|
-
const variant = parser.parseLine(line)
|
|
64
|
-
|
|
65
|
-
const f = new VcfFeature({
|
|
66
|
-
parser,
|
|
67
|
-
variant,
|
|
68
|
-
id: 'myuniqueid',
|
|
69
|
-
})
|
|
70
|
-
expect(f.get('description')).toEqual('<INVDUP>,<INV>')
|
|
71
|
-
})
|
|
72
|
-
test('BND', () => {
|
|
73
|
-
const parser = new VcfParser({
|
|
74
|
-
header: `#CHROM\tPOS\tID\tREF\tALT\tQUAL\tFILTER\tINFO\tFORMAT\tBAMs/caudaus.sorted.sam`,
|
|
75
|
-
})
|
|
76
|
-
const line = `chr1\t100\trs123\tR\tG[ctgA:34200[\t29\tPASS\tEND=1000;SVTYPE=BND`
|
|
77
|
-
|
|
78
|
-
const variant = parser.parseLine(line)
|
|
79
|
-
|
|
80
|
-
const f = new VcfFeature({
|
|
81
|
-
parser,
|
|
82
|
-
variant,
|
|
83
|
-
id: 'myuniqueid',
|
|
84
|
-
})
|
|
85
|
-
expect(f.get('description')).toEqual('G[ctgA:34200[')
|
|
86
|
-
})
|
|
87
|
-
test('multiple BND', () => {
|
|
88
|
-
const parser = new VcfParser({
|
|
89
|
-
header: `#CHROM\tPOS\tID\tREF\tALT\tQUAL\tFILTER\tINFO\tFORMAT\tBAMs/caudaus.sorted.sam`,
|
|
90
|
-
})
|
|
91
|
-
const line = `chr1\t100\trs123\tR\tG[ctgA:34200[,G[ctgA:44200[\t29\tPASS\tEND=1000;SVTYPE=BND`
|
|
92
|
-
|
|
93
|
-
const variant = parser.parseLine(line)
|
|
94
|
-
|
|
95
|
-
const f = new VcfFeature({
|
|
96
|
-
parser,
|
|
97
|
-
variant,
|
|
98
|
-
id: 'myuniqueid',
|
|
99
|
-
})
|
|
100
|
-
expect(f.get('description')).toEqual('G[ctgA:34200[,G[ctgA:44200[')
|
|
101
|
-
})
|
|
102
|
-
test('multiple SNV', () => {
|
|
103
|
-
const parser = new VcfParser({
|
|
104
|
-
header: `#CHROM\tPOS\tID\tREF\tALT\tQUAL\tFILTER\tINFO\tFORMAT\tBAMs/caudaus.sorted.sam`,
|
|
105
|
-
})
|
|
106
|
-
const line = `chr1\t100\trs123\tG\tA,C\t29\tPASS\tHELLO=world`
|
|
107
|
-
|
|
108
|
-
const variant = parser.parseLine(line)
|
|
109
|
-
|
|
110
|
-
const f = new VcfFeature({
|
|
111
|
-
parser,
|
|
112
|
-
variant,
|
|
113
|
-
id: 'myuniqueid',
|
|
114
|
-
})
|
|
115
|
-
expect(f.get('description')).toEqual('SNV G -> A,C')
|
|
116
|
-
})
|
|
117
|
-
|
|
118
|
-
test('multiple SNV2', () => {
|
|
119
|
-
const parser = new VcfParser({
|
|
120
|
-
header: `#CHROM\tPOS\tID\tREF\tALT\tQUAL\tFILTER\tINFO\tFORMAT\tBAMs/caudaus.sorted.sam`,
|
|
121
|
-
})
|
|
122
|
-
const line = `chr1\t100\trs123\tG\tAT,<*>\t29\tPASS\tHELLO=world`
|
|
123
|
-
|
|
124
|
-
const variant = parser.parseLine(line)
|
|
125
|
-
|
|
126
|
-
const f = new VcfFeature({
|
|
127
|
-
parser,
|
|
128
|
-
variant,
|
|
129
|
-
id: 'myuniqueid',
|
|
130
|
-
})
|
|
131
|
-
expect(f.get('description')).toEqual('insertion G -> AT,<*>')
|
|
132
|
-
})
|
package/src/VcfFeature/index.ts
DELETED
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
import { Feature } from '@jbrowse/core/util'
|
|
2
|
-
import VCF from '@gmod/vcf'
|
|
3
|
-
|
|
4
|
-
// locals
|
|
5
|
-
import { getSOTermAndDescription } from './util'
|
|
6
|
-
|
|
7
|
-
/* eslint-disable no-underscore-dangle */
|
|
8
|
-
|
|
9
|
-
interface Samples {
|
|
10
|
-
[key: string]: {
|
|
11
|
-
[key: string]: { values: string[] | number[] | null }
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
interface FeatureData {
|
|
16
|
-
[key: string]: unknown
|
|
17
|
-
refName: string
|
|
18
|
-
start: number
|
|
19
|
-
end: number
|
|
20
|
-
description?: string
|
|
21
|
-
type?: string
|
|
22
|
-
name?: string
|
|
23
|
-
aliases?: string[]
|
|
24
|
-
samples?: Samples
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export default class VCFFeature implements Feature {
|
|
28
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
29
|
-
private variant: any
|
|
30
|
-
|
|
31
|
-
private parser: VCF
|
|
32
|
-
|
|
33
|
-
private data: FeatureData
|
|
34
|
-
|
|
35
|
-
private _id: string
|
|
36
|
-
|
|
37
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
38
|
-
constructor(args: { variant: any; parser: VCF; id: string }) {
|
|
39
|
-
this.variant = args.variant
|
|
40
|
-
this.parser = args.parser
|
|
41
|
-
this.data = this.dataFromVariant(this.variant)
|
|
42
|
-
this._id = args.id
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
46
|
-
get(field: string): any {
|
|
47
|
-
return field === 'samples'
|
|
48
|
-
? this.variant.SAMPLES
|
|
49
|
-
: this.data[field] || this.variant[field]
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
set() {}
|
|
53
|
-
|
|
54
|
-
parent() {
|
|
55
|
-
return undefined
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
children() {
|
|
59
|
-
return undefined
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
tags() {
|
|
63
|
-
return [...Object.keys(this.data), ...Object.keys(this.variant), 'samples']
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
id() {
|
|
67
|
-
return this._id
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
dataFromVariant(variant: {
|
|
71
|
-
REF: string
|
|
72
|
-
POS: number
|
|
73
|
-
ALT: string[]
|
|
74
|
-
CHROM: string
|
|
75
|
-
INFO: any // eslint-disable-line @typescript-eslint/no-explicit-any
|
|
76
|
-
ID: string[]
|
|
77
|
-
}): FeatureData {
|
|
78
|
-
const { REF, ALT, POS, CHROM, INFO, ID } = variant
|
|
79
|
-
const start = POS - 1
|
|
80
|
-
const [type, description] = getSOTermAndDescription(REF, ALT, this.parser)
|
|
81
|
-
const isTRA = ALT?.some(f => f === '<TRA>')
|
|
82
|
-
const isSymbolic = ALT?.some(f => f.includes('<'))
|
|
83
|
-
|
|
84
|
-
return {
|
|
85
|
-
refName: CHROM,
|
|
86
|
-
start,
|
|
87
|
-
end: isSymbolic && INFO.END && !isTRA ? +INFO.END[0] : start + REF.length,
|
|
88
|
-
description,
|
|
89
|
-
type,
|
|
90
|
-
name: ID?.join(','),
|
|
91
|
-
aliases: ID && ID.length > 1 ? variant.ID.slice(1) : undefined,
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
96
|
-
toJSON(): any {
|
|
97
|
-
return {
|
|
98
|
-
uniqueId: this._id,
|
|
99
|
-
...this.variant,
|
|
100
|
-
...this.data,
|
|
101
|
-
samples: this.variant.SAMPLES,
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
}
|