bio-grumpy 1.1.4__tar.gz → 1.1.5__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 (36) hide show
  1. bio_grumpy-1.1.5/.github/workflows/gitleaks.yaml +20 -0
  2. bio_grumpy-1.1.5/.gitleaks.toml +30 -0
  3. bio_grumpy-1.1.5/CITATION.bib +11 -0
  4. {bio_grumpy-1.1.4 → bio_grumpy-1.1.5}/Cargo.lock +86 -75
  5. {bio_grumpy-1.1.4 → bio_grumpy-1.1.5}/Cargo.toml +1 -1
  6. {bio_grumpy-1.1.4 → bio_grumpy-1.1.5}/PKG-INFO +1 -1
  7. bio_grumpy-1.1.5/README.md +48 -0
  8. {bio_grumpy-1.1.4 → bio_grumpy-1.1.5}/src/genome.rs +14 -14
  9. {bio_grumpy-1.1.4 → bio_grumpy-1.1.5}/src/main.rs +27 -27
  10. bio_grumpy-1.1.4/README.md +0 -32
  11. {bio_grumpy-1.1.4 → bio_grumpy-1.1.5}/.github/workflows/release.yaml +0 -0
  12. {bio_grumpy-1.1.4 → bio_grumpy-1.1.5}/.github/workflows/test.yaml +0 -0
  13. {bio_grumpy-1.1.4 → bio_grumpy-1.1.5}/.gitignore +0 -0
  14. {bio_grumpy-1.1.4 → bio_grumpy-1.1.5}/LICENSE +0 -0
  15. {bio_grumpy-1.1.4 → bio_grumpy-1.1.5}/README-python.md +0 -0
  16. {bio_grumpy-1.1.4 → bio_grumpy-1.1.5}/pyproject.toml +0 -0
  17. {bio_grumpy-1.1.4 → bio_grumpy-1.1.5}/reference/MN908947.3.gb +0 -0
  18. {bio_grumpy-1.1.4 → bio_grumpy-1.1.5}/reference/NC_000962.3.gbk +0 -0
  19. {bio_grumpy-1.1.4 → bio_grumpy-1.1.5}/reference/NZ_CP085945.1.gbk +0 -0
  20. {bio_grumpy-1.1.4 → bio_grumpy-1.1.5}/reference/TEST-DNA.gbk +0 -0
  21. {bio_grumpy-1.1.4 → bio_grumpy-1.1.5}/src/common.rs +0 -0
  22. {bio_grumpy-1.1.4 → bio_grumpy-1.1.5}/src/difference.rs +0 -0
  23. {bio_grumpy-1.1.4 → bio_grumpy-1.1.5}/src/gene.rs +0 -0
  24. {bio_grumpy-1.1.4 → bio_grumpy-1.1.5}/src/lib.rs +0 -0
  25. {bio_grumpy-1.1.4 → bio_grumpy-1.1.5}/src/vcf.rs +0 -0
  26. {bio_grumpy-1.1.4 → bio_grumpy-1.1.5}/test/TEST-DNA-4-minor.vcf +0 -0
  27. {bio_grumpy-1.1.4 → bio_grumpy-1.1.5}/test/TEST-DNA-4.vcf +0 -0
  28. {bio_grumpy-1.1.4 → bio_grumpy-1.1.5}/test/TEST-DNA-misc-indel.vcf +0 -0
  29. {bio_grumpy-1.1.4 → bio_grumpy-1.1.5}/test/TEST-DNA.vcf +0 -0
  30. {bio_grumpy-1.1.4 → bio_grumpy-1.1.5}/test/complex.vcf +0 -0
  31. {bio_grumpy-1.1.4 → bio_grumpy-1.1.5}/test/dummy.vcf +0 -0
  32. {bio_grumpy-1.1.4 → bio_grumpy-1.1.5}/test/intracellulare.vcf +0 -0
  33. {bio_grumpy-1.1.4 → bio_grumpy-1.1.5}/test/minor-populations-revcomp-AD.vcf +0 -0
  34. {bio_grumpy-1.1.4 → bio_grumpy-1.1.5}/test/minor-populations-revcomp.vcf +0 -0
  35. {bio_grumpy-1.1.4 → bio_grumpy-1.1.5}/test/revcomp-del-first-pos.vcf +0 -0
  36. {bio_grumpy-1.1.4 → bio_grumpy-1.1.5}/test/tb-snp-after-del.vcf +0 -0
@@ -0,0 +1,20 @@
1
+ on:
2
+ pull_request:
3
+ branches:
4
+ - develop
5
+ - main
6
+ push:
7
+ tags:
8
+ - '*.*.*'
9
+ - '*.*.*-rc*'
10
+
11
+ jobs:
12
+ gitleaks:
13
+ runs-on: ubuntu-latest
14
+ steps:
15
+ - uses: actions/checkout@v4
16
+ with:
17
+ fetch-depth: 0
18
+
19
+ - name: Check for GitLeaks
20
+ uses: gacts/gitleaks@v1
@@ -0,0 +1,30 @@
1
+ # -----------------------------------------------------------------------------
2
+ # Gitleaks Configuration
3
+ # -----------------------------------------------------------------------------
4
+ title = "Gitleaks Configuration"
5
+
6
+ # Extend the built-in default ruleset so we only add repo-specific allowlists.
7
+ [extend]
8
+ useDefault = true
9
+
10
+ # -----------------------------------------------------------------------------
11
+ # Allowlist (False Positives)
12
+ # -----------------------------------------------------------------------------
13
+ # Each allowlist is scoped to a single rule and a single exact file path.
14
+ # This keeps the ignore surface minimal while allowing known test fixtures and
15
+ # archived example content to pass secret scanning.
16
+
17
+ [[allowlists]]
18
+ description = "Allow GBK translation sequence false positive for Square access token"
19
+ targetRules = ["square-access-token"]
20
+ paths = [
21
+ '''^grumpy/reference/NC_000962\.3\.gbk''',
22
+ '''^reference/NZ_CP085945\.1\.gbk'''
23
+ ]
24
+
25
+ [[allowlists]]
26
+ description = "Allow GBK translation sequence false positive for alibaba access key ids"
27
+ targetRules = ["alibaba-access-key-id"]
28
+ paths = [
29
+ '''^reference/NZ_CP085945\.1\.gbk'''
30
+ ]
@@ -0,0 +1,11 @@
1
+ @article{Westhead2025,
2
+ title = {Characterizing the Performance of an Antibiotic Resistance Prediction Tool, Gnomonicus, Using a Diverse Test Set of 2,663 {{Mycobacterium}} Tuberculosis Samples},
3
+ author = {Westhead, Jeremy and Baker, Catriona S. and Brouard, Marc and Colpus, Matthew and Constantinides, Bede and Hall, Alexandra and Knaggs, Jeff and Alves, Marcela Lopes and Spies, Ruan and Thai, Hieu and Surrall, Sarah and Govender, Kumeren and Peto, Timothy E.A. and Crook, Derrick W. and Omar, Shaheed V. and Turner, Robert and Fowler, Philip W.},
4
+ year = 2025,
5
+ journal = {Microbial Genomics},
6
+ volume = {11},
7
+ number = {12},
8
+ pages = {001592},
9
+ publisher = {Microbiology Society,},
10
+ doi = {10.1099/mgen.0.001592},
11
+ }
@@ -4,9 +4,9 @@ version = 4
4
4
 
5
5
  [[package]]
6
6
  name = "anstream"
7
- version = "0.6.21"
7
+ version = "1.0.0"
8
8
  source = "registry+https://github.com/rust-lang/crates.io-index"
9
- checksum = "43d5b281e737544384e969a5ccad3f1cdd24b48086a0fc1b2a5262a26b8f4f4a"
9
+ checksum = "824a212faf96e9acacdbd09febd34438f8f711fb84e09a8916013cd7815ca28d"
10
10
  dependencies = [
11
11
  "anstyle",
12
12
  "anstyle-parse",
@@ -19,15 +19,15 @@ dependencies = [
19
19
 
20
20
  [[package]]
21
21
  name = "anstyle"
22
- version = "1.0.13"
22
+ version = "1.0.14"
23
23
  source = "registry+https://github.com/rust-lang/crates.io-index"
24
- checksum = "5192cca8006f1fd4f7237516f40fa183bb07f8fbdfedaa0036de5ea9b0b45e78"
24
+ checksum = "940b3a0ca603d1eade50a4846a2afffd5ef57a9feac2c0e2ec2e14f9ead76000"
25
25
 
26
26
  [[package]]
27
27
  name = "anstyle-parse"
28
- version = "0.2.7"
28
+ version = "1.0.0"
29
29
  source = "registry+https://github.com/rust-lang/crates.io-index"
30
- checksum = "4e7644824f0aa2c7b9384579234ef10eb7efb6a0deb83f9630a49594dd9c15c2"
30
+ checksum = "52ce7f38b242319f7cabaa6813055467063ecdc9d355bbb4ce0c68908cd8130e"
31
31
  dependencies = [
32
32
  "utf8parse",
33
33
  ]
@@ -54,21 +54,21 @@ dependencies = [
54
54
 
55
55
  [[package]]
56
56
  name = "autocfg"
57
- version = "1.5.0"
57
+ version = "1.5.1"
58
58
  source = "registry+https://github.com/rust-lang/crates.io-index"
59
- checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8"
59
+ checksum = "f2032f911046de80f0a198e0901378627c33f59ea0ac00e363d481118bd70a53"
60
60
 
61
61
  [[package]]
62
62
  name = "bitflags"
63
- version = "2.11.0"
63
+ version = "2.13.2"
64
64
  source = "registry+https://github.com/rust-lang/crates.io-index"
65
- checksum = "843867be96c8daad0d758b57df9392b6d8d271134fce549de6ce169ff98a92af"
65
+ checksum = "3ded4057c258ba199e2d26386d3af3780957ecaee6c4ef4041c6b4b8b97c0b06"
66
66
 
67
67
  [[package]]
68
68
  name = "cfg-if"
69
- version = "1.0.4"
69
+ version = "1.0.5"
70
70
  source = "registry+https://github.com/rust-lang/crates.io-index"
71
- checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801"
71
+ checksum = "4e7648175b45a9a48536d676f68d918270699102aa8dab5496df06904c914600"
72
72
 
73
73
  [[package]]
74
74
  name = "circular"
@@ -78,9 +78,9 @@ checksum = "b0fc239e0f6cb375d2402d48afb92f76f5404fd1df208a41930ec81eda078bea"
78
78
 
79
79
  [[package]]
80
80
  name = "clap"
81
- version = "4.5.60"
81
+ version = "4.6.7"
82
82
  source = "registry+https://github.com/rust-lang/crates.io-index"
83
- checksum = "2797f34da339ce31042b27d23607e051786132987f595b02ba4f6a6dffb7030a"
83
+ checksum = "aa8876b300ab35ba921adea3dfd70157a46249b33f95c9084ae5709785478946"
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.60"
91
+ version = "4.6.7"
92
92
  source = "registry+https://github.com/rust-lang/crates.io-index"
93
- checksum = "24a241312cea5059b13574bb9b3861cabf758b879c15190b37b6d6fd63ab6876"
93
+ checksum = "ec0797fb7aeb1406c84efac526901f7ec3ead2124f946b494e72879d4b54704d"
94
94
  dependencies = [
95
95
  "anstream",
96
96
  "anstyle",
@@ -100,33 +100,33 @@ dependencies = [
100
100
 
101
101
  [[package]]
102
102
  name = "clap_derive"
103
- version = "4.5.55"
103
+ version = "4.6.7"
104
104
  source = "registry+https://github.com/rust-lang/crates.io-index"
105
- checksum = "a92793da1a46a5f2a02a6f4c46c6496b28c43638adea8306fcb0caa1634f24e5"
105
+ checksum = "f9c751b79415d4e559e3d1fcf128e09e720eb673a06d26cf6f392d37d75b66e0"
106
106
  dependencies = [
107
107
  "heck",
108
108
  "proc-macro2",
109
109
  "quote",
110
- "syn",
110
+ "syn 3.0.6",
111
111
  ]
112
112
 
113
113
  [[package]]
114
114
  name = "clap_lex"
115
- version = "1.0.0"
115
+ version = "1.1.1"
116
116
  source = "registry+https://github.com/rust-lang/crates.io-index"
117
- checksum = "3a822ea5bc7590f9d40f1ba12c0dc3c2760f3482c6984db1573ad11031420831"
117
+ checksum = "1c133bc6a41be0d194c306b5506d15e6feeea7b1d6604bd3f8310dfb2ca96486"
118
118
 
119
119
  [[package]]
120
120
  name = "colorchoice"
121
- version = "1.0.4"
121
+ version = "1.0.5"
122
122
  source = "registry+https://github.com/rust-lang/crates.io-index"
123
- checksum = "b05b61dc5112cbb17e4b6cd61790d9845d13888356391624cbe7e41efeac1e75"
123
+ checksum = "1d07550c9036bf2ae0c684c4297d503f838287c83c53686d05370d0e139ae570"
124
124
 
125
125
  [[package]]
126
126
  name = "crossbeam-deque"
127
- version = "0.8.6"
127
+ version = "0.8.8"
128
128
  source = "registry+https://github.com/rust-lang/crates.io-index"
129
- checksum = "9dd111b7b7f7d55b72c0a6ae361660ee5853c9af73f70c3c2ef6858b950e2e51"
129
+ checksum = "622f3fc73690be383c7214310406f28a90e6edeadc3cea882f9d71e495b9711a"
130
130
  dependencies = [
131
131
  "crossbeam-epoch",
132
132
  "crossbeam-utils",
@@ -134,18 +134,18 @@ dependencies = [
134
134
 
135
135
  [[package]]
136
136
  name = "crossbeam-epoch"
137
- version = "0.9.18"
137
+ version = "0.9.21"
138
138
  source = "registry+https://github.com/rust-lang/crates.io-index"
139
- checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e"
139
+ checksum = "dc74980687109a3b14c72fd458107bf0baa1da1a1a805e178d15501ba9b86d9d"
140
140
  dependencies = [
141
141
  "crossbeam-utils",
142
142
  ]
143
143
 
144
144
  [[package]]
145
145
  name = "crossbeam-utils"
146
- version = "0.8.21"
146
+ version = "0.8.23"
147
147
  source = "registry+https://github.com/rust-lang/crates.io-index"
148
- checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28"
148
+ checksum = "a31eee39dddec8330830986fcd7625edb5a24ec90ea038215273bbc3adb08ac6"
149
149
 
150
150
  [[package]]
151
151
  name = "diff"
@@ -155,9 +155,9 @@ checksum = "56254986775e3233ffa9c4d7d3faaf6d36a2c09d30b20687e9f88bc8bafc16c8"
155
155
 
156
156
  [[package]]
157
157
  name = "either"
158
- version = "1.15.0"
158
+ version = "1.18.0"
159
159
  source = "registry+https://github.com/rust-lang/crates.io-index"
160
- checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719"
160
+ checksum = "252afb9ae5eaa683babdc6a068b3f5726eb19e05070c731f9b2a23a7c3e8ed34"
161
161
 
162
162
  [[package]]
163
163
  name = "gb-io"
@@ -169,12 +169,12 @@ dependencies = [
169
169
  "itertools",
170
170
  "log",
171
171
  "nom 8.0.0",
172
- "thiserror 2.0.18",
172
+ "thiserror 2.0.21",
173
173
  ]
174
174
 
175
175
  [[package]]
176
176
  name = "grumpy"
177
- version = "1.1.4"
177
+ version = "1.1.5"
178
178
  dependencies = [
179
179
  "clap",
180
180
  "gb-io",
@@ -218,9 +218,9 @@ dependencies = [
218
218
 
219
219
  [[package]]
220
220
  name = "libc"
221
- version = "0.2.183"
221
+ version = "0.2.190"
222
222
  source = "registry+https://github.com/rust-lang/crates.io-index"
223
- checksum = "b5b646652bf6661599e1da8901b3b9522896f01e736bad5f723fe7a3a27f899d"
223
+ checksum = "ce5d3ddc6d3fa000eb1536d85e147bfe31aacaba692ed6a876f95cb7c855be78"
224
224
 
225
225
  [[package]]
226
226
  name = "lock_api"
@@ -233,15 +233,15 @@ dependencies = [
233
233
 
234
234
  [[package]]
235
235
  name = "log"
236
- version = "0.4.29"
236
+ version = "0.4.34"
237
237
  source = "registry+https://github.com/rust-lang/crates.io-index"
238
- checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897"
238
+ checksum = "f9f8bd3e56ce4dfc153cf470fffbfa98c7620958b312ca5c3a4b8d5181fd13c6"
239
239
 
240
240
  [[package]]
241
241
  name = "memchr"
242
- version = "2.8.0"
242
+ version = "2.8.3"
243
243
  source = "registry+https://github.com/rust-lang/crates.io-index"
244
- checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79"
244
+ checksum = "cf8baf1c55e62ffcace7a9f06f4bd9cd3f0c4beb022d3b367256b91b87513d98"
245
245
 
246
246
  [[package]]
247
247
  name = "memoffset"
@@ -294,9 +294,9 @@ dependencies = [
294
294
 
295
295
  [[package]]
296
296
  name = "once_cell"
297
- version = "1.21.3"
297
+ version = "1.21.4"
298
298
  source = "registry+https://github.com/rust-lang/crates.io-index"
299
- checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d"
299
+ checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50"
300
300
 
301
301
  [[package]]
302
302
  name = "once_cell_polyfill"
@@ -347,9 +347,9 @@ dependencies = [
347
347
 
348
348
  [[package]]
349
349
  name = "portable-atomic"
350
- version = "1.13.1"
350
+ version = "1.15.0"
351
351
  source = "registry+https://github.com/rust-lang/crates.io-index"
352
- checksum = "c33a9471896f1c69cecef8d20cbe2f7accd12527ce60845ff44c153bb2a21b49"
352
+ checksum = "05c8b63e8d9609db387f0324918f81d68fe27748f084ef092fb35954d0539a85"
353
353
 
354
354
  [[package]]
355
355
  name = "precomputed-hash"
@@ -369,9 +369,9 @@ dependencies = [
369
369
 
370
370
  [[package]]
371
371
  name = "proc-macro2"
372
- version = "1.0.106"
372
+ version = "1.0.107"
373
373
  source = "registry+https://github.com/rust-lang/crates.io-index"
374
- checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934"
374
+ checksum = "985e7ec9bb745e6ce6535b544d84d6cd6f7ad8bd711c398938ae983b91a766d9"
375
375
  dependencies = [
376
376
  "unicode-ident",
377
377
  ]
@@ -422,7 +422,7 @@ dependencies = [
422
422
  "proc-macro2",
423
423
  "pyo3-macros-backend",
424
424
  "quote",
425
- "syn",
425
+ "syn 2.0.119",
426
426
  ]
427
427
 
428
428
  [[package]]
@@ -435,23 +435,23 @@ dependencies = [
435
435
  "proc-macro2",
436
436
  "pyo3-build-config",
437
437
  "quote",
438
- "syn",
438
+ "syn 2.0.119",
439
439
  ]
440
440
 
441
441
  [[package]]
442
442
  name = "quote"
443
- version = "1.0.45"
443
+ version = "1.0.47"
444
444
  source = "registry+https://github.com/rust-lang/crates.io-index"
445
- checksum = "41f2619966050689382d2b44f664f4bc593e129785a36d6ee376ddf37259b924"
445
+ checksum = "1fbf4db142a473a8d80c26bbf18454ed458bf8d26c8219c331daecfdbd079001"
446
446
  dependencies = [
447
447
  "proc-macro2",
448
448
  ]
449
449
 
450
450
  [[package]]
451
451
  name = "rayon"
452
- version = "1.11.0"
452
+ version = "1.12.0"
453
453
  source = "registry+https://github.com/rust-lang/crates.io-index"
454
- checksum = "368f01d005bf8fd9b1206fb6fa653e6c4a81ceb1466406b81792d87c5677a58f"
454
+ checksum = "fb39b166781f92d482534ef4b4b1b2568f42613b53e5b6c160e24cfbfa30926d"
455
455
  dependencies = [
456
456
  "either",
457
457
  "rayon-core",
@@ -478,9 +478,9 @@ dependencies = [
478
478
 
479
479
  [[package]]
480
480
  name = "rustversion"
481
- version = "1.0.22"
481
+ version = "1.0.23"
482
482
  source = "registry+https://github.com/rust-lang/crates.io-index"
483
- checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d"
483
+ checksum = "cf54715a573b99ac80df0bc206da022bcd442c974952c7b9720069370852e21f"
484
484
 
485
485
  [[package]]
486
486
  name = "scopeguard"
@@ -490,44 +490,44 @@ checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"
490
490
 
491
491
  [[package]]
492
492
  name = "serde"
493
- version = "1.0.228"
493
+ version = "1.0.229"
494
494
  source = "registry+https://github.com/rust-lang/crates.io-index"
495
- checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e"
495
+ checksum = "4148590afebada386688f18773da617792bf2ef03ffc1e4cbd2b1d45b023e0ba"
496
496
  dependencies = [
497
497
  "serde_core",
498
498
  ]
499
499
 
500
500
  [[package]]
501
501
  name = "serde_core"
502
- version = "1.0.228"
502
+ version = "1.0.229"
503
503
  source = "registry+https://github.com/rust-lang/crates.io-index"
504
- checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad"
504
+ checksum = "67dca2c9c51e58a4791a4b1ed58308b39c64224d349a935ab5039aa360942a48"
505
505
  dependencies = [
506
506
  "serde_derive",
507
507
  ]
508
508
 
509
509
  [[package]]
510
510
  name = "serde_derive"
511
- version = "1.0.228"
511
+ version = "1.0.229"
512
512
  source = "registry+https://github.com/rust-lang/crates.io-index"
513
- checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79"
513
+ checksum = "e7a5d71263a5a7d47b41f6b3f06ba276f10cc18b0931f1799f710578e2309348"
514
514
  dependencies = [
515
515
  "proc-macro2",
516
516
  "quote",
517
- "syn",
517
+ "syn 3.0.6",
518
518
  ]
519
519
 
520
520
  [[package]]
521
521
  name = "siphasher"
522
- version = "1.0.2"
522
+ version = "1.0.4"
523
523
  source = "registry+https://github.com/rust-lang/crates.io-index"
524
- checksum = "b2aa850e253778c88a04c3d7323b043aeda9d3e30d5971937c1855769763678e"
524
+ checksum = "33f4fe9184a62d842c9ef383018f3306d8ba224fd9d836f56d7288308847c256"
525
525
 
526
526
  [[package]]
527
527
  name = "smallvec"
528
- version = "1.15.1"
528
+ version = "1.16.2"
529
529
  source = "registry+https://github.com/rust-lang/crates.io-index"
530
- checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03"
530
+ checksum = "f9395f0f0eee849a9b707b2f06bb92a6a422090e2123bb2ef8e87a0e61892a8e"
531
531
 
532
532
  [[package]]
533
533
  name = "string_cache"
@@ -550,9 +550,20 @@ checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f"
550
550
 
551
551
  [[package]]
552
552
  name = "syn"
553
- version = "2.0.117"
553
+ version = "2.0.119"
554
+ source = "registry+https://github.com/rust-lang/crates.io-index"
555
+ checksum = "872831b642d1a07999a962a351ed35b955ea2cfc8f3862091e2a240a84f17297"
556
+ dependencies = [
557
+ "proc-macro2",
558
+ "quote",
559
+ "unicode-ident",
560
+ ]
561
+
562
+ [[package]]
563
+ name = "syn"
564
+ version = "3.0.6"
554
565
  source = "registry+https://github.com/rust-lang/crates.io-index"
555
- checksum = "e665b8803e7b1d2a727f4023456bbbbe74da67099c585258af0ad9c5013b9b99"
566
+ checksum = "8593e8e72159ed2257d083c7a454a85cbf854f37a0966d8d483aff8c8a3ebcee"
556
567
  dependencies = [
557
568
  "proc-macro2",
558
569
  "quote",
@@ -576,11 +587,11 @@ dependencies = [
576
587
 
577
588
  [[package]]
578
589
  name = "thiserror"
579
- version = "2.0.18"
590
+ version = "2.0.21"
580
591
  source = "registry+https://github.com/rust-lang/crates.io-index"
581
- checksum = "4288b5bcbc7920c07a1149a35cf9590a2aa808e0bc1eafaade0b80947865fbc4"
592
+ checksum = "09e52cb86a36cede5cb101bf8908837b3e4c6e5e59fe7fd85c23fb56200d189e"
582
593
  dependencies = [
583
- "thiserror-impl 2.0.18",
594
+ "thiserror-impl 2.0.21",
584
595
  ]
585
596
 
586
597
  [[package]]
@@ -591,25 +602,25 @@ checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1"
591
602
  dependencies = [
592
603
  "proc-macro2",
593
604
  "quote",
594
- "syn",
605
+ "syn 2.0.119",
595
606
  ]
596
607
 
597
608
  [[package]]
598
609
  name = "thiserror-impl"
599
- version = "2.0.18"
610
+ version = "2.0.21"
600
611
  source = "registry+https://github.com/rust-lang/crates.io-index"
601
- checksum = "ebc4ee7f67670e9b64d05fa4253e753e016c6c95ff35b89b7941d6b856dec1d5"
612
+ checksum = "fe5197923287db20a58125f0bc85c062f7f2c892de97b18c356f9efb14b28524"
602
613
  dependencies = [
603
614
  "proc-macro2",
604
615
  "quote",
605
- "syn",
616
+ "syn 3.0.6",
606
617
  ]
607
618
 
608
619
  [[package]]
609
620
  name = "unicode-ident"
610
- version = "1.0.24"
621
+ version = "1.0.26"
611
622
  source = "registry+https://github.com/rust-lang/crates.io-index"
612
- checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75"
623
+ checksum = "d245f478577f809a851594d02313b640fb437e0bb33866753cff937863096954"
613
624
 
614
625
  [[package]]
615
626
  name = "unindent"
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "grumpy"
3
- version = "1.1.4"
3
+ version = "1.1.5"
4
4
  edition = "2021"
5
5
  description = "Genetic analysis in Rust."
6
6
  license-file = "LICENSE"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: bio-grumpy
3
- Version: 1.1.4
3
+ Version: 1.1.5
4
4
  Classifier: Development Status :: 5 - Production/Stable
5
5
  Classifier: Programming Language :: Rust
6
6
  Classifier: Programming Language :: Python :: Implementation :: CPython
@@ -0,0 +1,48 @@
1
+ [![Tests](https://github.com/oxfordmmm/grumpy/actions/workflows/test.yaml/badge.svg)](https://github.com/oxfordmmm/grumpy/actions/workflows/test.yaml)
2
+
3
+ # grumpy
4
+ Re-implementation of [gumpy](https://github.com/oxfordmmm/gumpy) in Rust for speed
5
+
6
+ ## Installation
7
+
8
+ ### CLI
9
+ ```
10
+ cargo install grumpy
11
+ ```
12
+
13
+ ### As a dependency for development
14
+ #### Rust crate
15
+ ```
16
+ cargo add grumpy
17
+ ```
18
+
19
+ #### Python package
20
+ ```
21
+ pip install bio-grumpy
22
+ ```
23
+
24
+ ## Tests
25
+ Running Rust unit tests
26
+ ```
27
+ cargo test
28
+ ```
29
+
30
+ ### Coverage
31
+ Test coverage can be found with the use of `tarpaulin`.
32
+ ```
33
+ # Install tarpaulin on first run
34
+ cargo install cargo-tarpaulin
35
+
36
+ # Generate an HTML coverage report
37
+ cargo tarpaulin --no-dead-code --engine llvm --out html
38
+ ```
39
+
40
+ ## Citation
41
+ If you use `grumpy` in your work, please cite:
42
+ ```
43
+ Westhead J, Baker CS, Brouard M, Colpus M, Constantinides B, Hall A, Knaggs J, Lopes Alves M, Spies R, Thai H, Surrall S, Govender K, Peto TEA, Crook DW, Omar SV, Turner R, Fowler PW
44
+ Characterising the performance of an antibiotic resistance prediction tool, gnomonicus, using a diverse testset of 2,663 Mycobacterium tuberculosis samples
45
+ Microbial Genomics 11:001592 doi:10.1099/mgen.0.001592
46
+ ```
47
+
48
+ A BibTeX citation is included [here](CITATION.bib)
@@ -1,5 +1,6 @@
1
1
  //! Module for handling genome data
2
2
  use pyo3::prelude::*;
3
+ use rayon::prelude::*;
3
4
 
4
5
  use std::collections::{HashMap, HashSet};
5
6
  use std::fs::File;
@@ -57,10 +58,6 @@ pub struct Genome {
57
58
  /// Name of the genome
58
59
  pub name: String,
59
60
 
60
- #[pyo3(get, set)]
61
- /// Nucleotide sequence which comprises this genome
62
- pub nucleotide_sequence: String,
63
-
64
61
  #[pyo3(get, set)]
65
62
  /// Definitions for each gene in the genome
66
63
  pub gene_definitions: Vec<GeneDef>,
@@ -235,7 +232,6 @@ impl Genome {
235
232
  }
236
233
  let mut genome = Genome {
237
234
  name: genome_name,
238
- nucleotide_sequence: _nucleotide_sequence,
239
235
  gene_definitions: _gene_definitions,
240
236
  genome_positions,
241
237
  genes: HashMap::new(),
@@ -399,9 +395,17 @@ impl Genome {
399
395
 
400
396
  /// Build all genes in the genome, storing them in the genes hashmap
401
397
  pub fn build_all_genes(&mut self) {
402
- for gene_name in self.gene_names.iter() {
403
- let gene = self.build_gene(gene_name.clone());
404
- self.genes.insert(gene_name.clone(), gene);
398
+ for (k, v) in self
399
+ .gene_names
400
+ .par_iter()
401
+ .map(|gene_name| {
402
+ let gene = self.build_gene(gene_name.clone());
403
+ (gene_name.clone(), gene)
404
+ })
405
+ .collect::<Vec<(String, Gene)>>()
406
+ .into_iter()
407
+ {
408
+ self.genes.insert(k, v);
405
409
  }
406
410
  }
407
411
 
@@ -573,9 +577,6 @@ pub fn mutate(reference: &Genome, vcf: VCFFile) -> Genome {
573
577
  {
574
578
  // Update nucleotide for SNP/het/null
575
579
  position.reference = base;
576
- new_genome
577
- .nucleotide_sequence
578
- .replace_range(idx..idx + 1, &base.to_string());
579
580
  }
580
581
  }
581
582
  }
@@ -655,7 +656,7 @@ mod tests {
655
656
  fn test_tb_genome() {
656
657
  let mut genome = Genome::new("reference/NC_000962.3.gbk");
657
658
  assert_eq!(genome.name, "NC_000962");
658
- assert_eq!(genome.nucleotide_sequence.len(), 4411532);
659
+ assert_eq!(genome.genome_positions.len(), 4411532);
659
660
  assert_eq!(genome.gene_definitions.len(), 3909);
660
661
  assert_eq!(genome.gene_names.len(), 3909);
661
662
 
@@ -858,7 +859,7 @@ mod tests {
858
859
  fn test_covid_genome() {
859
860
  let mut genome = Genome::new("reference/MN908947.3.gb");
860
861
  assert_eq!(genome.name, "MN908947");
861
- assert_eq!(genome.nucleotide_sequence.len(), 29903);
862
+ assert_eq!(genome.genome_positions.len(), 29903);
862
863
  assert_eq!(genome.gene_definitions.len(), 10);
863
864
  assert_eq!(genome.gene_names.len(), 10);
864
865
 
@@ -881,7 +882,6 @@ mod tests {
881
882
  // Dummy DNA genbank file, used as it's short enough to know the expected values
882
883
  let genome = Genome::new("reference/TEST-DNA.gbk");
883
884
  assert_eq!(genome.name, "TEST_DNA");
884
- assert_eq!(genome.nucleotide_sequence, "aaaaaaaaaaccccccccccggggggggggttttttttttaaaaaaaaaaccccccccccggggggggggttttttttttaaaaaaaaaaccccccccc");
885
885
  let mut offset = 0;
886
886
  for (idx, pos) in genome.genome_positions.iter().enumerate() {
887
887
  if idx - offset < 10 {
@@ -71,35 +71,35 @@ fn main() {
71
71
  let mut gene_start = SystemTime::now();
72
72
  let mut gene_end = SystemTime::now();
73
73
  for target_gene in target_genes.iter() {
74
- for variant in difference.variants.iter_mut() {
75
- if variant.gene_name.clone().is_none()
76
- || (variant.gene_name.clone().is_some()
77
- && variant.gene_name.clone().unwrap() != *target_gene)
78
- {
79
- continue;
74
+ if is_first {
75
+ for variant in difference.variants.iter_mut() {
76
+ if variant.gene_name.clone().is_none()
77
+ || (variant.gene_name.clone().is_some()
78
+ && variant.gene_name.clone().unwrap() != *target_gene)
79
+ {
80
+ continue;
81
+ }
82
+ println!(
83
+ "{:?}@{:?} --> {:?}",
84
+ variant.gene_name,
85
+ variant.gene_position,
86
+ variant.variant.clone()
87
+ );
80
88
  }
81
- println!(
82
- "{:?}@{:?} --> {:?}",
83
- variant.gene_name,
84
- variant.gene_position,
85
- variant.variant.clone()
86
- );
87
- }
88
- for variant in difference.minor_variants.iter_mut() {
89
- if variant.gene_name.clone().is_none()
90
- || (variant.gene_name.clone().is_some()
91
- && variant.gene_name.clone().unwrap() != *target_gene)
92
- {
93
- continue;
89
+ for variant in difference.minor_variants.iter_mut() {
90
+ if variant.gene_name.clone().is_none()
91
+ || (variant.gene_name.clone().is_some()
92
+ && variant.gene_name.clone().unwrap() != *target_gene)
93
+ {
94
+ continue;
95
+ }
96
+ println!(
97
+ "{:?}@{:?} --> {:?}",
98
+ variant.gene_name,
99
+ variant.gene_position,
100
+ variant.variant.clone()
101
+ );
94
102
  }
95
- println!(
96
- "{:?}@{:?} --> {:?}",
97
- variant.gene_name,
98
- variant.gene_position,
99
- variant.variant.clone()
100
- );
101
- }
102
- if is_first {
103
103
  gene_start = SystemTime::now();
104
104
  }
105
105
  for gene_name in sample.genes_with_mutations.clone().iter() {
@@ -1,32 +0,0 @@
1
- [![Tests](https://github.com/oxfordmmm/grumpy/actions/workflows/test.yaml/badge.svg)](https://github.com/oxfordmmm/grumpy/actions/workflows/test.yaml)
2
-
3
- # grumpy
4
- Re-implementation of [gumpy](https://github.com/oxfordmmm/gumpy) in Rust for speed
5
-
6
- ## Installation
7
-
8
- ### Rust crate
9
- ```
10
- cargo add grumpy
11
- ```
12
-
13
- ### Python package
14
- ```
15
- pip install bio-grumpy
16
- ```
17
-
18
- ## Tests
19
- Running Rust unit tests
20
- ```
21
- cargo test
22
- ```
23
-
24
- ### Coverage
25
- Test coverage can be found with the use of `tarpaulin`.
26
- ```
27
- # Install tarpaulin on first run
28
- cargo install cargo-tarpaulin
29
-
30
- # Generate an HTML coverage report
31
- cargo tarpaulin --no-dead-code --engine llvm --out html
32
- ```
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
File without changes
File without changes