@jbrowse/plugin-variants 2.3.4 → 2.4.1

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.
Files changed (55) hide show
  1. package/dist/ChordVariantDisplay/index.js +1 -0
  2. package/dist/ChordVariantDisplay/index.js.map +1 -1
  3. package/dist/ChordVariantDisplay/models/stateModelFactory.d.ts +9 -2
  4. package/dist/ChordVariantDisplay/models/stateModelFactory.js +1 -1
  5. package/dist/ChordVariantDisplay/models/stateModelFactory.js.map +1 -1
  6. package/dist/LinearVariantDisplay/model.d.ts +3 -1
  7. package/dist/StructuralVariantChordRenderer/ReactComponent.d.ts +2 -3
  8. package/dist/StructuralVariantChordRenderer/ReactComponent.js +3 -5
  9. package/dist/StructuralVariantChordRenderer/ReactComponent.js.map +1 -1
  10. package/dist/VariantFeatureWidget/BreakendOptionDialog.js +4 -3
  11. package/dist/VariantFeatureWidget/BreakendOptionDialog.js.map +1 -1
  12. package/dist/VariantFeatureWidget/VariantSampleGrid.js +11 -7
  13. package/dist/VariantFeatureWidget/VariantSampleGrid.js.map +1 -1
  14. package/dist/VcfAdapter/VcfAdapter.d.ts +3 -1
  15. package/dist/VcfAdapter/VcfAdapter.js +9 -10
  16. package/dist/VcfAdapter/VcfAdapter.js.map +1 -1
  17. package/dist/VcfFeature/index.js +1 -1
  18. package/dist/VcfFeature/index.js.map +1 -1
  19. package/dist/VcfFeature/util.js +4 -7
  20. package/dist/VcfFeature/util.js.map +1 -1
  21. package/dist/VcfTabixAdapter/VcfTabixAdapter.js.map +1 -1
  22. package/esm/ChordVariantDisplay/index.js +1 -0
  23. package/esm/ChordVariantDisplay/index.js.map +1 -1
  24. package/esm/ChordVariantDisplay/models/stateModelFactory.d.ts +9 -2
  25. package/esm/ChordVariantDisplay/models/stateModelFactory.js +1 -1
  26. package/esm/ChordVariantDisplay/models/stateModelFactory.js.map +1 -1
  27. package/esm/LinearVariantDisplay/model.d.ts +3 -1
  28. package/esm/StructuralVariantChordRenderer/ReactComponent.d.ts +2 -3
  29. package/esm/StructuralVariantChordRenderer/ReactComponent.js +3 -5
  30. package/esm/StructuralVariantChordRenderer/ReactComponent.js.map +1 -1
  31. package/esm/VariantFeatureWidget/BreakendOptionDialog.js +4 -3
  32. package/esm/VariantFeatureWidget/BreakendOptionDialog.js.map +1 -1
  33. package/esm/VariantFeatureWidget/VariantSampleGrid.js +11 -7
  34. package/esm/VariantFeatureWidget/VariantSampleGrid.js.map +1 -1
  35. package/esm/VcfAdapter/VcfAdapter.d.ts +3 -1
  36. package/esm/VcfAdapter/VcfAdapter.js +9 -10
  37. package/esm/VcfAdapter/VcfAdapter.js.map +1 -1
  38. package/esm/VcfFeature/index.js +1 -1
  39. package/esm/VcfFeature/index.js.map +1 -1
  40. package/esm/VcfFeature/util.js +4 -7
  41. package/esm/VcfFeature/util.js.map +1 -1
  42. package/esm/VcfTabixAdapter/VcfTabixAdapter.js.map +1 -1
  43. package/package.json +3 -3
  44. package/src/ChordVariantDisplay/index.ts +2 -0
  45. package/src/ChordVariantDisplay/models/stateModelFactory.ts +2 -2
  46. package/src/StructuralVariantChordRenderer/ReactComponent.tsx +14 -15
  47. package/src/VariantFeatureWidget/BreakendOptionDialog.tsx +11 -5
  48. package/src/VariantFeatureWidget/VariantFeatureWidget.test.tsx +1 -1
  49. package/src/VariantFeatureWidget/VariantSampleGrid.tsx +48 -33
  50. package/src/VariantFeatureWidget/__snapshots__/VariantFeatureWidget.test.tsx.snap +8 -8
  51. package/src/VcfAdapter/VcfAdapter.ts +15 -16
  52. package/src/VcfFeature/index.ts +1 -1
  53. package/src/VcfFeature/util.ts +4 -6
  54. package/src/VcfTabixAdapter/VcfTabixAdapter.ts +2 -2
  55. package/src/VcfTabixAdapter/__snapshots__/VcfTabixAdapter.test.ts.snap +5 -5
