jbrowse-plugin-graphgenomeviewer 4.1.0 → 4.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/README.md +4 -4
- package/dist/chunks/{GraphGenomeView-UV5XDD7W.js → GraphGenomeView-QOBHGMLE.js} +2 -2
- package/dist/chunks/{LinearGraphDisplay-P2POSPXV.js → LinearGraphDisplay-TPXW6POY.js} +2 -2
- package/dist/chunks/{RgfaTabixAdapter-5MD2ZZ2F.js → RgfaTabixAdapter-QPKEJZXA.js} +3 -3
- package/dist/chunks/{RgfaTabixAdapter-5MD2ZZ2F.js.map → RgfaTabixAdapter-QPKEJZXA.js.map} +2 -2
- package/dist/chunks/{chunk-32XXMGET.js → chunk-HW55QCJG.js} +2 -2
- package/dist/chunks/{chunk-32XXMGET.js.map → chunk-HW55QCJG.js.map} +1 -1
- package/dist/chunks/{chunk-OJOZ5YAL.js → chunk-SIP5IHWK.js} +2 -2
- package/dist/chunks/{chunk-OJOZ5YAL.js.map → chunk-SIP5IHWK.js.map} +2 -2
- package/dist/jbrowse-plugin-graphgenomeviewer.esm.js +4 -4
- package/dist/jbrowse-plugin-graphgenomeviewer.esm.js.map +2 -2
- package/package.json +2 -2
- package/src/GraphGenomeView/components/WalkRowsOverlay.tsx +2 -2
- package/src/GraphGenomeView/model.test.ts +1 -1
- package/src/GraphGenomeView/model.ts +4 -6
- package/src/RgfaTabixAdapter/RgfaTabixAdapter.test.ts +8 -8
- package/src/RgfaTabixAdapter/RgfaTabixAdapter.ts +5 -6
- package/src/RgfaTabixAdapter/rgfaBed.test.ts +7 -7
- package/src/version.ts +1 -1
- /package/dist/chunks/{GraphGenomeView-UV5XDD7W.js.map → GraphGenomeView-QOBHGMLE.js.map} +0 -0
- /package/dist/chunks/{LinearGraphDisplay-P2POSPXV.js.map → LinearGraphDisplay-TPXW6POY.js.map} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jbrowse-plugin-graphgenomeviewer",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.2.0",
|
|
4
4
|
"description": "JBrowse 2 graph genome (pangenome) view: rGFA reference-anchored layouts, the Bandage force-directed engine, and haplotype lanes read from a gbz-base database",
|
|
5
5
|
"license": "GPL-3.0-or-later",
|
|
6
6
|
"repository": {
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
"typescript-eslint": "^8.70.1",
|
|
77
77
|
"typescript7": "npm:typescript@^7.0.2",
|
|
78
78
|
"vitest": "^5.0.2",
|
|
79
|
-
"@jbrowse/bandage-core": "4.
|
|
79
|
+
"@jbrowse/bandage-core": "4.2.0"
|
|
80
80
|
},
|
|
81
81
|
"peerDependencies": {
|
|
82
82
|
"react": ">=18.0.0",
|
|
@@ -20,8 +20,8 @@ import type { KeySwatch } from '@jbrowse/bandage-core/layout/walkRowDraw'
|
|
|
20
20
|
|
|
21
21
|
// The walk-rows layout's bars: one per haplotype walk under the reference
|
|
22
22
|
// row, each on its own bp axis from the window's left edge, drawn from core's
|
|
23
|
-
// walkRowsTree: runs coloured by
|
|
24
|
-
//
|
|
23
|
+
// walkRowsTree: runs coloured by whether they are on the reference walk's
|
|
24
|
+
// path, unit separators, each row's genes from its own assembly's
|
|
25
25
|
// annotation, the allele a repeat genotype called and a readout. Under the
|
|
26
26
|
// reference-position ramp an aligned run takes the hue of the reference it is
|
|
27
27
|
// threaded through. In a tandem array that is the aligner's pick among
|
|
@@ -2672,7 +2672,7 @@ describe('walk rows', () => {
|
|
|
2672
2672
|
const svg = model.figure()!
|
|
2673
2673
|
expect(svg).toContain('>B#1</text>')
|
|
2674
2674
|
expect(svg).not.toContain('>A#1</text>')
|
|
2675
|
-
expect(svg).toContain('
|
|
2675
|
+
expect(svg).toContain("'s path")
|
|
2676
2676
|
})
|
|
2677
2677
|
|
|
2678
2678
|
test('walks lift together, each keeping the colour it was given', async () => {
|
|
@@ -2658,12 +2658,10 @@ export function GraphPaneMixin() {
|
|
|
2658
2658
|
// the assembly to load to open this node on its own
|
|
2659
2659
|
// coordinates
|
|
2660
2660
|
contributingHaplotype: nodeOwnLocation(node)?.haplotype,
|
|
2661
|
-
// Every
|
|
2662
|
-
//
|
|
2663
|
-
//
|
|
2664
|
-
|
|
2665
|
-
// carriage.
|
|
2666
|
-
carriedBy: node.samples?.join(', '),
|
|
2661
|
+
// Every haplotype whose path visits it, which only a path
|
|
2662
|
+
// GFA records. Absent on an rGFA, where
|
|
2663
|
+
// `contributingAssembly` is the first-seen assembly alone.
|
|
2664
|
+
samples: node.samples?.join(', '),
|
|
2667
2665
|
...(region && span
|
|
2668
2666
|
? {
|
|
2669
2667
|
refName: region.refName,
|
|
@@ -203,7 +203,7 @@ test('getFeatures carries SM:Z: onto the feature', async () => {
|
|
|
203
203
|
const private1199 = features.find(f => f.get('name') === '196827')!
|
|
204
204
|
expect(private1199.get('end') - private1199.get('start')).toBe(1199)
|
|
205
205
|
expect(private1199.get('samples')).toEqual(['K12.1'])
|
|
206
|
-
expect(private1199.get('
|
|
206
|
+
expect(private1199.get('sampleCount')).toBe(1)
|
|
207
207
|
|
|
208
208
|
const core = features.find(f => f.get('name') === '196843')!
|
|
209
209
|
expect(core.get('samples')).toEqual([
|
|
@@ -213,10 +213,10 @@ test('getFeatures carries SM:Z: onto the feature', async () => {
|
|
|
213
213
|
'NCTC86.1',
|
|
214
214
|
'IAI39.1',
|
|
215
215
|
])
|
|
216
|
-
expect(core.get('
|
|
216
|
+
expect(core.get('sampleCount')).toBe(5)
|
|
217
217
|
})
|
|
218
218
|
|
|
219
|
-
// The other half of the same fixture: the graph route reads
|
|
219
|
+
// The other half of the same fixture: the graph route reads the samples off the
|
|
220
220
|
// synthesized S-line, and rgfaBed.test.ts asserts that from a hand-written row.
|
|
221
221
|
// This is the same claim against a real indexed file.
|
|
222
222
|
test('getSubgraph keeps the tag on the S-line it synthesizes', async () => {
|
|
@@ -226,16 +226,16 @@ test('getSubgraph keeps the tag on the S-line it synthesizes', async () => {
|
|
|
226
226
|
)
|
|
227
227
|
})
|
|
228
228
|
|
|
229
|
-
// An rGFA has no sixth column, so the attribute is absent rather than 0
|
|
230
|
-
// color expression reading `
|
|
231
|
-
//
|
|
232
|
-
test('getFeatures omits
|
|
229
|
+
// An rGFA has no sixth column, so the attribute is absent rather than 0: a
|
|
230
|
+
// color expression reading `sampleCount` on such a track gets undefined, not a
|
|
231
|
+
// count of zero.
|
|
232
|
+
test('getFeatures omits samples on a graph that records none', async () => {
|
|
233
233
|
const features = await firstValueFrom(
|
|
234
234
|
makeAdapter().getFeatures(k12).pipe(toArray()),
|
|
235
235
|
)
|
|
236
236
|
expect(features.length).toBeGreaterThan(0)
|
|
237
237
|
expect(features.every(f => f.get('samples') === undefined)).toBe(true)
|
|
238
|
-
expect(features.every(f => f.get('
|
|
238
|
+
expect(features.every(f => f.get('sampleCount') === undefined)).toBe(true)
|
|
239
239
|
})
|
|
240
240
|
|
|
241
241
|
// Minigraph-Cactus writes PanSN stable names, so HPRC release 2 calls the
|
|
@@ -124,11 +124,10 @@ export default class RgfaTabixAdapter extends BaseFeatureDataAdapter<RgfaTabixAd
|
|
|
124
124
|
signal,
|
|
125
125
|
lineCallback: line => {
|
|
126
126
|
const segment = parseSegmentLine(line)
|
|
127
|
-
// `samples`
|
|
128
|
-
//
|
|
129
|
-
//
|
|
130
|
-
//
|
|
131
|
-
// The count is the axis the color reads, so the index states it.
|
|
127
|
+
// `samples` lists the haplotypes whose paths visit the segment and
|
|
128
|
+
// `sampleCount` counts them. A lane's color reads the count, and
|
|
129
|
+
// a count in jexl would otherwise rely on `.length` resolving
|
|
130
|
+
// through a member access on an array.
|
|
132
131
|
const samples = segmentSamples(segment)
|
|
133
132
|
observer.next(
|
|
134
133
|
new SimpleFeature({
|
|
@@ -140,7 +139,7 @@ export default class RgfaTabixAdapter extends BaseFeatureDataAdapter<RgfaTabixAd
|
|
|
140
139
|
type: 'segment',
|
|
141
140
|
rank: segment.rank,
|
|
142
141
|
stableName: segment.refName,
|
|
143
|
-
...(samples && { samples,
|
|
142
|
+
...(samples && { samples, sampleCount: samples.length }),
|
|
144
143
|
}),
|
|
145
144
|
)
|
|
146
145
|
},
|
|
@@ -119,15 +119,15 @@ test('a valid tag beside a malformed one keeps only the valid one', () => {
|
|
|
119
119
|
)
|
|
120
120
|
})
|
|
121
121
|
|
|
122
|
-
test('segmentSamples reads the
|
|
122
|
+
test('segmentSamples reads the samples off the tag column', () => {
|
|
123
123
|
const segment = parseSegmentLine(
|
|
124
124
|
'K12#1#chr\t1004477\t1004500\ts119690\t0\tSM:Z:K12.1,Sakai.1,NCTC86.1',
|
|
125
125
|
)
|
|
126
126
|
expect(segmentSamples(segment)).toEqual(['K12.1', 'Sakai.1', 'NCTC86.1'])
|
|
127
127
|
})
|
|
128
128
|
|
|
129
|
-
// Undefined, not [], so a lane can tell a graph that
|
|
130
|
-
//
|
|
129
|
+
// Undefined, not [], so a lane can tell a graph that records no samples from a
|
|
130
|
+
// segment no path visits.
|
|
131
131
|
test('segmentSamples is undefined when the column says nothing', () => {
|
|
132
132
|
expect(segmentSamples(parseSegmentLine(RGFA_SEG))).toBeUndefined()
|
|
133
133
|
expect(segmentSamples(parseSegmentLine(TAGGED_SEG))).toBeUndefined()
|
|
@@ -148,11 +148,11 @@ test('segmentSamples finds the tag beside other tags', () => {
|
|
|
148
148
|
expect(segmentSamples(segment)).toEqual(['HG002.1', 'HG002.2'])
|
|
149
149
|
})
|
|
150
150
|
|
|
151
|
-
// The whole
|
|
151
|
+
// The whole samples chain in one test, because it spans three files and each
|
|
152
152
|
// half is covered on its own: a segs.bed SM:Z: column -> the synthesized S-line
|
|
153
|
-
// -> the GFA parser -> GraphNode.samples, which
|
|
154
|
-
//
|
|
155
|
-
//
|
|
153
|
+
// -> the GFA parser -> GraphNode.samples, which model.ts renders as `samples`
|
|
154
|
+
// in the node popup. An indexed cut has no P/W lines, so this tag is its only
|
|
155
|
+
// record of which haplotypes visit a segment, and nothing else asserts that it
|
|
156
156
|
// survives the round trip.
|
|
157
157
|
test('SM:Z: on a segs row reaches GraphNode.samples', async () => {
|
|
158
158
|
const { parseGFA } = await import('@jbrowse/bandage-core/gfa-core/index')
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const version = '4.
|
|
1
|
+
export const version = '4.2.0'
|
|
File without changes
|
/package/dist/chunks/{LinearGraphDisplay-P2POSPXV.js.map → LinearGraphDisplay-TPXW6POY.js.map}
RENAMED
|
File without changes
|