bio-grumpy 1.1.2__tar.gz → 1.1.4__tar.gz

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 (32) hide show
  1. {bio_grumpy-1.1.2 → bio_grumpy-1.1.4}/Cargo.lock +65 -177
  2. {bio_grumpy-1.1.2 → bio_grumpy-1.1.4}/Cargo.toml +2 -2
  3. {bio_grumpy-1.1.2 → bio_grumpy-1.1.4}/PKG-INFO +1 -1
  4. {bio_grumpy-1.1.2 → bio_grumpy-1.1.4}/src/difference.rs +80 -38
  5. {bio_grumpy-1.1.2 → bio_grumpy-1.1.4}/src/gene.rs +12 -2
  6. {bio_grumpy-1.1.2 → bio_grumpy-1.1.4}/src/genome.rs +50 -47
  7. {bio_grumpy-1.1.2 → bio_grumpy-1.1.4}/src/lib.rs +1 -0
  8. {bio_grumpy-1.1.2 → bio_grumpy-1.1.4}/src/vcf.rs +10 -3
  9. bio_grumpy-1.1.4/test/intracellulare.vcf +21 -0
  10. {bio_grumpy-1.1.2 → bio_grumpy-1.1.4}/.github/workflows/release.yaml +0 -0
  11. {bio_grumpy-1.1.2 → bio_grumpy-1.1.4}/.github/workflows/test.yaml +0 -0
  12. {bio_grumpy-1.1.2 → bio_grumpy-1.1.4}/.gitignore +0 -0
  13. {bio_grumpy-1.1.2 → bio_grumpy-1.1.4}/LICENSE +0 -0
  14. {bio_grumpy-1.1.2 → bio_grumpy-1.1.4}/README-python.md +0 -0
  15. {bio_grumpy-1.1.2 → bio_grumpy-1.1.4}/README.md +0 -0
  16. {bio_grumpy-1.1.2 → bio_grumpy-1.1.4}/pyproject.toml +0 -0
  17. {bio_grumpy-1.1.2 → bio_grumpy-1.1.4}/reference/MN908947.3.gb +0 -0
  18. {bio_grumpy-1.1.2 → bio_grumpy-1.1.4}/reference/NC_000962.3.gbk +0 -0
  19. {bio_grumpy-1.1.2 → bio_grumpy-1.1.4}/reference/NZ_CP085945.1.gbk +0 -0
  20. {bio_grumpy-1.1.2 → bio_grumpy-1.1.4}/reference/TEST-DNA.gbk +0 -0
  21. {bio_grumpy-1.1.2 → bio_grumpy-1.1.4}/src/common.rs +0 -0
  22. {bio_grumpy-1.1.2 → bio_grumpy-1.1.4}/src/main.rs +0 -0
  23. {bio_grumpy-1.1.2 → bio_grumpy-1.1.4}/test/TEST-DNA-4-minor.vcf +0 -0
  24. {bio_grumpy-1.1.2 → bio_grumpy-1.1.4}/test/TEST-DNA-4.vcf +0 -0
  25. {bio_grumpy-1.1.2 → bio_grumpy-1.1.4}/test/TEST-DNA-misc-indel.vcf +0 -0
  26. {bio_grumpy-1.1.2 → bio_grumpy-1.1.4}/test/TEST-DNA.vcf +0 -0
  27. {bio_grumpy-1.1.2 → bio_grumpy-1.1.4}/test/complex.vcf +0 -0
  28. {bio_grumpy-1.1.2 → bio_grumpy-1.1.4}/test/dummy.vcf +0 -0
  29. {bio_grumpy-1.1.2 → bio_grumpy-1.1.4}/test/minor-populations-revcomp-AD.vcf +0 -0
  30. {bio_grumpy-1.1.2 → bio_grumpy-1.1.4}/test/minor-populations-revcomp.vcf +0 -0
  31. {bio_grumpy-1.1.2 → bio_grumpy-1.1.4}/test/revcomp-del-first-pos.vcf +0 -0
  32. {bio_grumpy-1.1.2 → bio_grumpy-1.1.4}/test/tb-snp-after-del.vcf +0 -0
@@ -60,9 +60,9 @@ checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8"
60
60
 
61
61
  [[package]]
62
62
  name = "bitflags"
63
- version = "2.10.0"
63
+ version = "2.11.0"
64
64
  source = "registry+https://github.com/rust-lang/crates.io-index"
65
- checksum = "812e12b5285cc515a9c72a5c1d3b6d46a19dac5acfef5265968c166106e31dd3"
65
+ checksum = "843867be96c8daad0d758b57df9392b6d8d271134fce549de6ce169ff98a92af"
66
66
 
67
67
  [[package]]
68
68
  name = "cfg-if"
@@ -78,9 +78,9 @@ checksum = "b0fc239e0f6cb375d2402d48afb92f76f5404fd1df208a41930ec81eda078bea"
78
78
 
79
79
  [[package]]
80
80
  name = "clap"
81
- version = "4.5.53"
81
+ version = "4.5.60"
82
82
  source = "registry+https://github.com/rust-lang/crates.io-index"