@@ -92,7 +92,7 @@ export function getSOAndDescFromAltDefs(
92
92
  if (modAlt.length > 1) {
93
93
  return getSOAndDescFromAltDefs(
94
94
  ref,
95
- `<${modAlt.slice(0, modAlt.length - 1).join(':')}>`,
95
+ `<${modAlt.slice(0, -1).join(':')}>`,
96
96
  parser,
97
97
  )
98
98
  }
@@ -121,11 +121,9 @@ export function getSOAndDescByExamination(ref: string, alt: string) {
121
121
  } else if (alt.includes('<')) {
122
122
  return ['sv', alt]
123
123
  } else if (ref.length === alt.length) {
124
- if (ref.split('').reverse().join('') === alt) {
125
- return ['inversion', makeDescriptionString('inversion', ref, alt)]
126
- } else {
127
- return ['substitution', makeDescriptionString('substitution', ref, alt)]
128
- }
124
+ return ref.split('').reverse().join('') === alt
125
+ ? ['inversion', makeDescriptionString('inversion', ref, alt)]
126
+ : ['substitution', makeDescriptionString('substitution', ref, alt)]
129
127
  } else if (ref.length <= alt.length) {
130
128
  return ['insertion', makeDescriptionString('insertion', ref, alt)]
131
129
  } else if (ref.length > alt.length) {
@@ -2,7 +2,7 @@ import {
2
2
  BaseFeatureDataAdapter,
3
3
  BaseOptions,
4
4
  } from '@jbrowse/core/data_adapters/BaseAdapter'
5
- import { FileLocation, NoAssemblyRegion } from '@jbrowse/core/util/types'
5
+ import { NoAssemblyRegion } from '@jbrowse/core/util/types'
6
6
  import { openLocation } from '@jbrowse/core/util/io'
7
7
  import { ObservableCreate } from '@jbrowse/core/util/rxjs'
8
8
  import { Feature } from '@jbrowse/core/util'
@@ -24,7 +24,7 @@ export default class extends BaseFeatureDataAdapter {
24
24
  const location = this.getConf(['index', 'location'])
25
25
  const indexType = this.getConf(['index', 'indexType'])
26
26
 
27
- const filehandle = openLocation(vcfGzLocation as FileLocation, pm)
27
+ const filehandle = openLocation(vcfGzLocation, pm)
28
28
  const isCSI = indexType === 'CSI'
29
29
  const vcf = new TabixIndexedFile({
30
30
  filehandle,
@@ -66,7 +66,7 @@ exports[`adapter can fetch variants from volvox.vcf.gz 2`] = `
66
66
  },
67
67
  "start": 276,
68
68
  "type": "SNV",
69
- "uniqueId": "test-vcf-604452",
69
+ "uniqueId": "test-vcf-604453",
70
70
  },
71
71
  {
72
72
  "ALT": [
@@ -132,7 +132,7 @@ exports[`adapter can fetch variants from volvox.vcf.gz 2`] = `
132
132
  },
133
133
  "start": 1693,
134
134
  "type": "SNV",
135
- "uniqueId": "test-vcf-604550",
135
+ "uniqueId": "test-vcf-604551",
136
136
  },
137
137
  {
138
138
  "ALT": [
@@ -198,7 +198,7 @@ exports[`adapter can fetch variants from volvox.vcf.gz 2`] = `
198
198
  },
199
199
  "start": 2643,
200
200
  "type": "SNV",
201
- "uniqueId": "test-vcf-604667",
201
+ "uniqueId": "test-vcf-604668",
202
202
  },
203
203
  {
204
204
  "ALT": [
@@ -258,7 +258,7 @@ exports[`adapter can fetch variants from volvox.vcf.gz 2`] = `
258
258
  },
259
259
  "start": 3212,
260
260
  "type": "SNV",
261
- "uniqueId": "test-vcf-604784",
261
+ "uniqueId": "test-vcf-604785",
262
262
  },
263
263
  {
264
264
  "ALT": [
@@ -319,7 +319,7 @@ exports[`adapter can fetch variants from volvox.vcf.gz 2`] = `
319
319
  },
320
320
  "start": 3857,
321
321
  "type": "deletion",
322
- "uniqueId": "test-vcf-604886",
322
+ "uniqueId": "test-vcf-604887",
323
323
  },
324
324
  ]
325
325
  `;