jbrowse-plugin-graphgenomeviewer 8.8.2 → 9.0.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 +6 -6
- package/dist/chunks/{AddTrackWorkflow-FANMD3WB.js → AddTrackWorkflow-3PX4I4DX.js} +2 -2
- package/dist/chunks/{AddTrackWorkflow-FANMD3WB.js.map → AddTrackWorkflow-3PX4I4DX.js.map} +2 -2
- package/dist/chunks/{GbzBaseSyntenyAdapter-NAXISJUH.js → GbzBaseSyntenyAdapter-YUT5RT7G.js} +2 -2
- package/dist/chunks/{GbzBaseSyntenyAdapter-NAXISJUH.js.map → GbzBaseSyntenyAdapter-YUT5RT7G.js.map} +2 -2
- package/dist/chunks/{GraphGenomeView-PPOVN5LA.js → GraphGenomeView-XFKLX3VQ.js} +2 -2
- package/dist/chunks/{GraphTrackSettingsDialog-BRTDTVOJ.js → GraphTrackSettingsDialog-KOYYI2XH.js} +2 -2
- package/dist/chunks/{HighlightColorDialog-CGW7J3SK.js → HighlightColorDialog-F4IARMEO.js} +2 -2
- package/dist/chunks/LinearGraphDisplay-BZ44C6S3.js +2 -0
- package/dist/chunks/MinigraphBubbleAdapter-2KIWDIY7.js +2 -0
- package/dist/chunks/MinigraphBubbleAdapter-2KIWDIY7.js.map +7 -0
- package/dist/chunks/RgfaTabixAdapter-7QKNUHKX.js +2 -0
- package/dist/chunks/RgfaTabixAdapter-7QKNUHKX.js.map +7 -0
- package/dist/chunks/{TrackWarningsDialog-23WL6FPV.js → TrackWarningsDialog-V5YSUFRO.js} +1 -1
- package/dist/chunks/{TrackWarningsDialog-23WL6FPV.js.map → TrackWarningsDialog-V5YSUFRO.js.map} +1 -1
- package/dist/chunks/WalkFormsAdapter-5NDOULY6.js +2 -0
- package/dist/chunks/WalkFormsAdapter-5NDOULY6.js.map +7 -0
- package/dist/chunks/WalkTabixSyntenyAdapter-KI7ESKKP.js +2 -0
- package/dist/chunks/WalkTabixSyntenyAdapter-KI7ESKKP.js.map +7 -0
- package/dist/chunks/{chunk-RS274NAD.js → chunk-3HSJ7SAT.js} +2 -2
- package/dist/chunks/{chunk-RS274NAD.js.map → chunk-3HSJ7SAT.js.map} +1 -1
- package/dist/chunks/chunk-42VF2CSA.js +4 -0
- package/dist/chunks/chunk-42VF2CSA.js.map +7 -0
- package/dist/chunks/{chunk-LFQFVYNY.js → chunk-47UWMS4O.js} +3 -3
- package/dist/chunks/chunk-47UWMS4O.js.map +7 -0
- package/dist/chunks/{chunk-MWQGJP3J.js → chunk-7PVPO366.js} +2 -2
- package/dist/chunks/{chunk-MWQGJP3J.js.map → chunk-7PVPO366.js.map} +1 -1
- package/dist/chunks/{chunk-SKB4GSET.js → chunk-AQSLN3RH.js} +2 -2
- package/dist/chunks/{chunk-SKB4GSET.js.map → chunk-AQSLN3RH.js.map} +1 -1
- package/dist/chunks/chunk-AXUXLPO3.js +6 -0
- package/dist/chunks/chunk-AXUXLPO3.js.map +7 -0
- package/dist/chunks/chunk-CJ4VON23.js +2 -0
- package/dist/chunks/chunk-CJ4VON23.js.map +7 -0
- package/dist/chunks/{chunk-AGUEPVOR.js → chunk-FQI75MV6.js} +1 -1
- package/dist/chunks/{chunk-AGUEPVOR.js.map → chunk-FQI75MV6.js.map} +1 -1
- package/dist/chunks/{chunk-FM4T47WH.js → chunk-HFBUC6GF.js} +2 -2
- package/dist/chunks/{chunk-FM4T47WH.js.map → chunk-HFBUC6GF.js.map} +1 -1
- package/dist/chunks/chunk-I2XBA4H7.js +9 -0
- package/dist/chunks/{chunk-EFXNCI7R.js.map → chunk-I2XBA4H7.js.map} +4 -4
- package/dist/chunks/chunk-KIURR66K.js +3 -0
- package/dist/chunks/chunk-KIURR66K.js.map +7 -0
- package/dist/chunks/{chunk-CHLLRNBQ.js → chunk-LQSOJR7D.js} +2 -2
- package/dist/chunks/{chunk-CHLLRNBQ.js.map → chunk-LQSOJR7D.js.map} +1 -1
- package/dist/chunks/chunk-M6YSANSW.js +2 -0
- package/dist/chunks/chunk-M6YSANSW.js.map +7 -0
- package/dist/chunks/{chunk-ZWHXVFZF.js → chunk-MPUAUZSJ.js} +1 -1
- package/dist/chunks/{chunk-ZWHXVFZF.js.map → chunk-MPUAUZSJ.js.map} +1 -1
- package/dist/chunks/{chunk-5HDIVUAZ.js → chunk-N4ZFGZDN.js} +2 -2
- package/dist/chunks/{chunk-5HDIVUAZ.js.map → chunk-N4ZFGZDN.js.map} +1 -1
- package/dist/chunks/{chunk-KBOVZ3GI.js → chunk-OSEQDKL3.js} +1 -1
- package/dist/chunks/{chunk-KBOVZ3GI.js.map → chunk-OSEQDKL3.js.map} +1 -1
- package/dist/chunks/{chunk-NSQ4VXKR.js → chunk-P76SUZFP.js} +3 -3
- package/dist/chunks/{chunk-NSQ4VXKR.js.map → chunk-P76SUZFP.js.map} +3 -3
- package/dist/chunks/{chunk-HKGTCZOL.js → chunk-R34FRICP.js} +4 -4
- package/dist/chunks/{chunk-HKGTCZOL.js.map → chunk-R34FRICP.js.map} +2 -2
- package/dist/chunks/chunk-SXMUGZXP.js +2 -0
- package/dist/chunks/chunk-SXMUGZXP.js.map +7 -0
- package/dist/chunks/chunk-T7NMFIRW.js +2 -0
- package/dist/chunks/chunk-T7NMFIRW.js.map +7 -0
- package/dist/chunks/chunk-TLUGH4VW.js +2 -0
- package/dist/chunks/{chunk-LKD5NRWR.js → chunk-VAWAASUT.js} +1 -1
- package/dist/chunks/{chunk-LKD5NRWR.js.map → chunk-VAWAASUT.js.map} +1 -1
- package/dist/chunks/chunk-Y4TLRGAC.js +2 -0
- package/dist/chunks/{chunk-EEWEXRY6.js.map → chunk-Y4TLRGAC.js.map} +3 -3
- package/dist/chunks/chunk-ZXJRZKWF.js +2 -0
- package/dist/chunks/chunk-ZXJRZKWF.js.map +7 -0
- package/dist/chunks/{executeDiagonalize-HZFFXMG4.js → executeDiagonalize-ZMW5BLEJ.js} +2 -2
- package/dist/chunks/{executeDiagonalize-HZFFXMG4.js.map → executeDiagonalize-ZMW5BLEJ.js.map} +1 -1
- package/dist/chunks/{renderSvg-UKXPWKKV.js → renderSvg-DLJTA2B3.js} +2 -2
- package/dist/jbrowse-plugin-graphgenomeviewer.esm.js +5 -5
- package/dist/jbrowse-plugin-graphgenomeviewer.esm.js.map +4 -4
- package/package.json +12 -12
- package/src/GraphAddTrackWorkflow/AddTrackWorkflow.test.tsx +4 -7
- package/src/GraphAddTrackWorkflow/AddTrackWorkflow.tsx +1 -1
- package/src/GraphAddTrackWorkflow/buildTrackConfig.ts +9 -6
- package/src/GraphGenomeView/model.test.ts +21 -8
- package/src/GraphGenomeView/pane/loadActions.ts +7 -2
- package/src/GraphGenomeView/pane/walkRowViews.ts +1 -1
- package/src/GraphGenomeView/walkRowGroups.test.ts +14 -3
- package/src/GraphGenomeView/walkRowGroups.ts +0 -22
- package/src/GraphGenomeView/walkRowsCut.ts +1 -0
- package/src/MinigraphBubbleAdapter/MinigraphBubbleAdapter.ts +5 -2
- package/src/RgfaTabixAdapter/RgfaTabixAdapter.test.ts +1 -1
- package/src/RgfaTabixAdapter/RgfaTabixAdapter.ts +16 -16
- package/src/RgfaTabixAdapter/configSchema.ts +16 -12
- package/src/RgfaTabixAdapter/test_data/walks7/build.sh +27 -0
- package/src/RgfaTabixAdapter/test_data/walks7/follow.GRCh38.gfa +35 -0
- package/src/RgfaTabixAdapter/test_data/walks7/follow.GRCh38.walks.gz +0 -0
- package/src/RgfaTabixAdapter/test_data/walks7/follow.GRCh38.walks.gz.idx +3 -0
- package/src/RgfaTabixAdapter/test_data/walks7/header.GRCh38.gfa +22 -0
- package/src/RgfaTabixAdapter/test_data/walks7/header.GRCh38.walks.gz +0 -0
- package/src/RgfaTabixAdapter/test_data/walks7/header.GRCh38.walks.gz.idx +3 -0
- package/src/RgfaTabixAdapter/test_data/walks7/inversion.GRCh38.gfa +15 -0
- package/src/RgfaTabixAdapter/test_data/walks7/inversion.GRCh38.walks.gz +0 -0
- package/src/RgfaTabixAdapter/test_data/walks7/inversion.GRCh38.walks.gz.idx +3 -0
- package/src/RgfaTabixAdapter/test_data/walks7/lanepairs.GRCh38.gfa +19 -0
- package/src/RgfaTabixAdapter/test_data/walks7/lanepairs.GRCh38.walks.gz +0 -0
- package/src/RgfaTabixAdapter/test_data/walks7/lanepairs.GRCh38.walks.gz.idx +3 -0
- package/src/RgfaTabixAdapter/test_data/walks7/maxnode.GRCh38.gfa +11 -0
- package/src/RgfaTabixAdapter/test_data/walks7/maxnode.GRCh38.walks.gz +0 -0
- package/src/RgfaTabixAdapter/test_data/walks7/maxnode.GRCh38.walks.gz.idx +3 -0
- package/src/RgfaTabixAdapter/test_data/walks7/rejoin.GRCh38.walks.gz +0 -0
- package/src/RgfaTabixAdapter/test_data/walks7/rejoin.GRCh38.walks.gz.idx +3 -0
- package/src/RgfaTabixAdapter/test_data/walks7/skip.GRCh38.gfa +23 -0
- package/src/RgfaTabixAdapter/test_data/walks7/skip.GRCh38.walks.gz +0 -0
- package/src/RgfaTabixAdapter/test_data/walks7/skip.GRCh38.walks.gz.idx +3 -0
- package/src/RgfaTabixAdapter/test_data/walks7/skipfollow.GRCh38.gfa +50 -0
- package/src/RgfaTabixAdapter/test_data/walks7/skipfollow.GRCh38.walks.gz +0 -0
- package/src/RgfaTabixAdapter/test_data/walks7/skipfollow.GRCh38.walks.gz.idx +3 -0
- package/src/RgfaTabixAdapter/test_data/walks7/skipinv.GRCh38.gfa +45 -0
- package/src/RgfaTabixAdapter/test_data/walks7/skipinv.GRCh38.walks.gz +0 -0
- package/src/RgfaTabixAdapter/test_data/walks7/skipinv.GRCh38.walks.gz.idx +3 -0
- package/src/RgfaTabixAdapter/test_data/walks7/twopart.GRCh38.gfa +22 -0
- package/src/RgfaTabixAdapter/test_data/walks7/twopart.GRCh38.walks.gz +0 -0
- package/src/RgfaTabixAdapter/test_data/walks7/twopart.GRCh38.walks.gz.idx +3 -0
- package/src/RgfaTabixAdapter/walkFiles.test.ts +131 -119
- package/src/RgfaTabixAdapter/walkReader.ts +36 -49
- package/src/WalkFormsAdapter/WalkFormsAdapter.test.ts +7 -28
- package/src/WalkFormsAdapter/WalkFormsAdapter.ts +4 -29
- package/src/WalkFormsAdapter/configSchema.ts +13 -13
- package/src/WalkFormsAdapter/formRows.test.ts +0 -7
- package/src/WalkFormsAdapter/formRows.ts +0 -12
- package/src/WalkFormsAdapter/formsMenu.test.ts +1 -1
- package/src/WalkTabixSyntenyAdapter/WalkTabixSyntenyAdapter.test.ts +54 -96
- package/src/WalkTabixSyntenyAdapter/WalkTabixSyntenyAdapter.ts +56 -152
- package/src/WalkTabixSyntenyAdapter/configSchema.ts +15 -16
- package/src/WalkTabixSyntenyAdapter/gbzParity.test.ts +5 -6
- package/src/WalkTabixSyntenyAdapter/walkLanes.ts +48 -142
- package/src/graphTrackConfig.test.ts +1 -1
- package/src/graphTrackDefaults/graphTrackDefaults.test.ts +7 -10
- package/src/launchFromGraph/syntenyTracks.test.ts +1 -1
- package/src/locationName.ts +2 -2
- package/src/panSNAliases/panSNAliases.test.ts +4 -6
- package/src/panSNTabix.test.ts +3 -23
- package/src/panSNTabix.ts +58 -34
- package/src/synteny/laneZoomNotice.test.ts +1 -0
- package/src/version.ts +1 -1
- package/dist/chunks/LinearGraphDisplay-2AZ7X7TK.js +0 -2
- package/dist/chunks/MinigraphBubbleAdapter-NR3MMUUG.js +0 -2
- package/dist/chunks/MinigraphBubbleAdapter-NR3MMUUG.js.map +0 -7
- package/dist/chunks/RgfaTabixAdapter-JDQLVQVP.js +0 -2
- package/dist/chunks/RgfaTabixAdapter-JDQLVQVP.js.map +0 -7
- package/dist/chunks/WalkFormsAdapter-YMQC3NLG.js +0 -2
- package/dist/chunks/WalkFormsAdapter-YMQC3NLG.js.map +0 -7
- package/dist/chunks/WalkTabixSyntenyAdapter-PBWN53PE.js +0 -2
- package/dist/chunks/WalkTabixSyntenyAdapter-PBWN53PE.js.map +0 -7
- package/dist/chunks/chunk-6VNDP3UB.js +0 -2
- package/dist/chunks/chunk-6VNDP3UB.js.map +0 -7
- package/dist/chunks/chunk-A27SW7X7.js +0 -2
- package/dist/chunks/chunk-A27SW7X7.js.map +0 -7
- package/dist/chunks/chunk-APSXG7SV.js +0 -2
- package/dist/chunks/chunk-DEWVJ57F.js +0 -4
- package/dist/chunks/chunk-DEWVJ57F.js.map +0 -7
- package/dist/chunks/chunk-EEWEXRY6.js +0 -2
- package/dist/chunks/chunk-EFXNCI7R.js +0 -9
- package/dist/chunks/chunk-EH5OCKSE.js +0 -3
- package/dist/chunks/chunk-EH5OCKSE.js.map +0 -7
- package/dist/chunks/chunk-GLSUAMGV.js +0 -3
- package/dist/chunks/chunk-GLSUAMGV.js.map +0 -7
- package/dist/chunks/chunk-LFQFVYNY.js.map +0 -7
- package/dist/chunks/chunk-QUDJ7AM3.js +0 -2
- package/dist/chunks/chunk-QUDJ7AM3.js.map +0 -7
- package/dist/chunks/chunk-T7LVVBTT.js +0 -2
- package/dist/chunks/chunk-T7LVVBTT.js.map +0 -7
- package/dist/chunks/chunk-ZBFIEBO6.js +0 -2
- package/dist/chunks/chunk-ZBFIEBO6.js.map +0 -7
- package/src/RgfaTabixAdapter/test_data/walks1_header.GRCh38.walks.bed.gz +0 -0
- package/src/RgfaTabixAdapter/test_data/walks1_header.GRCh38.walks.bed.gz.tbi +0 -0
- package/src/RgfaTabixAdapter/test_data/walks5_follow.GRCh38.walks.bed.gz +0 -0
- package/src/RgfaTabixAdapter/test_data/walks5_follow.GRCh38.walks.bed.gz.tbi +0 -0
- package/src/RgfaTabixAdapter/test_data/walks5_header.GRCh38.walks.bed.gz +0 -0
- package/src/RgfaTabixAdapter/test_data/walks5_header.GRCh38.walks.bed.gz.tbi +0 -0
- package/src/RgfaTabixAdapter/test_data/walks5_inversion.GRCh38.walks.bed.gz +0 -0
- package/src/RgfaTabixAdapter/test_data/walks5_inversion.GRCh38.walks.bed.gz.tbi +0 -0
- package/src/RgfaTabixAdapter/test_data/walks5_lanepairs.GRCh38.walks.bed.gz +0 -0
- package/src/RgfaTabixAdapter/test_data/walks5_lanepairs.GRCh38.walks.bed.gz.tbi +0 -0
- package/src/RgfaTabixAdapter/test_data/walks5_maxnode.GRCh38.walks.bed.gz +0 -0
- package/src/RgfaTabixAdapter/test_data/walks5_maxnode.GRCh38.walks.bed.gz.tbi +0 -0
- package/src/RgfaTabixAdapter/test_data/walks5_rejoin.GRCh38.walks.bed.gz +0 -0
- package/src/RgfaTabixAdapter/test_data/walks5_rejoin.GRCh38.walks.bed.gz.tbi +0 -0
- package/src/RgfaTabixAdapter/test_data/walks5_skip.GRCh38.walks.bed.gz +0 -0
- package/src/RgfaTabixAdapter/test_data/walks5_skip.GRCh38.walks.bed.gz.tbi +0 -0
- package/src/RgfaTabixAdapter/test_data/walks5_skipfollow.GRCh38.walks.bed.gz +0 -0
- package/src/RgfaTabixAdapter/test_data/walks5_skipfollow.GRCh38.walks.bed.gz.tbi +0 -0
- package/src/RgfaTabixAdapter/test_data/walks5_skipinv.GRCh38.walks.bed.gz +0 -0
- package/src/RgfaTabixAdapter/test_data/walks5_skipinv.GRCh38.walks.bed.gz.tbi +0 -0
- package/src/RgfaTabixAdapter/test_data/walks5_twopart.GRCh38.walks.bed.gz +0 -0
- package/src/RgfaTabixAdapter/test_data/walks5_twopart.GRCh38.walks.bed.gz.tbi +0 -0
- /package/dist/chunks/{GraphGenomeView-PPOVN5LA.js.map → GraphGenomeView-XFKLX3VQ.js.map} +0 -0
- /package/dist/chunks/{GraphTrackSettingsDialog-BRTDTVOJ.js.map → GraphTrackSettingsDialog-KOYYI2XH.js.map} +0 -0
- /package/dist/chunks/{HighlightColorDialog-CGW7J3SK.js.map → HighlightColorDialog-F4IARMEO.js.map} +0 -0
- /package/dist/chunks/{LinearGraphDisplay-2AZ7X7TK.js.map → LinearGraphDisplay-BZ44C6S3.js.map} +0 -0
- /package/dist/chunks/{chunk-APSXG7SV.js.map → chunk-TLUGH4VW.js.map} +0 -0
- /package/dist/chunks/{renderSvg-UKXPWKKV.js.map → renderSvg-DLJTA2B3.js.map} +0 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
H VN:Z:1.1
|
|
2
|
+
S 1 * LN:i:10
|
|
3
|
+
S 2 * LN:i:10
|
|
4
|
+
S 3 * LN:i:10
|
|
5
|
+
S 4 * LN:i:10
|
|
6
|
+
S 5 * LN:i:10
|
|
7
|
+
S 6 * LN:i:10
|
|
8
|
+
S 7 * LN:i:10
|
|
9
|
+
S 8 * LN:i:10
|
|
10
|
+
S 9 * LN:i:10
|
|
11
|
+
S 10 * LN:i:10
|
|
12
|
+
L 1 + 2 + 0M
|
|
13
|
+
L 2 + 3 + 0M
|
|
14
|
+
L 2 + 9 + 0M
|
|
15
|
+
L 3 + 4 + 0M
|
|
16
|
+
L 4 + 5 + 0M
|
|
17
|
+
L 5 + 6 + 0M
|
|
18
|
+
L 6 + 7 + 0M
|
|
19
|
+
L 7 + 8 + 0M
|
|
20
|
+
L 8 + 9 + 0M
|
|
21
|
+
L 9 + 10 + 0M
|
|
22
|
+
W GRCh38 0 chr1 0 100 >1>2>3>4>5>6>7>8>9>10
|
|
23
|
+
W HG002 1 ctg 0 40 >1>2>9>10
|
|
Binary file
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
H VN:Z:1.1
|
|
2
|
+
S 1 * LN:i:1000
|
|
3
|
+
S 2 * LN:i:1000
|
|
4
|
+
S 3 * LN:i:1000
|
|
5
|
+
S 4 * LN:i:1000
|
|
6
|
+
S 5 * LN:i:1000
|
|
7
|
+
S 6 * LN:i:1000
|
|
8
|
+
S 7 * LN:i:1000
|
|
9
|
+
S 8 * LN:i:1000
|
|
10
|
+
S 9 * LN:i:1000
|
|
11
|
+
S 10 * LN:i:1000
|
|
12
|
+
S 11 * LN:i:1000
|
|
13
|
+
S 12 * LN:i:1000
|
|
14
|
+
S 13 * LN:i:1000
|
|
15
|
+
S 14 * LN:i:1000
|
|
16
|
+
S 15 * LN:i:1000
|
|
17
|
+
S 16 * LN:i:1000
|
|
18
|
+
S 17 * LN:i:1000
|
|
19
|
+
S 18 * LN:i:1000
|
|
20
|
+
S 19 * LN:i:1000
|
|
21
|
+
S 20 * LN:i:1000
|
|
22
|
+
S 99 * LN:i:500
|
|
23
|
+
L 1 + 2 + 0M
|
|
24
|
+
L 10 + 11 + 0M
|
|
25
|
+
L 11 + 12 + 0M
|
|
26
|
+
L 12 + 13 + 0M
|
|
27
|
+
L 13 + 14 + 0M
|
|
28
|
+
L 14 + 15 + 0M
|
|
29
|
+
L 15 + 16 + 0M
|
|
30
|
+
L 16 + 17 + 0M
|
|
31
|
+
L 17 + 18 + 0M
|
|
32
|
+
L 18 + 19 + 0M
|
|
33
|
+
L 19 + 20 + 0M
|
|
34
|
+
L 2 + 3 + 0M
|
|
35
|
+
L 2 + 6 + 0M
|
|
36
|
+
L 2 + 99 + 0M
|
|
37
|
+
L 3 + 4 + 0M
|
|
38
|
+
L 4 + 5 + 0M
|
|
39
|
+
L 5 + 6 + 0M
|
|
40
|
+
L 6 + 7 + 0M
|
|
41
|
+
L 6 - 99 - 0M
|
|
42
|
+
L 7 + 8 + 0M
|
|
43
|
+
L 8 + 9 + 0M
|
|
44
|
+
L 9 + 10 + 0M
|
|
45
|
+
W GRCh38 0 chr1 0 20000 >1>2>3>4>5>6>7>8>9>10>11>12>13>14>15>16>17>18>19>20
|
|
46
|
+
W HG002 1 ctg 0 17000 >1>2>6>7>8>9>10>11>12>13>14>15>16>17>18>19>20
|
|
47
|
+
W HG003 1 ctg 0 20000 >1>2>3>4>5>6>7>8>9>10>11>12>13>14>15>16>17>18>19>20
|
|
48
|
+
W HG004 1 ctg 0 17000 <20<19<18<17<16<15<14<13<12<11<10<9<8<7<6<2<1
|
|
49
|
+
W HG005 1 ctg 0 17500 >1>2>99>6>7>8>9>10>11>12>13>14>15>16>17>18>19>20
|
|
50
|
+
W HG007 1 ctg 100000 117000 >1>2>6>7>8>9>10>11>12>13>14>15>16>17>18>19>20
|
|
Binary file
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
H VN:Z:1.1
|
|
2
|
+
S 1 * LN:i:1000
|
|
3
|
+
S 2 * LN:i:1000
|
|
4
|
+
S 3 * LN:i:1000
|
|
5
|
+
S 4 * LN:i:1000
|
|
6
|
+
S 5 * LN:i:1000
|
|
7
|
+
S 6 * LN:i:1000
|
|
8
|
+
S 7 * LN:i:1000
|
|
9
|
+
S 8 * LN:i:1000
|
|
10
|
+
S 9 * LN:i:1000
|
|
11
|
+
S 10 * LN:i:1000
|
|
12
|
+
S 11 * LN:i:1000
|
|
13
|
+
S 12 * LN:i:1000
|
|
14
|
+
S 13 * LN:i:1000
|
|
15
|
+
S 14 * LN:i:1000
|
|
16
|
+
S 15 * LN:i:1000
|
|
17
|
+
S 16 * LN:i:1000
|
|
18
|
+
S 17 * LN:i:1000
|
|
19
|
+
S 18 * LN:i:1000
|
|
20
|
+
S 19 * LN:i:1000
|
|
21
|
+
S 20 * LN:i:1000
|
|
22
|
+
L 1 + 2 + 0M
|
|
23
|
+
L 1 + 2 - 0M
|
|
24
|
+
L 10 + 11 + 0M
|
|
25
|
+
L 11 + 12 + 0M
|
|
26
|
+
L 12 + 13 + 0M
|
|
27
|
+
L 13 + 14 + 0M
|
|
28
|
+
L 14 + 15 + 0M
|
|
29
|
+
L 15 + 16 + 0M
|
|
30
|
+
L 16 + 17 + 0M
|
|
31
|
+
L 17 + 18 + 0M
|
|
32
|
+
L 18 + 19 + 0M
|
|
33
|
+
L 19 + 20 + 0M
|
|
34
|
+
L 2 + 3 + 0M
|
|
35
|
+
L 2 - 6 + 0M
|
|
36
|
+
L 3 + 4 + 0M
|
|
37
|
+
L 4 + 5 + 0M
|
|
38
|
+
L 5 + 6 + 0M
|
|
39
|
+
L 6 + 7 + 0M
|
|
40
|
+
L 7 + 8 + 0M
|
|
41
|
+
L 8 + 9 + 0M
|
|
42
|
+
L 9 + 10 + 0M
|
|
43
|
+
W GRCh38 0 chr1 0 20000 >1>2>3>4>5>6>7>8>9>10>11>12>13>14>15>16>17>18>19>20
|
|
44
|
+
W HG003 1 ctg 0 20000 >1>2>3>4>5>6>7>8>9>10>11>12>13>14>15>16>17>18>19>20
|
|
45
|
+
W HG008 1 ctg 0 17000 >1<2>6>7>8>9>10>11>12>13>14>15>16>17>18>19>20
|
|
Binary file
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
H VN:Z:1.1
|
|
2
|
+
S 1 * LN:i:600
|
|
3
|
+
S 2 * LN:i:600
|
|
4
|
+
S 3 * LN:i:600
|
|
5
|
+
S 4 * LN:i:600
|
|
6
|
+
S 5 * LN:i:600
|
|
7
|
+
S 6 * LN:i:600
|
|
8
|
+
S 7 * LN:i:550
|
|
9
|
+
S 8 * LN:i:20
|
|
10
|
+
L 1 + 2 + 0M
|
|
11
|
+
L 2 + 3 + 0M
|
|
12
|
+
L 2 + 7 + 0M
|
|
13
|
+
L 3 + 4 + 0M
|
|
14
|
+
L 4 + 5 + 0M
|
|
15
|
+
L 4 + 8 + 0M
|
|
16
|
+
L 4 - 7 - 0M
|
|
17
|
+
L 5 + 6 + 0M
|
|
18
|
+
L 6 - 8 - 0M
|
|
19
|
+
P GRCh38#chr1 1+,2+,3+,4+,5+,6+ *
|
|
20
|
+
W HG00097 1 chr1 0 3600 >1>2>3>4>5>6
|
|
21
|
+
W HG002 1 chr1 0 3550 >1>2>7>4>5>6
|
|
22
|
+
W HG002 2 chr1 0 3020 >1>2>3>4>8>6
|
|
Binary file
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { existsSync } from 'node:fs'
|
|
2
2
|
|
|
3
|
-
import { TabixIndexedFile } from '@gmod/tabix'
|
|
4
3
|
import {
|
|
5
4
|
graphFromTables,
|
|
6
5
|
graphTablesGFA,
|
|
7
6
|
} from '@jbrowse/bandage-core/gfa/graphTables'
|
|
8
7
|
import { walkRowsOf } from '@jbrowse/bandage-core/layout/walkRowRuns'
|
|
9
8
|
import { readConfObject } from '@jbrowse/core/configuration'
|
|
10
|
-
import { WalkReader } from '@jbrowse/graph-walks'
|
|
9
|
+
import { WalkFile, WalkReader } from '@jbrowse/graph-walks'
|
|
11
10
|
import { firstValueFrom } from 'rxjs'
|
|
12
11
|
import { toArray } from 'rxjs/operators'
|
|
13
12
|
|
|
@@ -19,54 +18,57 @@ import type { WalkCut } from './walkCut.ts'
|
|
|
19
18
|
import type { GraphTables } from '@jbrowse/bandage-core/gfa/graphTables'
|
|
20
19
|
|
|
21
20
|
// chr22 of HPRC v2.1 at base level, one walk file per reference in walk
|
|
22
|
-
// format
|
|
23
|
-
//
|
|
24
|
-
const chr22 = '/home/cdiesh/work/scratch/
|
|
21
|
+
// format 7, built under ~/work/scratch/walks7. Skipped where the files are
|
|
22
|
+
// absent.
|
|
23
|
+
const chr22 = '/home/cdiesh/work/scratch/walks7/chr22'
|
|
25
24
|
const present = ['GRCh38', 'CHM13'].every(sample =>
|
|
26
|
-
existsSync(`${chr22}.${sample}.walks.
|
|
25
|
+
existsSync(`${chr22}.${sample}.walks.gz`),
|
|
27
26
|
)
|
|
28
27
|
|
|
28
|
+
// The walk files under test_data/walks7, which its build.sh writes from the
|
|
29
|
+
// GFAs beside them
|
|
29
30
|
const fixture = (name: string) =>
|
|
30
31
|
require
|
|
31
|
-
.resolve(`./test_data/${name}.GRCh38.walks.
|
|
32
|
-
.replace(/\.walks\.
|
|
32
|
+
.resolve(`./test_data/walks7/${name}.GRCh38.walks.gz`)
|
|
33
|
+
.replace(/\.walks\.gz$/, '')
|
|
33
34
|
|
|
34
|
-
// Four walks over a 3.6 kb reference in 1 kb
|
|
35
|
+
// Four walks over a 3.6 kb reference in 1 kb tiles:
|
|
35
36
|
// W GRCh38 0 chr1 >1>2>3>4>5>6
|
|
36
37
|
// W HG002 1 chr1 >1>2>7>4>5>6 7 replaces 3
|
|
37
38
|
// W HG002 2 chr1 >1>2>3>4>8>6 8 replaces 5
|
|
38
39
|
// W HG00097 1 chr1 >1>2>3>4>5>6
|
|
39
|
-
const headerPrefix = fixture('
|
|
40
|
+
const headerPrefix = fixture('header')
|
|
40
41
|
|
|
41
|
-
//
|
|
42
|
+
// header's walks with the reference named as pggb names a P-line,
|
|
42
43
|
// GRCh38#chr1
|
|
43
|
-
const twoPartPrefix = fixture('
|
|
44
|
+
const twoPartPrefix = fixture('twopart')
|
|
44
45
|
|
|
45
|
-
// An unchopped graph, node 1 spanning 0-2600
|
|
46
|
+
// An unchopped graph, node 1 spanning 0-2600, longer than its 1 kb tile:
|
|
46
47
|
// W GRCh38 0 chr1 >1>2>4
|
|
47
48
|
// W HG002 1 chr1 >1>3>4 3 replaces 2
|
|
48
|
-
const maxNodePrefix = fixture('
|
|
49
|
+
const maxNodePrefix = fixture('maxnode')
|
|
49
50
|
|
|
50
|
-
// Twelve 500 bp reference nodes over chr1:0-6000 in one 10 kb
|
|
51
|
+
// Twelve 500 bp reference nodes over chr1:0-6000 in one 10 kb tile:
|
|
51
52
|
// W GRCh38 0 chr1 >1>2>3>4>5>6>7>8>9>10>11>12
|
|
52
53
|
// W HG002 1 chr1 >1>2>3>20>21>9>10>11>12 20 and 21, 2 kb each, replace 4-8
|
|
53
54
|
// W HG002 2 chr1 >1>2>3>4>5>6>7>8>9>10>11>12
|
|
54
55
|
// W HG003 1 chr1 >1>2>3>22 the contig ends on 22, 300 bp
|
|
55
|
-
const rejoinPrefix = fixture('
|
|
56
|
+
const rejoinPrefix = fixture('rejoin')
|
|
56
57
|
|
|
57
|
-
// The same graph in 1 kb
|
|
58
|
-
//
|
|
59
|
-
const followPrefix = fixture('
|
|
58
|
+
// The same graph in 1 kb tiles: HG002#1 leaves tile 1000 at 1500 for 20 and
|
|
59
|
+
// 21 and rejoins at 4000, in tile 4000
|
|
60
|
+
const followPrefix = fixture('follow')
|
|
61
|
+
|
|
62
|
+
const local = (path: string) => ({
|
|
63
|
+
localPath: path,
|
|
64
|
+
locationType: 'LocalPathLocation',
|
|
65
|
+
})
|
|
60
66
|
|
|
61
67
|
function makeAdapter(prefix: string, slots = {}) {
|
|
62
|
-
const local = (path: string) => ({
|
|
63
|
-
localPath: path,
|
|
64
|
-
locationType: 'LocalPathLocation',
|
|
65
|
-
})
|
|
66
68
|
return new Adapter(
|
|
67
69
|
configSchema.create({
|
|
68
|
-
walksLocation: local(`${prefix}.walks.
|
|
69
|
-
walksIndex:
|
|
70
|
+
walksLocation: local(`${prefix}.walks.gz`),
|
|
71
|
+
walksIndex: local(`${prefix}.walks.gz.idx`),
|
|
70
72
|
assemblyNameToPanSN: { hg38: 'GRCh38', hs1: 'CHM13' },
|
|
71
73
|
...slots,
|
|
72
74
|
}),
|
|
@@ -156,7 +158,7 @@ test.skipIf(!present)(
|
|
|
156
158
|
)
|
|
157
159
|
|
|
158
160
|
test.skipIf(!present)(
|
|
159
|
-
'the densest
|
|
161
|
+
'the densest tile is past the step budget for every haplotype',
|
|
160
162
|
async () => {
|
|
161
163
|
const cut = makeAdapter(`${chr22}.GRCh38`, {
|
|
162
164
|
walkByteBudget: 100_000_000,
|
|
@@ -174,17 +176,18 @@ test.skipIf(!present)(
|
|
|
174
176
|
60_000,
|
|
175
177
|
)
|
|
176
178
|
|
|
177
|
-
test('walksUri names the walk file and its
|
|
179
|
+
test('walksUri names the walk file and its directory', () => {
|
|
178
180
|
const config = configSchema.create({
|
|
179
181
|
walksUri: 'hprc.GRCh38',
|
|
180
182
|
baseUri: 'https://example.com/',
|
|
181
183
|
})
|
|
182
184
|
expect(readConfObject(config, 'walksLocation')).toMatchObject({
|
|
183
|
-
uri: 'hprc.GRCh38.walks.
|
|
185
|
+
uri: 'hprc.GRCh38.walks.gz',
|
|
184
186
|
baseUri: 'https://example.com/',
|
|
185
187
|
})
|
|
186
|
-
expect(readConfObject(config,
|
|
187
|
-
uri: 'hprc.GRCh38.walks.
|
|
188
|
+
expect(readConfObject(config, 'walksIndex')).toMatchObject({
|
|
189
|
+
uri: 'hprc.GRCh38.walks.gz.idx',
|
|
190
|
+
baseUri: 'https://example.com/',
|
|
188
191
|
})
|
|
189
192
|
})
|
|
190
193
|
|
|
@@ -203,6 +206,20 @@ test("the haplotypes a walk file's header names", async () => {
|
|
|
203
206
|
expect(gfa).not.toMatch(/^S\t8\t/m)
|
|
204
207
|
})
|
|
205
208
|
|
|
209
|
+
test('an unset walksIndex reads the directory beside the walk file', async () => {
|
|
210
|
+
const adapter = new Adapter(
|
|
211
|
+
configSchema.create({
|
|
212
|
+
walksLocation: local(`${headerPrefix}.walks.gz`),
|
|
213
|
+
assemblyNameToPanSN: { hg38: 'GRCh38' },
|
|
214
|
+
}),
|
|
215
|
+
)
|
|
216
|
+
expect(await adapter.getHaplotypeNames()).toEqual([
|
|
217
|
+
'HG00097#1',
|
|
218
|
+
'HG002#1',
|
|
219
|
+
'HG002#2',
|
|
220
|
+
])
|
|
221
|
+
})
|
|
222
|
+
|
|
206
223
|
test('a cut asked to expand walks hands the reader their names', async () => {
|
|
207
224
|
const cut = vi.spyOn(WalkReader.prototype, 'cut')
|
|
208
225
|
await makeAdapter(headerPrefix).getSubgraph(chr1(1000, 2600), {
|
|
@@ -275,13 +292,8 @@ test('a cut for some haplotypes keeps a reference walk named without a haplotype
|
|
|
275
292
|
])
|
|
276
293
|
})
|
|
277
294
|
|
|
278
|
-
test('a
|
|
279
|
-
const
|
|
280
|
-
await expect(cut).rejects.toThrow(/rebuild it with gfa-to-tabix 1.4/)
|
|
281
|
-
})
|
|
282
|
-
|
|
283
|
-
test('a cut over walkByteBudget reads no row', async () => {
|
|
284
|
-
const getLines = vi.spyOn(TabixIndexedFile.prototype, 'getLines')
|
|
295
|
+
test('a cut over walkByteBudget reads no unit', async () => {
|
|
296
|
+
const read = vi.spyOn(WalkFile.prototype, 'read')
|
|
285
297
|
const cut = makeAdapter(headerPrefix, { walkByteBudget: 100 }).getSubgraph(
|
|
286
298
|
chr1(1000, 2600),
|
|
287
299
|
)
|
|
@@ -289,19 +301,13 @@ test('a cut over walkByteBudget reads no row', async () => {
|
|
|
289
301
|
name: 'NodeLimitError',
|
|
290
302
|
message: expect.stringMatching(/walkByteBudget/),
|
|
291
303
|
})
|
|
292
|
-
expect(
|
|
293
|
-
|
|
304
|
+
expect(read).not.toHaveBeenCalled()
|
|
305
|
+
read.mockRestore()
|
|
294
306
|
})
|
|
295
307
|
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
const getLines = vi
|
|
300
|
-
.spyOn(TabixIndexedFile.prototype, 'getLines')
|
|
301
|
-
.mockResolvedValue()
|
|
302
|
-
const bytes = vi
|
|
303
|
-
.spyOn(TabixIndexedFile.prototype, 'bytesForRegions')
|
|
304
|
-
.mockResolvedValue(0)
|
|
308
|
+
test('a cut or a feature read over a range that is not finite reads nothing', async () => {
|
|
309
|
+
const read = vi.spyOn(WalkFile.prototype, 'read')
|
|
310
|
+
const bytesFor = vi.spyOn(WalkReader.prototype, 'bytesFor')
|
|
305
311
|
const adapter = makeAdapter(headerPrefix)
|
|
306
312
|
const region = chr1(Number.NaN, 2600)
|
|
307
313
|
await expect(adapter.getSubgraph(region)).rejects.toThrow(
|
|
@@ -313,19 +319,19 @@ test('a cut or a feature read over a range that is not finite queries nothing',
|
|
|
313
319
|
await expect(adapter.getRegionByteSize([region])).rejects.toThrow(
|
|
314
320
|
/not a finite range/,
|
|
315
321
|
)
|
|
316
|
-
expect(
|
|
317
|
-
expect(
|
|
318
|
-
|
|
319
|
-
|
|
322
|
+
expect(read).not.toHaveBeenCalled()
|
|
323
|
+
expect(bytesFor).not.toHaveBeenCalled()
|
|
324
|
+
read.mockRestore()
|
|
325
|
+
bytesFor.mockRestore()
|
|
320
326
|
})
|
|
321
327
|
|
|
322
|
-
test(
|
|
328
|
+
test('a node longer than a tile is read from the tile its extent names', async () => {
|
|
323
329
|
const adapter = makeAdapter(maxNodePrefix)
|
|
324
330
|
const region = chr1(2100, 2500)
|
|
325
331
|
const features = await firstValueFrom(
|
|
326
332
|
adapter.getFeatures(region).pipe(toArray()),
|
|
327
333
|
)
|
|
328
|
-
expect(features.map(f => f.get('name'))).
|
|
334
|
+
expect(features.map(f => f.get('name'))).toEqual(['1'])
|
|
329
335
|
const gfa = await gfaOf(adapter.getSubgraph(region))
|
|
330
336
|
expect(gfa).toMatch(/^S\t1\t/m)
|
|
331
337
|
expect(gfa).toMatch(/^W\tGRCh38\t0\tchr1\t0\t3800\t>1>2>4(\t|$)/m)
|
|
@@ -339,99 +345,105 @@ test("a walk-indexed graph's features are the reference nodes overlapping the wi
|
|
|
339
345
|
expect(features.map(f => f.get('name'))).toEqual(['2', '3', '4'])
|
|
340
346
|
})
|
|
341
347
|
|
|
342
|
-
test('the byte gate measures
|
|
343
|
-
const
|
|
348
|
+
test('the byte gate measures the bytes a cut of the window reads', async () => {
|
|
349
|
+
const bytesFor = vi.spyOn(WalkReader.prototype, 'bytesFor')
|
|
344
350
|
const size = await makeAdapter(headerPrefix).getRegionByteSize([
|
|
345
351
|
chr1(2100, 2600),
|
|
346
352
|
])
|
|
347
353
|
expect(size).toBeGreaterThan(0)
|
|
348
|
-
expect(
|
|
349
|
-
[
|
|
354
|
+
expect(bytesFor.mock.calls.map(call => call.slice(0, 2))).toEqual([
|
|
355
|
+
['GRCh38#0#chr1', { start: 2100, end: 2600 }],
|
|
350
356
|
])
|
|
351
|
-
|
|
352
|
-
})
|
|
353
|
-
|
|
354
|
-
test('getFeatures reads from the chunk before the window', async () => {
|
|
355
|
-
const getLines = vi.spyOn(TabixIndexedFile.prototype, 'getLines')
|
|
356
|
-
await firstValueFrom(
|
|
357
|
-
makeAdapter(headerPrefix).getFeatures(chr1(2100, 2600)).pipe(toArray()),
|
|
358
|
-
)
|
|
359
|
-
expect(getLines.mock.calls.map(call => call[1])).toEqual([1000])
|
|
360
|
-
getLines.mockRestore()
|
|
357
|
+
bytesFor.mockRestore()
|
|
361
358
|
})
|
|
362
359
|
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
complete
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
360
|
+
// A fragment runs from its walk's first step on the drawn stretch to its
|
|
361
|
+
// last, so HG002#1's ends at 3 and its departure says where it goes on, and
|
|
362
|
+
// HG003#1's ends at 3 with 22 trimmed, which no departure follows
|
|
363
|
+
test.each([
|
|
364
|
+
['one 10 kb tile', rejoinPrefix],
|
|
365
|
+
['1 kb tiles', followPrefix],
|
|
366
|
+
])(
|
|
367
|
+
'a walk leaving the window says where it rejoins the reference, in %s',
|
|
368
|
+
async (_, prefix) => {
|
|
369
|
+
const cut = (await makeAdapter(prefix).getSubgraph(chr1(1000, 1500), {
|
|
370
|
+
walkRows: true,
|
|
371
|
+
})) as WalkCut
|
|
372
|
+
const rows = walkRowsOf(cut.walkRowRuns!).rows.map(
|
|
373
|
+
({ label, bp, complete, stop }) => ({ label, bp, complete, stop }),
|
|
374
|
+
)
|
|
375
|
+
expect(rows).toEqual([
|
|
376
|
+
{ label: 'HG002#2', bp: 500, complete: true, stop: undefined },
|
|
377
|
+
{
|
|
378
|
+
label: 'HG002#1',
|
|
379
|
+
bp: 500,
|
|
380
|
+
complete: false,
|
|
381
|
+
stop: {
|
|
382
|
+
contigEnds: false,
|
|
383
|
+
shortBp: 0,
|
|
384
|
+
goesOn: {
|
|
385
|
+
near: 4000,
|
|
386
|
+
departure: expect.objectContaining({
|
|
387
|
+
leavePos: 1500,
|
|
388
|
+
rejoinPos: 4000,
|
|
389
|
+
ownBp: 4000,
|
|
390
|
+
}),
|
|
391
|
+
},
|
|
392
|
+
},
|
|
393
|
+
},
|
|
394
|
+
{
|
|
395
|
+
label: 'HG003#1',
|
|
396
|
+
bp: 500,
|
|
397
|
+
complete: false,
|
|
398
|
+
stop: { contigEnds: false, shortBp: 0 },
|
|
399
|
+
},
|
|
400
|
+
])
|
|
401
|
+
},
|
|
402
|
+
)
|
|
381
403
|
|
|
382
|
-
// gfa-to-tabix
|
|
404
|
+
// gfa-to-tabix --walks --tile 10 of ten 10 bp reference nodes:
|
|
383
405
|
// W GRCh38 0 chr1 >1>2>3>4>5>6>7>8>9>10
|
|
384
|
-
// W HG002 1 ctg >1>2>9>10 a
|
|
385
|
-
const skipPrefix = fixture('
|
|
406
|
+
// W HG002 1 ctg >1>2>9>10 a departure from 20 to 80 with nothing between
|
|
407
|
+
const skipPrefix = fixture('skip')
|
|
386
408
|
|
|
387
|
-
// HG002
|
|
388
|
-
|
|
409
|
+
// HG002 steps on 2 and 9, the reference nodes either side of the window, so
|
|
410
|
+
// its row across the reference's 30 bp is its departure from 20 to 80
|
|
411
|
+
test('a haplotype that jumps over the window draws as a row of its departure', async () => {
|
|
389
412
|
const cut = (await makeAdapter(skipPrefix).getSubgraph(chr1(31, 60), {
|
|
390
413
|
walkRows: true,
|
|
391
414
|
})) as WalkCut
|
|
392
415
|
const { reference, rows } = walkRowsOf(cut.walkRowRuns!)
|
|
393
|
-
expect(reference.bp).toBe(
|
|
416
|
+
expect(reference.bp).toBe(30)
|
|
394
417
|
expect(
|
|
395
|
-
rows.map(({ label, bp, gapBp, complete }) => ({
|
|
418
|
+
rows.map(({ label, bp, gapBp, complete, stepless, runs }) => ({
|
|
396
419
|
label,
|
|
397
420
|
bp,
|
|
398
421
|
gapBp,
|
|
399
422
|
complete,
|
|
423
|
+
stepless,
|
|
424
|
+
runs: runs.map(({ start, bp, cause }) => ({ start, bp, cause })),
|
|
400
425
|
})),
|
|
401
|
-
).toEqual([
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
walkRows: true,
|
|
411
|
-
})) as WalkCut
|
|
412
|
-
const reads = getLines.mock.calls.map(call => [call[1], call[2]])
|
|
413
|
-
getLines.mockRestore()
|
|
414
|
-
const rows = walkRowsOf(cut.walkRowRuns!).rows.map(
|
|
415
|
-
({ label, bp, complete }) => ({ label, bp, complete }),
|
|
416
|
-
)
|
|
417
|
-
expect(rows).toEqual([
|
|
418
|
-
{ label: 'HG002#1', bp: 4500, complete: true },
|
|
419
|
-
{ label: 'HG002#2', bp: 500, complete: true },
|
|
420
|
-
{ label: 'HG003#1', bp: 800, complete: false },
|
|
426
|
+
).toEqual([
|
|
427
|
+
{
|
|
428
|
+
label: 'HG002#1',
|
|
429
|
+
bp: 0,
|
|
430
|
+
gapBp: 30,
|
|
431
|
+
complete: true,
|
|
432
|
+
stepless: true,
|
|
433
|
+
runs: [{ start: 0, bp: 30, cause: 'departure' }],
|
|
434
|
+
},
|
|
421
435
|
])
|
|
422
|
-
// the window's chunks, then on to chunk 4000; HG003#1's contig ends
|
|
423
|
-
expect(new Set(reads.map(String))).toEqual(new Set(['0,1500', '2000,4001']))
|
|
424
436
|
})
|
|
425
437
|
|
|
426
|
-
test('a cut on a signal already aborted reads no
|
|
438
|
+
test('a cut on a signal already aborted reads no unit', async () => {
|
|
427
439
|
const adapter = makeAdapter(headerPrefix)
|
|
428
440
|
await adapter.getHaplotypeNames()
|
|
429
|
-
const
|
|
441
|
+
const read = vi.spyOn(WalkFile.prototype, 'read')
|
|
430
442
|
const aborted = new AbortController()
|
|
431
443
|
aborted.abort(new Error('panned away'))
|
|
432
444
|
await expect(
|
|
433
445
|
adapter.getSubgraph(chr1(1000, 2600), { signal: aborted.signal }),
|
|
434
446
|
).rejects.toThrow()
|
|
435
|
-
expect(
|
|
436
|
-
|
|
447
|
+
expect(read).not.toHaveBeenCalled()
|
|
448
|
+
read.mockRestore()
|
|
437
449
|
})
|