bio-grumpy 0.2.1__tar.gz → 0.2.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.
- {bio_grumpy-0.2.1 → bio_grumpy-0.2.4}/.github/workflows/release.yaml +0 -2
- {bio_grumpy-0.2.1 → bio_grumpy-0.2.4}/Cargo.lock +43 -46
- {bio_grumpy-0.2.1 → bio_grumpy-0.2.4}/Cargo.toml +1 -1
- {bio_grumpy-0.2.1 → bio_grumpy-0.2.4}/PKG-INFO +3 -3
- {bio_grumpy-0.2.1 → bio_grumpy-0.2.4}/pyproject.toml +1 -1
- {bio_grumpy-0.2.1 → bio_grumpy-0.2.4}/src/common.rs +2 -2
- {bio_grumpy-0.2.1 → bio_grumpy-0.2.4}/src/difference.rs +13 -16
- {bio_grumpy-0.2.1 → bio_grumpy-0.2.4}/src/genome.rs +942 -2998
- {bio_grumpy-0.2.1 → bio_grumpy-0.2.4}/src/main.rs +1 -1
- {bio_grumpy-0.2.1 → bio_grumpy-0.2.4}/src/vcf.rs +76 -27
- bio_grumpy-0.2.4/test/tb-snp-after-del.vcf +47 -0
- {bio_grumpy-0.2.1 → bio_grumpy-0.2.4}/.github/workflows/test.yaml +0 -0
- {bio_grumpy-0.2.1 → bio_grumpy-0.2.4}/.gitignore +0 -0
- {bio_grumpy-0.2.1 → bio_grumpy-0.2.4}/LICENSE +0 -0
- {bio_grumpy-0.2.1 → bio_grumpy-0.2.4}/README-python.md +0 -0
- {bio_grumpy-0.2.1 → bio_grumpy-0.2.4}/README.md +0 -0
- {bio_grumpy-0.2.1 → bio_grumpy-0.2.4}/reference/MN908947.3.gb +0 -0
- {bio_grumpy-0.2.1 → bio_grumpy-0.2.4}/reference/NC_000962.3.gbk +0 -0
- {bio_grumpy-0.2.1 → bio_grumpy-0.2.4}/reference/TEST-DNA.gbk +0 -0
- {bio_grumpy-0.2.1 → bio_grumpy-0.2.4}/src/gene.rs +0 -0
- {bio_grumpy-0.2.1 → bio_grumpy-0.2.4}/src/lib.rs +0 -0
- {bio_grumpy-0.2.1 → bio_grumpy-0.2.4}/test/TEST-DNA-4-minor.vcf +0 -0
- {bio_grumpy-0.2.1 → bio_grumpy-0.2.4}/test/TEST-DNA-4.vcf +0 -0
- {bio_grumpy-0.2.1 → bio_grumpy-0.2.4}/test/TEST-DNA-misc-indel.vcf +0 -0
- {bio_grumpy-0.2.1 → bio_grumpy-0.2.4}/test/TEST-DNA.vcf +0 -0
- {bio_grumpy-0.2.1 → bio_grumpy-0.2.4}/test/dummy.vcf +0 -0
- {bio_grumpy-0.2.1 → bio_grumpy-0.2.4}/test/minor-populations-revcomp-AD.vcf +0 -0
- {bio_grumpy-0.2.1 → bio_grumpy-0.2.4}/test/minor-populations-revcomp.vcf +0 -0
- {bio_grumpy-0.2.1 → bio_grumpy-0.2.4}/test/revcomp-del-first-pos.vcf +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# This file is automatically @generated by Cargo.
|
|
2
2
|
# It is not intended for manual editing.
|
|
3
|
-
version =
|
|
3
|
+
version = 4
|
|
4
4
|
|
|
5
5
|
[[package]]
|
|
6
6
|
name = "autocfg"
|
|
@@ -113,7 +113,7 @@ dependencies = [
|
|
|
113
113
|
|
|
114
114
|
[[package]]
|
|
115
115
|
name = "grumpy"
|
|
116
|
-
version = "0.2.
|
|
116
|
+
version = "0.2.4"
|
|
117
117
|
dependencies = [
|
|
118
118
|
"gb-io",
|
|
119
119
|
"ordered-float",
|
|
@@ -147,9 +147,9 @@ dependencies = [
|
|
|
147
147
|
|
|
148
148
|
[[package]]
|
|
149
149
|
name = "libc"
|
|
150
|
-
version = "0.2.
|
|
150
|
+
version = "0.2.168"
|
|
151
151
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
152
|
-
checksum = "
|
|
152
|
+
checksum = "5aaeb2981e0606ca11d79718f8bb01164f1d6ed75080182d3abf017e6d244b6d"
|
|
153
153
|
|
|
154
154
|
[[package]]
|
|
155
155
|
name = "lock_api"
|
|
@@ -225,18 +225,15 @@ dependencies = [
|
|
|
225
225
|
|
|
226
226
|
[[package]]
|
|
227
227
|
name = "once_cell"
|
|
228
|
-
version = "1.20.
|
|
228
|
+
version = "1.20.2"
|
|
229
229
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
230
|
-
checksum = "
|
|
231
|
-
dependencies = [
|
|
232
|
-
"portable-atomic",
|
|
233
|
-
]
|
|
230
|
+
checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775"
|
|
234
231
|
|
|
235
232
|
[[package]]
|
|
236
233
|
name = "ordered-float"
|
|
237
|
-
version = "4.
|
|
234
|
+
version = "4.5.0"
|
|
238
235
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
239
|
-
checksum = "
|
|
236
|
+
checksum = "c65ee1f9701bf938026630b455d5315f490640234259037edb259798b3bcf85e"
|
|
240
237
|
dependencies = [
|
|
241
238
|
"num-traits",
|
|
242
239
|
]
|
|
@@ -285,9 +282,9 @@ dependencies = [
|
|
|
285
282
|
|
|
286
283
|
[[package]]
|
|
287
284
|
name = "portable-atomic"
|
|
288
|
-
version = "1.
|
|
285
|
+
version = "1.10.0"
|
|
289
286
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
290
|
-
checksum = "
|
|
287
|
+
checksum = "280dc24453071f1b63954171985a0b0d30058d287960968b9b2aca264c8d4ee6"
|
|
291
288
|
|
|
292
289
|
[[package]]
|
|
293
290
|
name = "ppv-lite86"
|
|
@@ -340,18 +337,18 @@ dependencies = [
|
|
|
340
337
|
|
|
341
338
|
[[package]]
|
|
342
339
|
name = "proc-macro2"
|
|
343
|
-
version = "1.0.
|
|
340
|
+
version = "1.0.92"
|
|
344
341
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
345
|
-
checksum = "
|
|
342
|
+
checksum = "37d3544b3f2748c54e147655edb5025752e2303145b5aefb3c3ea2c78b973bb0"
|
|
346
343
|
dependencies = [
|
|
347
344
|
"unicode-ident",
|
|
348
345
|
]
|
|
349
346
|
|
|
350
347
|
[[package]]
|
|
351
348
|
name = "pyo3"
|
|
352
|
-
version = "0.22.
|
|
349
|
+
version = "0.22.6"
|
|
353
350
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
354
|
-
checksum = "
|
|
351
|
+
checksum = "f402062616ab18202ae8319da13fa4279883a2b8a9d9f83f20dbade813ce1884"
|
|
355
352
|
dependencies = [
|
|
356
353
|
"cfg-if",
|
|
357
354
|
"indoc",
|
|
@@ -367,9 +364,9 @@ dependencies = [
|
|
|
367
364
|
|
|
368
365
|
[[package]]
|
|
369
366
|
name = "pyo3-build-config"
|
|
370
|
-
version = "0.22.
|
|
367
|
+
version = "0.22.6"
|
|
371
368
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
372
|
-
checksum = "
|
|
369
|
+
checksum = "b14b5775b5ff446dd1056212d778012cbe8a0fbffd368029fd9e25b514479c38"
|
|
373
370
|
dependencies = [
|
|
374
371
|
"once_cell",
|
|
375
372
|
"target-lexicon",
|
|
@@ -377,9 +374,9 @@ dependencies = [
|
|
|
377
374
|
|
|
378
375
|
[[package]]
|
|
379
376
|
name = "pyo3-ffi"
|
|
380
|
-
version = "0.22.
|
|
377
|
+
version = "0.22.6"
|
|
381
378
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
382
|
-
checksum = "
|
|
379
|
+
checksum = "9ab5bcf04a2cdcbb50c7d6105de943f543f9ed92af55818fd17b660390fc8636"
|
|
383
380
|
dependencies = [
|
|
384
381
|
"libc",
|
|
385
382
|
"pyo3-build-config",
|
|
@@ -387,27 +384,27 @@ dependencies = [
|
|
|
387
384
|
|
|
388
385
|
[[package]]
|
|
389
386
|
name = "pyo3-macros"
|
|
390
|
-
version = "0.22.
|
|
387
|
+
version = "0.22.6"
|
|
391
388
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
392
|
-
checksum = "
|
|
389
|
+
checksum = "0fd24d897903a9e6d80b968368a34e1525aeb719d568dba8b3d4bfa5dc67d453"
|
|
393
390
|
dependencies = [
|
|
394
391
|
"proc-macro2",
|
|
395
392
|
"pyo3-macros-backend",
|
|
396
393
|
"quote",
|
|
397
|
-
"syn 2.0.
|
|
394
|
+
"syn 2.0.90",
|
|
398
395
|
]
|
|
399
396
|
|
|
400
397
|
[[package]]
|
|
401
398
|
name = "pyo3-macros-backend"
|
|
402
|
-
version = "0.22.
|
|
399
|
+
version = "0.22.6"
|
|
403
400
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
404
|
-
checksum = "
|
|
401
|
+
checksum = "36c011a03ba1e50152b4b394b479826cad97e7a21eb52df179cd91ac411cbfbe"
|
|
405
402
|
dependencies = [
|
|
406
403
|
"heck",
|
|
407
404
|
"proc-macro2",
|
|
408
405
|
"pyo3-build-config",
|
|
409
406
|
"quote",
|
|
410
|
-
"syn 2.0.
|
|
407
|
+
"syn 2.0.90",
|
|
411
408
|
]
|
|
412
409
|
|
|
413
410
|
[[package]]
|
|
@@ -471,18 +468,18 @@ dependencies = [
|
|
|
471
468
|
|
|
472
469
|
[[package]]
|
|
473
470
|
name = "redox_syscall"
|
|
474
|
-
version = "0.5.
|
|
471
|
+
version = "0.5.8"
|
|
475
472
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
476
|
-
checksum = "
|
|
473
|
+
checksum = "03a862b389f93e68874fbf580b9de08dd02facb9a788ebadaf4a3fd33cf58834"
|
|
477
474
|
dependencies = [
|
|
478
475
|
"bitflags",
|
|
479
476
|
]
|
|
480
477
|
|
|
481
478
|
[[package]]
|
|
482
479
|
name = "rustversion"
|
|
483
|
-
version = "1.0.
|
|
480
|
+
version = "1.0.18"
|
|
484
481
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
485
|
-
checksum = "
|
|
482
|
+
checksum = "0e819f2bc632f285be6d7cd36e25940d45b2391dd6d9b939e79de557f7014248"
|
|
486
483
|
|
|
487
484
|
[[package]]
|
|
488
485
|
name = "scopeguard"
|
|
@@ -492,9 +489,9 @@ checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"
|
|
|
492
489
|
|
|
493
490
|
[[package]]
|
|
494
491
|
name = "serde"
|
|
495
|
-
version = "1.0.
|
|
492
|
+
version = "1.0.216"
|
|
496
493
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
497
|
-
checksum = "
|
|
494
|
+
checksum = "0b9781016e935a97e8beecf0c933758c97a5520d32930e460142b4cd80c6338e"
|
|
498
495
|
dependencies = [
|
|
499
496
|
"serde_derive",
|
|
500
497
|
]
|
|
@@ -510,13 +507,13 @@ dependencies = [
|
|
|
510
507
|
|
|
511
508
|
[[package]]
|
|
512
509
|
name = "serde_derive"
|
|
513
|
-
version = "1.0.
|
|
510
|
+
version = "1.0.216"
|
|
514
511
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
515
|
-
checksum = "
|
|
512
|
+
checksum = "46f859dbbf73865c6627ed570e78961cd3ac92407a2d117204c49232485da55e"
|
|
516
513
|
dependencies = [
|
|
517
514
|
"proc-macro2",
|
|
518
515
|
"quote",
|
|
519
|
-
"syn 2.0.
|
|
516
|
+
"syn 2.0.90",
|
|
520
517
|
]
|
|
521
518
|
|
|
522
519
|
[[package]]
|
|
@@ -570,9 +567,9 @@ dependencies = [
|
|
|
570
567
|
|
|
571
568
|
[[package]]
|
|
572
569
|
name = "syn"
|
|
573
|
-
version = "2.0.
|
|
570
|
+
version = "2.0.90"
|
|
574
571
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
575
|
-
checksum = "
|
|
572
|
+
checksum = "919d3b74a5dd0ccd15aeb8f93e7006bd9e14c295087c9896a110f490752bcf31"
|
|
576
573
|
dependencies = [
|
|
577
574
|
"proc-macro2",
|
|
578
575
|
"quote",
|
|
@@ -599,29 +596,29 @@ checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1"
|
|
|
599
596
|
|
|
600
597
|
[[package]]
|
|
601
598
|
name = "thiserror"
|
|
602
|
-
version = "1.0.
|
|
599
|
+
version = "1.0.69"
|
|
603
600
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
604
|
-
checksum = "
|
|
601
|
+
checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52"
|
|
605
602
|
dependencies = [
|
|
606
603
|
"thiserror-impl",
|
|
607
604
|
]
|
|
608
605
|
|
|
609
606
|
[[package]]
|
|
610
607
|
name = "thiserror-impl"
|
|
611
|
-
version = "1.0.
|
|
608
|
+
version = "1.0.69"
|
|
612
609
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
613
|
-
checksum = "
|
|
610
|
+
checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1"
|
|
614
611
|
dependencies = [
|
|
615
612
|
"proc-macro2",
|
|
616
613
|
"quote",
|
|
617
|
-
"syn 2.0.
|
|
614
|
+
"syn 2.0.90",
|
|
618
615
|
]
|
|
619
616
|
|
|
620
617
|
[[package]]
|
|
621
618
|
name = "unicode-ident"
|
|
622
|
-
version = "1.0.
|
|
619
|
+
version = "1.0.14"
|
|
623
620
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
624
|
-
checksum = "
|
|
621
|
+
checksum = "adb9e6ca4f869e1180728b7950e35922a7fc6397f7b641499e8f3ef06e50dc83"
|
|
625
622
|
|
|
626
623
|
[[package]]
|
|
627
624
|
name = "unicode-xid"
|
|
@@ -752,5 +749,5 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e"
|
|
|
752
749
|
dependencies = [
|
|
753
750
|
"proc-macro2",
|
|
754
751
|
"quote",
|
|
755
|
-
"syn 2.0.
|
|
752
|
+
"syn 2.0.90",
|
|
756
753
|
]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: bio-grumpy
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.4
|
|
4
4
|
Classifier: Development Status :: 2 - Pre-Alpha
|
|
5
5
|
Classifier: Programming Language :: Rust
|
|
6
6
|
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
@@ -8,7 +8,7 @@ Classifier: Programming Language :: Python :: Implementation :: PyPy
|
|
|
8
8
|
License-File: LICENSE
|
|
9
9
|
Summary: gumpy re-implemented in Rust
|
|
10
10
|
Author-email: Jeremy Westhead <jeremy.westhead@ndm.ox.ac.uk>
|
|
11
|
-
Requires-Python: >=3.8
|
|
11
|
+
Requires-Python: >=3.8, <3.13
|
|
12
12
|
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
|
|
13
13
|
Project-URL: Source, https://github.com/oxfordmmm/grumpy
|
|
14
14
|
|
|
@@ -5,7 +5,7 @@ build-backend = "maturin"
|
|
|
5
5
|
[project]
|
|
6
6
|
# 'grumpy' is taken on PyPi, but we can still use `import grumpy` after a `pip install bio-grumpy`
|
|
7
7
|
name = "bio-grumpy"
|
|
8
|
-
requires-python = ">=3.8"
|
|
8
|
+
requires-python = " >=3.8,<3.13"
|
|
9
9
|
classifiers = [
|
|
10
10
|
"Development Status :: 2 - Pre-Alpha",
|
|
11
11
|
"Programming Language :: Rust",
|
|
@@ -91,8 +91,8 @@ pub struct Evidence {
|
|
|
91
91
|
pub is_minor: bool,
|
|
92
92
|
|
|
93
93
|
#[pyo3(get, set)]
|
|
94
|
-
/// VCF row which this call originated from
|
|
95
|
-
pub vcf_row:
|
|
94
|
+
/// VCF row index which this call originated from
|
|
95
|
+
pub vcf_row: usize,
|
|
96
96
|
|
|
97
97
|
#[pyo3(get, set)]
|
|
98
98
|
/// Index of the COV field in the VCF row which this call originated from
|
|
@@ -5,7 +5,7 @@ use pyo3::prelude::*;
|
|
|
5
5
|
|
|
6
6
|
use ordered_float::{Float, OrderedFloat};
|
|
7
7
|
|
|
8
|
-
use crate::common::{Alt, AltType, Evidence, MinorType
|
|
8
|
+
use crate::common::{Alt, AltType, Evidence, MinorType};
|
|
9
9
|
use crate::gene::{codon_to_aa, Gene, GenePos};
|
|
10
10
|
use crate::genome::Genome;
|
|
11
11
|
|
|
@@ -22,8 +22,8 @@ pub struct Variant {
|
|
|
22
22
|
pub nucleotide_index: i64,
|
|
23
23
|
|
|
24
24
|
#[pyo3(get, set)]
|
|
25
|
-
///
|
|
26
|
-
pub evidence:
|
|
25
|
+
/// VCF row index for this variant's evidence
|
|
26
|
+
pub evidence: usize,
|
|
27
27
|
|
|
28
28
|
#[pyo3(get, set)]
|
|
29
29
|
/// Index of the VCF row. i.e COV at vcf_idx == coverage for this variant
|
|
@@ -274,7 +274,7 @@ impl GenomeDifference {
|
|
|
274
274
|
let variant = Variant {
|
|
275
275
|
variant: garc.clone(),
|
|
276
276
|
nucleotide_index: ref_pos.genome_idx,
|
|
277
|
-
evidence: alt.evidence.vcf_row
|
|
277
|
+
evidence: alt.evidence.vcf_row,
|
|
278
278
|
vcf_idx: alt.evidence.vcf_idx,
|
|
279
279
|
indel_length,
|
|
280
280
|
indel_nucleotides: indel_bases.clone(),
|
|
@@ -745,19 +745,16 @@ impl GeneDifference {
|
|
|
745
745
|
for (nc, cov, frs, ev) in minor_snps.iter() {
|
|
746
746
|
codon += &nc.to_string();
|
|
747
747
|
// Evidence is the only field which is None in the case of no minor SNP at this nc
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
minor_frs = frs.unwrap();
|
|
758
|
-
}
|
|
748
|
+
if let Some(e) = ev {
|
|
749
|
+
for e in e.iter() {
|
|
750
|
+
minor_evidence.push(e.clone());
|
|
751
|
+
}
|
|
752
|
+
if cov.is_some() && cov.unwrap() > minor_cov {
|
|
753
|
+
minor_cov = cov.unwrap();
|
|
754
|
+
}
|
|
755
|
+
if frs.is_some() && frs.unwrap() > minor_frs {
|
|
756
|
+
minor_frs = frs.unwrap();
|
|
759
757
|
}
|
|
760
|
-
None => {}
|
|
761
758
|
}
|
|
762
759
|
}
|
|
763
760
|
let aa = codon_to_aa(codon.clone());
|