83
- checksum = "c9e340e012a1bf4935f5282ed1436d1489548e8f72308207ea5df0e23d2d03f8"
83
+ checksum = "2797f34da339ce31042b27d23607e051786132987f595b02ba4f6a6dffb7030a"
84
84
  dependencies = [
85
85
  "clap_builder",
86
86
  "clap_derive",
@@ -88,9 +88,9 @@ dependencies = [
88
88
 
89
89
  [[package]]
90
90
  name = "clap_builder"
91
- version = "4.5.53"
91
+ version = "4.5.60"
92
92
  source = "registry+https://github.com/rust-lang/crates.io-index"
93
- checksum = "d76b5d13eaa18c901fd2f7fca939fefe3a0727a953561fefdf3b2922b8569d00"
93
+ checksum = "24a241312cea5059b13574bb9b3861cabf758b879c15190b37b6d6fd63ab6876"
94
94
  dependencies = [
95
95
  "anstream",
96
96
  "anstyle",
@@ -100,21 +100,21 @@ dependencies = [
100
100
 
101
101
  [[package]]
102
102
  name = "clap_derive"
103
- version = "4.5.49"
103
+ version = "4.5.55"
104
104
  source = "registry+https://github.com/rust-lang/crates.io-index"
105
- checksum = "2a0b5487afeab2deb2ff4e03a807ad1a03ac532ff5a2cee5d86884440c7f7671"
105
+ checksum = "a92793da1a46a5f2a02a6f4c46c6496b28c43638adea8306fcb0caa1634f24e5"
106
106
  dependencies = [
107
107
  "heck",
108
108
  "proc-macro2",
109
109
  "quote",
110
- "syn 2.0.111",
110
+ "syn",
111
111
  ]
112
112
 
113
113
  [[package]]
114
114
  name = "clap_lex"
115
- version = "0.7.6"
115
+ version = "1.0.0"
116
116
  source = "registry+https://github.com/rust-lang/crates.io-index"
117
- checksum = "a1d728cc89cf3aee9ff92b05e62b19ee65a02b5702cff7d5a377e32c6ae29d8d"
117
+ checksum = "3a822ea5bc7590f9d40f1ba12c0dc3c2760f3482c6984db1573ad11031420831"
118
118
 
119
119
  [[package]]
120
120
  name = "colorchoice"
@@ -159,40 +159,22 @@ version = "1.15.0"
159
159
  source = "registry+https://github.com/rust-lang/crates.io-index"
160
160
  checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719"
161
161
 
162
- [[package]]
163
- name = "err-derive"
164
- version = "0.3.1"
165
- source = "registry+https://github.com/rust-lang/crates.io-index"
166
- checksum = "c34a887c8df3ed90498c1c437ce21f211c8e27672921a8ffa293cb8d6d4caa9e"
167
- dependencies = [
168
- "proc-macro-error",
169
- "proc-macro2",
170
- "quote",
171
- "rustversion",
172
- "syn 1.0.109",
173
- "synstructure",
174
- ]
175
-
176
162
  [[package]]
177
163
  name = "gb-io"
178
- version = "0.7.1"
164
+ version = "0.9.0"
179
165
  source = "registry+https://github.com/rust-lang/crates.io-index"
180
- checksum = "387616b1e67a2c326231a86f1a62fb98e94f1da7c089817a00e332a96c2dbc21"
166
+ checksum = "98e6430fd1aab1f2586f8ad0ef27151bee96d5adcda39b39054fc4ce9c72d08a"
181
167
  dependencies = [
182
168
  "circular",
183
- "err-derive",
184
169
  "itertools",
185
170
  "log",
186
- "nom 4.2.3",
187
- "serde",
188
- "serde_bytes",
189
- "string_cache",
190
- "string_cache_codegen",
171
+ "nom 8.0.0",
172
+ "thiserror 2.0.18",
191
173
  ]
192
174
 
193
175
  [[package]]
194
176
  name = "grumpy"
195
- version = "1.1.2"
177
+ version = "1.1.4"
196
178
  dependencies = [
197
179
  "clap",
198
180
  "gb-io",
@@ -227,18 +209,18 @@ checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695"
227
209
 
228
210
  [[package]]
229
211
  name = "itertools"
230
- version = "0.10.5"
212
+ version = "0.14.0"
231
213
  source = "registry+https://github.com/rust-lang/crates.io-index"
232
- checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473"
214
+ checksum = "2b192c782037fadd9cfa75548310488aabdbf3d2da73885b31bd0abd03351285"
233
215
  dependencies = [
234
216
  "either",
235
217
  ]
236
218
 
237
219
  [[package]]
238
220
  name = "libc"
239
- version = "0.2.177"
221
+ version = "0.2.183"
240
222
  source = "registry+https://github.com/rust-lang/crates.io-index"
241
- checksum = "2874a2af47a2325c2001a6e6fad9b16a53b802102b528163885171cf92b15976"
223
+ checksum = "b5b646652bf6661599e1da8901b3b9522896f01e736bad5f723fe7a3a27f899d"
242
224
 
243
225
  [[package]]
244
226
  name = "lock_api"
@@ -251,15 +233,15 @@ dependencies = [
251
233
 
252
234
  [[package]]
253
235
  name = "log"
254
- version = "0.4.28"
236
+ version = "0.4.29"
255
237
  source = "registry+https://github.com/rust-lang/crates.io-index"
256
- checksum = "34080505efa8e45a4b816c349525ebe327ceaa8559756f0356cba97ef3bf7432"
238
+ checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897"
257
239
 
258
240
  [[package]]
259
241
  name = "memchr"
260
- version = "2.7.6"
242
+ version = "2.8.0"
261
243
  source = "registry+https://github.com/rust-lang/crates.io-index"
262
- checksum = "f52b00d39961fc5b2736ea853c9cc86238e165017a493d1d5c8eac6bdc4cc273"
244
+ checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79"
263
245
 
264
246
  [[package]]
265
247
  name = "memoffset"
@@ -284,22 +266,21 @@ checksum = "650eef8c711430f1a879fdd01d4745a7deea475becfb90269c06775983bbf086"
284
266
 
285
267
  [[package]]
286
268
  name = "nom"
287
- version = "4.2.3"
269
+ version = "7.1.3"
288
270
  source = "registry+https://github.com/rust-lang/crates.io-index"
289
- checksum = "2ad2a91a8e869eeb30b9cb3119ae87773a8f4ae617f41b1eb9c154b2905f7bd6"
271
+ checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a"
290
272
  dependencies = [
291
273
  "memchr",
292
- "version_check 0.1.5",
274
+ "minimal-lexical",
293
275
  ]
294
276
 
295
277
  [[package]]
296
278
  name = "nom"
297
- version = "7.1.3"
279
+ version = "8.0.0"
298
280
  source = "registry+https://github.com/rust-lang/crates.io-index"
299
- checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a"
281
+ checksum = "df9761775871bdef83bee530e60050f7e54b1105350d6884eb0fb4f46c2f9405"
300
282
  dependencies = [
301
283
  "memchr",
302
- "minimal-lexical",
303
284
  ]
304
285
 
305
286
  [[package]]
@@ -355,16 +336,6 @@ dependencies = [
355
336
  "windows-link",
356
337
  ]
357
338
 
358
- [[package]]
359
- name = "phf_generator"
360
- version = "0.11.3"
361
- source = "registry+https://github.com/rust-lang/crates.io-index"
362
- checksum = "3c80231409c20246a13fddb31776fb942c38553c51e871f8cbd687a4cfb5843d"
363
- dependencies = [
364
- "phf_shared",
365
- "rand",
366
- ]
367
-
368
339
  [[package]]
369
340
  name = "phf_shared"
370
341
  version = "0.11.3"
@@ -376,9 +347,9 @@ dependencies = [
376
347
 
377
348
  [[package]]
378
349
  name = "portable-atomic"
379
- version = "1.11.1"
350
+ version = "1.13.1"
380
351
  source = "registry+https://github.com/rust-lang/crates.io-index"
381
- checksum = "f84267b20a16ea918e43c6a88433c2d54fa145c92a811b5b047ccbe153674483"
352
+ checksum = "c33a9471896f1c69cecef8d20cbe2f7accd12527ce60845ff44c153bb2a21b49"
382
353
 
383
354
  [[package]]
384
355
  name = "precomputed-hash"
@@ -396,35 +367,11 @@ dependencies = [
396
367
  "yansi",
397
368
  ]
398
369
 
399
- [[package]]
400
- name = "proc-macro-error"
401
- version = "1.0.4"
402
- source = "registry+https://github.com/rust-lang/crates.io-index"
403
- checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c"
404
- dependencies = [
405
- "proc-macro-error-attr",
406
- "proc-macro2",
407
- "quote",
408
- "syn 1.0.109",
409
- "version_check 0.9.5",
410
- ]
411
-
412
- [[package]]
413
- name = "proc-macro-error-attr"
414
- version = "1.0.4"
415
- source = "registry+https://github.com/rust-lang/crates.io-index"
416
- checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869"
417
- dependencies = [
418
- "proc-macro2",
419
- "quote",
420
- "version_check 0.9.5",
421
- ]
422
-
423
370
  [[package]]
424
371
  name = "proc-macro2"
425
- version = "1.0.103"
372
+ version = "1.0.106"
426
373
  source = "registry+https://github.com/rust-lang/crates.io-index"
427
- checksum = "5ee95bc4ef87b8d5ba32e8b7714ccc834865276eab0aed5c9958d00ec45f49e8"
374
+ checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934"
428
375
  dependencies = [
429
376
  "unicode-ident",
430
377
  ]
@@ -475,7 +422,7 @@ dependencies = [
475
422
  "proc-macro2",
476
423
  "pyo3-macros-backend",
477
424
  "quote",
478
- "syn 2.0.111",
425
+ "syn",
479
426
  ]
480
427
 
481
428
  [[package]]
@@ -488,33 +435,18 @@ dependencies = [
488
435
  "proc-macro2",
489
436
  "pyo3-build-config",
490
437
  "quote",
491
- "syn 2.0.111",
438
+ "syn",
492
439
  ]
493
440
 
494
441
  [[package]]
495
442
  name = "quote"
496
- version = "1.0.42"
443
+ version = "1.0.45"
497
444
  source = "registry+https://github.com/rust-lang/crates.io-index"
498
- checksum = "a338cc41d27e6cc6dce6cefc13a0729dfbb81c262b1f519331575dd80ef3067f"
445
+ checksum = "41f2619966050689382d2b44f664f4bc593e129785a36d6ee376ddf37259b924"
499
446
  dependencies = [
500
447
  "proc-macro2",
501
448
  ]
502
449
 
503
- [[package]]
504
- name = "rand"
505
- version = "0.8.5"
506
- source = "registry+https://github.com/rust-lang/crates.io-index"
507
- checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404"
508
- dependencies = [
509
- "rand_core",
510
- ]
511
-
512
- [[package]]
513
- name = "rand_core"
514
- version = "0.6.4"
515
- source = "registry+https://github.com/rust-lang/crates.io-index"
516
- checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c"
517
-
518
450
  [[package]]
519
451
  name = "rayon"
520
452
  version = "1.11.0"
@@ -563,17 +495,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
563
495
  checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e"
564
496
  dependencies = [
565
497
  "serde_core",
566
- "serde_derive",
567
- ]
568
-
569
- [[package]]
570
- name = "serde_bytes"
571
- version = "0.11.19"
572
- source = "registry+https://github.com/rust-lang/crates.io-index"
573
- checksum = "a5d440709e79d88e51ac01c4b72fc6cb7314017bb7da9eeff678aa94c10e3ea8"
574
- dependencies = [
575
- "serde",
576
- "serde_core",
577
498
  ]
578
499
 
579
500
  [[package]]
@@ -593,14 +514,14 @@ checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79"
593
514
  dependencies = [
594
515
  "proc-macro2",
595
516
  "quote",
596
- "syn 2.0.111",
517
+ "syn",
597
518
  ]
598
519
 
599
520
  [[package]]
600
521
  name = "siphasher"
601
- version = "1.0.1"
522
+ version = "1.0.2"
602
523
  source = "registry+https://github.com/rust-lang/crates.io-index"
603
- checksum = "56199f7ddabf13fe5074ce809e7d3f42b42ae711800501b5b16ea82ad029c39d"
524
+ checksum = "b2aa850e253778c88a04c3d7323b043aeda9d3e30d5971937c1855769763678e"
604
525
 
605
526
  [[package]]
606
527
  name = "smallvec"
@@ -621,18 +542,6 @@ dependencies = [
621
542
  "serde",
622
543
  ]
623
544
 
624
- [[package]]
625
- name = "string_cache_codegen"
626
- version = "0.5.4"
627
- source = "registry+https://github.com/rust-lang/crates.io-index"
628
- checksum = "c711928715f1fe0fe509c53b43e993a9a557babc2d0a3567d0a3006f1ac931a0"
629
- dependencies = [
630
- "phf_generator",
631
- "phf_shared",
632
- "proc-macro2",
633
- "quote",
634
- ]
635
-
636
545
  [[package]]
637
546
  name = "strsim"
638
547
  version = "0.11.1"
@@ -641,9 +550,9 @@ checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f"
641
550
 
642
551
  [[package]]
643
552
  name = "syn"
644
- version = "1.0.109"
553
+ version = "2.0.117"
645
554
  source = "registry+https://github.com/rust-lang/crates.io-index"
646
- checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237"
555
+ checksum = "e665b8803e7b1d2a727f4023456bbbbe74da67099c585258af0ad9c5013b9b99"
647
556
  dependencies = [
648
557
  "proc-macro2",
649
558
  "quote",
@@ -651,41 +560,27 @@ dependencies = [
651
560
  ]
652
561
 
653
562
  [[package]]
654
- name = "syn"
655
- version = "2.0.111"
563
+ name = "target-lexicon"
564
+ version = "0.13.5"
656
565
  source = "registry+https://github.com/rust-lang/crates.io-index"
657
- checksum = "390cc9a294ab71bdb1aa2e99d13be9c753cd2d7bd6560c77118597410c4d2e87"
658
- dependencies = [
659
- "proc-macro2",
660
- "quote",
661
- "unicode-ident",
662
- ]
566
+ checksum = "adb6935a6f5c20170eeceb1a3835a49e12e19d792f6dd344ccc76a985ca5a6ca"
663
567
 
664
568
  [[package]]
665
- name = "synstructure"
666
- version = "0.12.6"
569
+ name = "thiserror"
570
+ version = "1.0.69"
667
571
  source = "registry+https://github.com/rust-lang/crates.io-index"
668
- checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f"
572
+ checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52"
669
573
  dependencies = [
670
- "proc-macro2",
671
- "quote",
672
- "syn 1.0.109",
673
- "unicode-xid",
574
+ "thiserror-impl 1.0.69",
674
575
  ]
675
576
 
676
- [[package]]
677
- name = "target-lexicon"
678
- version = "0.13.3"
679
- source = "registry+https://github.com/rust-lang/crates.io-index"
680
- checksum = "df7f62577c25e07834649fc3b39fafdc597c0a3527dc1c60129201ccfcbaa50c"
681
-
682
577
  [[package]]
683
578
  name = "thiserror"
684
- version = "1.0.69"
579
+ version = "2.0.18"
685
580
  source = "registry+https://github.com/rust-lang/crates.io-index"
686
- checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52"
581
+ checksum = "4288b5bcbc7920c07a1149a35cf9590a2aa808e0bc1eafaade0b80947865fbc4"
687
582
  dependencies = [
688
- "thiserror-impl",
583
+ "thiserror-impl 2.0.18",
689
584
  ]
690
585
 
691
586
  [[package]]
@@ -696,20 +591,25 @@ checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1"
696
591
  dependencies = [
697
592
  "proc-macro2",
698
593
  "quote",
699
- "syn 2.0.111",
594
+ "syn",
700
595
  ]
701
596
 
702
597
  [[package]]
703
- name = "unicode-ident"
704
- version = "1.0.22"
598
+ name = "thiserror-impl"
599
+ version = "2.0.18"
705
600
  source = "registry+https://github.com/rust-lang/crates.io-index"
706
- checksum = "9312f7c4f6ff9069b165498234ce8be658059c6728633667c526e27dc2cf1df5"
601
+ checksum = "ebc4ee7f67670e9b64d05fa4253e753e016c6c95ff35b89b7941d6b856dec1d5"
602
+ dependencies = [
603
+ "proc-macro2",
604
+ "quote",
605
+ "syn",
606
+ ]
707
607
 
708
608
  [[package]]
709
- name = "unicode-xid"
710
- version = "0.2.6"
609
+ name = "unicode-ident"
610
+ version = "1.0.24"
711
611
  source = "registry+https://github.com/rust-lang/crates.io-index"
712
- checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853"
612
+ checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75"
713
613
 
714
614
  [[package]]
715
615
  name = "unindent"
@@ -731,21 +631,9 @@ checksum = "40afbbcfe14b8c3bdaddc8bba0cb32e1d0f2b0b0196a8633ac37a7a000b88035"
731
631
  dependencies = [
732
632
  "nom 7.1.3",
733
633
  "once_cell",
734
- "thiserror",
634
+ "thiserror 1.0.69",
735
635
  ]
736
636
 
737
- [[package]]
738
- name = "version_check"
739
- version = "0.1.5"
740
- source = "registry+https://github.com/rust-lang/crates.io-index"
741
- checksum = "914b1a6776c4c929a602fafd8bc742e06365d4bcbe48c30f9cca5824f70dc9dd"
742
-
743
- [[package]]
744
- name = "version_check"
745
- version = "0.9.5"
746
- source = "registry+https://github.com/rust-lang/crates.io-index"
747
- checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a"
748
-
749
637
  [[package]]
750
638
  name = "windows-link"
751
639
  version = "0.2.1"
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "grumpy"
3
- version = "1.1.2"
3
+ version = "1.1.4"
4
4
  edition = "2021"
5
5
  description = "Genetic analysis in Rust."
6
6
  license-file = "LICENSE"
@@ -9,7 +9,7 @@ readme = "README.md"
9
9
  # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
10
10
 
11
11
  [dependencies]
12
- gb-io = "0.7.1"
12
+ gb-io = "0.9.0"
13
13
  ordered-float = "4.2.1"
14
14
  string_cache = "0.8.7"
15
15
  vcf = "0.6.1"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: bio-grumpy
3
- Version: 1.1.2
3
+ Version: 1.1.4
4
4
  Classifier: Development Status :: 5 - Production/Stable
5
5
  Classifier: Programming Language :: Rust
6
6
  Classifier: Programming Language :: Python :: Implementation :: CPython
@@ -248,12 +248,27 @@ impl GenomeDifference {
248
248
 
249
249
  if alt.evidence.is_minor {
250
250
  // Append coverage to the variant
251
- if minor_type == MinorType::COV && alt.evidence.cov.is_some() {
252
- garc = garc + ":" + &alt.evidence.cov.unwrap().to_string();
251
+ if minor_type == MinorType::COV {
252
+ match alt.evidence.cov {
253
+ Some(cov) => {
254
+ garc = garc + ":" + &cov.to_string();
255
+ }
256
+ None => {
257
+ panic!(
258
+ "Missing coverage for minor allele: {}, skipping!",
259
+ garc
260
+ );
261
+ }
262
+ }
253
263
  } else if minor_type == MinorType::FRS && alt.evidence.frs.is_some() {
254
- garc = garc
255
- + ":"
256
- + &trim_float_string(format!("{:.3}", alt.evidence.frs.unwrap()));
264
+ match alt.evidence.frs {
265
+ Some(frs) => {
266
+ garc = garc + ":" + &trim_float_string(format!("{:.3}", frs));
267
+ }
268
+ None => {
269
+ panic!("Missing FRS for minor allele: {}, skipping!", garc);
270
+ }
271
+ }
257
272
  } else {
258
273
  println!("Missing evidence for minor allele: {}, skipping!", garc);
259
274
  continue;
@@ -658,20 +673,32 @@ impl GeneDifference {
658
673
  indel_nucleotides = Some(e.base.clone());
659
674
  evidence = vec![e.evidence.clone()];
660
675
  }
661
- if minor_type == MinorType::COV && e.evidence.cov.is_some()
662
- {
663
- _mutation = _mutation
664
- + ":"
665
- + &e.evidence.cov.unwrap().to_string();
666
- } else if minor_type == MinorType::FRS
667
- && e.evidence.frs.is_some()
668
- {
669
- _mutation = _mutation
670
- + ":"
671
- + &trim_float_string(format!(
672
- "{:.3}",
673
- e.evidence.frs.unwrap()
674
- ));
676
+ if minor_type == MinorType::COV {
677
+ match e.evidence.cov {
678
+ Some(cov) => {
679
+ _mutation = _mutation + ":" + &cov.to_string();
680
+ }
681
+ None => {
682
+ panic!(
683
+ "Missing coverage for minor allele: {}, skipping!",
684
+ _mutation
685
+ );
686
+ }
687
+ }
688
+ } else if minor_type == MinorType::FRS {
689
+ match e.evidence.frs {
690
+ Some(frs) => {
691
+ _mutation = _mutation
692
+ + ":"
693
+ + &trim_float_string(format!("{:.3}", frs));
694
+ }
695
+ None => {
696
+ panic!(
697
+ "Missing FRS for minor allele: {}, skipping!",
698
+ _mutation
699
+ );
700
+ }
701
+ }
675
702
  } else {
676
703
  println!(
677
704
  "Missing evidence for minor allele: {}, skipping!",
@@ -844,28 +871,43 @@ impl GeneDifference {
844
871
 
845
872
  if alt.evidence.is_minor {
846
873
  // Append coverage to the variant
847
- if minor_type == MinorType::COV && alt.evidence.cov.is_some() {
848
- mutation =
849
- mutation + ":" + &alt.evidence.cov.unwrap().to_string();
850
- } else if minor_type == MinorType::FRS && alt.evidence.frs.is_some()
851
- {
852
- mutation = mutation
853
- + ":"
854
- + &trim_float_string(format!(
855
- "{:.3}",
856
- alt.evidence.frs.unwrap()
857
- ));
874
+ if minor_type == MinorType::COV {
875
+ match alt.evidence.cov {
876
+ Some(cov) => {
877
+ mutation = mutation + ":" + &cov.to_string();
878
+ }
879
+ None => {
880
+ panic!(
881
+ "Missing coverage for minor allele: {}, skipping!",
882
+ mutation
883
+ );
884
+ }
885
+ }
886
+ } else if minor_type == MinorType::FRS {
887
+ match alt.evidence.frs {
888
+ Some(frs) => {
889
+ mutation = mutation
890
+ + ":"
891
+ + &trim_float_string(format!("{:.3}", frs));
892
+ }
893
+ None => {
894
+ panic!(
895
+ "Missing FRS for minor allele: {}, skipping!",
896
+ mutation
897
+ );
898
+ }
899
+ }
858
900
  }
859
901
  if alt.alt_type == AltType::DEL {
860
- if alt.evidence.cov.is_some()
861
- && alt.evidence.cov.unwrap() > minor_deleted_cov
862
- {
863
- minor_deleted_cov = alt.evidence.cov.unwrap();
902
+ if let Some(cov) = alt.evidence.cov {
903
+ if cov > minor_deleted_cov {
904
+ minor_deleted_cov = cov;
905
+ }
864
906
  }
865
- if alt.evidence.frs.is_some()
866
- && alt.evidence.frs.unwrap() > minor_deleted_frs
867
- {
868
- minor_deleted_frs = alt.evidence.frs.unwrap();
907
+ if let Some(frs) = alt.evidence.frs {
908
+ if frs > minor_deleted_frs {
909
+ minor_deleted_frs = frs;
910
+ }
869
911
  }
870
912
  }
871
913
  if alt.alt_type == AltType::DEL || alt.alt_type == AltType::INS {
@@ -586,16 +586,26 @@ impl Gene {
586
586
  genome_positions[0] = first_pos;
587
587
 
588
588
  let last_pos = genome_positions[genome_positions.len() - 1].genome_idx;
589
+ let first_pos = genome_positions[0].genome_idx;
590
+ let max_pos = genome_positions.iter().map(|x| x.genome_idx).max().unwrap();
591
+ let crosses_genome_boundary = last_pos < first_pos;
589
592
 
590
593
  // Iter all positions, double checking that the deletions don't pass end of gene
591
594
  // truncating those which do
592
595
  for position in genome_positions.iter_mut() {
596
+ let offset = if crosses_genome_boundary && position.genome_idx < first_pos {
597
+ // This position is at the start of the genome, having started at the end,
598
+ // so we need to check if the deletion crosses the boundary here
599
+ last_pos
600
+ } else {
601
+ max_pos
602
+ };
593
603
  for alt in position.alts.iter_mut() {
594
604
  if alt.alt_type == AltType::DEL
595
- && position.genome_idx + (alt.base.len() as i64) > last_pos
605
+ && position.genome_idx + (alt.base.len() as i64) > offset
596
606
  {
597
607
  let bases_to_trim =
598
- (position.genome_idx + alt.base.len() as i64 - last_pos - 1) as usize;
608
+ (position.genome_idx + alt.base.len() as i64 - offset - 1) as usize;
599
609
  if bases_to_trim == 0 {
600
610
  continue;
601
611
  }
@@ -90,6 +90,7 @@ pub struct Genome {
90
90
  pub vcf_records: Option<Vec<VCFRow>>,
91
91
  }
92
92
 
93
+ #[allow(clippy::only_used_in_recursion)]
93
94
  /// Recursively parse a GenBank location into ranges
94
95
  /// Required as complement and join can be nested
95
96
  ///
@@ -111,11 +112,7 @@ pub fn parse_genbank_location(
111
112
  return true;
112
113
  }
113
114
  Range(s, e) => {
114
- if reverse_complement {
115
- ranges.push((e.0, s.0));
116
- } else {
117
- ranges.push((s.0, e.0));
118
- }
115
+ ranges.push((s.0, e.0));
119
116
  }
120
117
  Join(loc_ranges) => {
121
118
  // Checking for PRFS
@@ -263,13 +260,7 @@ impl Genome {
263
260
  for gene in self.gene_definitions.iter_mut() {
264
261
  // First pass to add gene names to all positions they exist in
265
262
  for (start, end) in gene.ranges.iter() {
266
- let mut start_idx = *start;
267
- let mut end_idx = *end;
268
- if gene.reverse_complement {
269
- start_idx = *end;
270
- end_idx = *start;
271
- }
272
- for i in start_idx..end_idx {
263
+ for i in *start..*end {
273
264
  self.genome_positions[i as usize]
274
265
  .genes
275
266
  .push(gene.name.clone());
@@ -281,9 +272,13 @@ impl Genome {
281
272
  // Check for overlapping genes, assigning promoters to non-overlapping genes
282
273
  let start;
283
274
  if gene.ranges.len() == 1 {
284
- start = gene.ranges[0].0;
275
+ if gene.reverse_complement {
276
+ start = gene.ranges[0].1;
277
+ } else {
278
+ start = gene.ranges[0].0;
279
+ }
285
280
  } else if gene.reverse_complement {
286
- start = gene.ranges[gene.ranges.len() - 1].0;
281
+ start = gene.ranges[gene.ranges.len() - 1].1;
287
282
  } else {
288
283
  start = gene.ranges[0].0;
289
284
  }
@@ -369,42 +364,30 @@ impl Genome {
369
364
  let mut nucleotide_sequence = "".to_string();
370
365
  let mut nucleotide_index = Vec::new();
371
366
  let mut genome_positions: Vec<GenomePosition> = Vec::new();
372
- if gene_def.reverse_complement {
373
- for (idx, (start, end)) in gene_def.ranges.iter().rev().enumerate() {
374
- let mut last_idx: usize = if idx == 0 && gene_def.promoter_start != -1 {
375
- gene_def.promoter_start as usize
376
- } else {
377
- *start as usize
378
- };
379
- if last_idx == self.genome_positions.len() {
380
- last_idx -= 1;
381
- }
382
- for i in *end as usize..last_idx + 1 {
383
- nucleotide_sequence.push(self.genome_positions[i].reference);
384
- nucleotide_index.push(self.genome_positions[i].genome_idx);
385
- genome_positions.push(self.genome_positions[i].clone());
386
- }
367
+ if !gene_def.reverse_complement && gene_def.promoter_start != -1 {
368
+ for idx in
369
+ (gene_def.promoter_start as usize).saturating_sub(1)..gene_def.ranges[0].0 as usize
370
+ {
371
+ nucleotide_sequence.push(self.genome_positions[idx].reference);
372
+ nucleotide_index.push(self.genome_positions[idx].genome_idx);
373
+ genome_positions.push(self.genome_positions[idx].clone());
387
374
  }
388
- } else {
389
- for (idx, (start, end)) in gene_def.ranges.iter().enumerate() {
390
- let first_idx: usize;
391
- if idx == 0 && gene_def.promoter_start != -1 {
392
- if gene_def.promoter_start == 0 {
393
- first_idx = 0;
394
- } else {
395
- first_idx = gene_def.promoter_start as usize - 1;
396
- }
397
- } else {
398
- first_idx = *start as usize;
399
- }
400
- for i in first_idx..*end as usize {
401
- nucleotide_sequence.push(self.genome_positions[i].reference);
402
- nucleotide_index.push(self.genome_positions[i].genome_idx);
403
- genome_positions.push(self.genome_positions[i].clone());
404
- }
375
+ }
376
+ for (start, end) in gene_def.ranges.iter() {
377
+ for i in *start as usize..*end as usize {
378
+ nucleotide_sequence.push(self.genome_positions[i].reference);
379
+ nucleotide_index.push(self.genome_positions[i].genome_idx);
380
+ genome_positions.push(self.genome_positions[i].clone());
381
+ }
382
+ }
383
+ if gene_def.reverse_complement && gene_def.promoter_start != -1 {
384
+ for idx in gene_def.ranges.last().unwrap().1 as usize..=gene_def.promoter_start as usize
385
+ {
386
+ nucleotide_sequence.push(self.genome_positions[idx].reference);
387
+ nucleotide_index.push(self.genome_positions[idx].genome_idx);
388
+ genome_positions.push(self.genome_positions[idx].clone());
405
389
  }
406
390
  }
407
-
408
391
  // I hate implicit returns, but appease clippy
409
392
  Gene::new(
410
393
  gene_def,
@@ -5093,5 +5076,25 @@ mod tests {
5093
5076
  assert!(reference
5094
5077
  .gene_names
5095
5078
  .contains(&"INCOMPLETE_LK403_RS00005".to_string()));
5079
+
5080
+ // Check that a mutation is correctly placed (rather than erroring)
5081
+ let vcf = VCFFile::new("test/intracellulare.vcf".to_string(), false, 3);
5082
+ let mut sample = mutate(&reference, vcf);
5083
+ let ref_gene = reference.get_gene("INCOMPLETE_LK403_RS14635".to_string());
5084
+ let sample_gene = sample.get_gene("INCOMPLETE_LK403_RS14635".to_string());
5085
+
5086
+ // Getting to this point without error is the main test here, but check that the mutation is placed too
5087
+ let gene_diff = GeneDifference::new(ref_gene, sample_gene, MinorType::COV);
5088
+ assert!(gene_diff.mutations.len() == 1);
5089
+ assert!(gene_diff.minor_mutations.is_empty());
5090
+ assert!(gene_diff.mutations[0].mutation == "-6_del_ca");
5091
+
5092
+ // Similarly with the LK403_RS00005 gene which crosses the genome boundary
5093
+ let ref_gene = reference.get_gene("INCOMPLETE_LK403_RS00005".to_string());
5094
+ let sample_gene = sample.get_gene("INCOMPLETE_LK403_RS00005".to_string());
5095
+ let gene_diff = GeneDifference::new(ref_gene, sample_gene, MinorType::COV);
5096
+ assert!(gene_diff.mutations.is_empty());
5097
+ assert!(gene_diff.minor_mutations.len() == 1);
5098
+ assert!(gene_diff.minor_mutations[0].mutation == "783_del_gccgcgccgcgcggcgcg:3");
5096
5099
  }
5097
5100
  }
@@ -67,6 +67,7 @@ fn grumpy(m: &Bound<'_, PyModule>) -> PyResult<()> {
67
67
 
68
68
  m.add_function(wrap_pyfunction!(genome::mutate, m)?)?;
69
69
  m.add_function(wrap_pyfunction!(common::thread_setup, m)?)?;
70
+ m.add("__version__", env!("CARGO_PKG_VERSION"))?;
70
71
 
71
72
  Ok(())
72
73
  }
@@ -284,12 +284,19 @@ impl VCFFile {
284
284
  VCFFile::parse_record_for_calls(row.clone(), min_dp, vcf_row_index);
285
285
 
286
286
  // if record.position == 178452 {
287
- // println!("{:?}\t{:?}\t{:?}\t{:?}\t{:?}", record.position, String::from_utf8_lossy(&record.reference), alts, filters, fields);
288
- // for call in record_calls.iter(){
287
+ // println!(
288
+ // "{:?}\t{:?}\t{:?}\t{:?}\t{:?}",
289
+ // record.position,
290
+ // String::from_utf8_lossy(&record.reference),
291
+ // alts,
292
+ // filters,
293
+ // fields
294
+ // );
295
+ // for call in record_calls.iter() {
289
296
  // println!("{:?}\n", call);
290
297
  // }
291
298
  // println!("--");
292
- // for call in record_minor_calls.iter(){
299
+ // for call in record_minor_calls.iter() {
293
300
  // println!("{:?}\n", call);
294
301
  // }
295
302
  // println!("\n\n");
@@ -0,0 +1,21 @@
1
+ ##fileformat=VCFv4.2
2
+ ##source=minos, version 0.12.5
3
+ ##fileDate=2026-01-27
4
+ ##FORMAT=<ID=ALLELE_DP,Number=R,Type=Float,Description="Mean read depth of ref and each allele">
5
+ ##FORMAT=<ID=COV,Number=R,Type=Integer,Description="Number of reads on ref and alt alleles">
6
+ ##FORMAT=<ID=COV_TOTAL,Number=1,Type=Integer,Description="Total reads mapped at this site, from gramtools">
7
+ ##FORMAT=<ID=DP,Number=1,Type=Float,Description="Mean read depth of called allele (ie the ALLELE_DP of the called allele)">
8
+ ##FORMAT=<ID=FRS,Number=1,Type=Float,Description="Fraction of reads that support the genotype call">
9
+ ##FORMAT=<ID=GT,Number=1,Type=String,Description="Genotype">
10
+ ##FORMAT=<ID=GT_CONF,Number=1,Type=Float,Description="Genotype confidence. Difference in log likelihood of most likely and next most likely genotype">
11
+ ##minosMeanReadDepth=24.34
12
+ ##minosReadDepthVariance=52.347
13
+ ##contig=<ID=CP015278.1,length=5865644>
14
+ ##FORMAT=<ID=GT_CONF_PERCENTILE,Number=1,Type=Float,Description="Percentile of GT_CONF">
15
+ ##FILTER=<ID=MIN_FRS,Description="Minimum FRS of 0.9">
16
+ ##FILTER=<ID=MIN_DP,Description="Minimum DP of 3">
17
+ ##FILTER=<ID=MIN_GCP,Description="Minimum GT_CONF_PERCENTILE of 0.5">
18
+ ##FILTER=<ID=MAX_DP,Description="Maximum DP of 46.0453679996447 (= 3.0 standard deviations from the mean read depth 24.34)">
19
+ #CHROM POS ID REF ALT QUAL FILTER INFO FORMAT sample
20
+ CP015278.1 3115422 . CTG C . PASS . GT:DP:ALLELE_DP:FRS:COV_TOTAL:COV:GT_CONF:GT_CONF_PERCENTILE 1/1:32:0,32:1.0:32:0,32:227.66:85.78
21
+ CP015278.1 5620493 . ACGCGCCGCGCGGCGCGGC A . PASS . GT:DP:ALLELE_DP:FRS:COV_TOTAL:COV:GT_CONF:GT_CONF_PERCENTILE 0/0:13.6842:13.6842,11:0.9032:31:20,3:105.35:32.33
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes