bio-grumpy 0.1.2__tar.gz → 0.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.
- {bio_grumpy-0.1.2 → bio_grumpy-0.1.4}/Cargo.lock +1 -1
- {bio_grumpy-0.1.2 → bio_grumpy-0.1.4}/Cargo.toml +1 -1
- {bio_grumpy-0.1.2 → bio_grumpy-0.1.4}/PKG-INFO +1 -1
- {bio_grumpy-0.1.2 → bio_grumpy-0.1.4}/src/difference.rs +10 -0
- {bio_grumpy-0.1.2 → bio_grumpy-0.1.4}/src/main.rs +0 -14
- {bio_grumpy-0.1.2 → bio_grumpy-0.1.4}/src/vcf.rs +13 -3
- {bio_grumpy-0.1.2 → bio_grumpy-0.1.4}/.github/workflows/release.yaml +0 -0
- {bio_grumpy-0.1.2 → bio_grumpy-0.1.4}/.gitignore +0 -0
- {bio_grumpy-0.1.2 → bio_grumpy-0.1.4}/LICENSE +0 -0
- {bio_grumpy-0.1.2 → bio_grumpy-0.1.4}/README-python.md +0 -0
- {bio_grumpy-0.1.2 → bio_grumpy-0.1.4}/README.md +0 -0
- {bio_grumpy-0.1.2 → bio_grumpy-0.1.4}/pyproject.toml +0 -0
- {bio_grumpy-0.1.2 → bio_grumpy-0.1.4}/reference/MN908947.3.gb +0 -0
- {bio_grumpy-0.1.2 → bio_grumpy-0.1.4}/reference/NC_000962.3.gbk +0 -0
- {bio_grumpy-0.1.2 → bio_grumpy-0.1.4}/src/common.rs +0 -0
- {bio_grumpy-0.1.2 → bio_grumpy-0.1.4}/src/gene.rs +0 -0
- {bio_grumpy-0.1.2 → bio_grumpy-0.1.4}/src/genome.rs +0 -0
- {bio_grumpy-0.1.2 → bio_grumpy-0.1.4}/src/lib.rs +0 -0
|
@@ -156,6 +156,11 @@ impl GenomeDifference{
|
|
|
156
156
|
let mut gene_position = None;
|
|
157
157
|
let mut codon_idx = None;
|
|
158
158
|
|
|
159
|
+
if alt.alt_type == AltType::REF{
|
|
160
|
+
// Skip ref calls
|
|
161
|
+
continue;
|
|
162
|
+
}
|
|
163
|
+
|
|
159
164
|
// Only annotate with gene information if there is a single gene at this position
|
|
160
165
|
if alt_pos.genes.len() == 1{
|
|
161
166
|
gene_name = Some(alt_pos.genes[0].clone());
|
|
@@ -638,6 +643,11 @@ impl GeneDifference{
|
|
|
638
643
|
let amino_acid_number = None;
|
|
639
644
|
let amino_acid_sequence = None;
|
|
640
645
|
|
|
646
|
+
if alt.alt_type == AltType::REF{
|
|
647
|
+
// Skip ref calls
|
|
648
|
+
continue;
|
|
649
|
+
}
|
|
650
|
+
|
|
641
651
|
if alt.alt_type == AltType::SNP || alt.alt_type == AltType::HET || alt.alt_type == AltType::NULL{
|
|
642
652
|
mutation = ref_nc.reference.to_string() + &ref_nc.nucleotide_number.to_string() + &alt.base;
|
|
643
653
|
ref_nucleotides = Some(ref_nc.reference.to_string());
|
|
@@ -35,13 +35,7 @@ fn main() {
|
|
|
35
35
|
let sample_start = SystemTime::now();
|
|
36
36
|
let mut sample = mutate(&reference, vcf);
|
|
37
37
|
let sample_end = SystemTime::now();
|
|
38
|
-
// sample.build_all_genes();
|
|
39
38
|
|
|
40
|
-
// let gene_name = "ponA1".to_string();
|
|
41
|
-
|
|
42
|
-
// let gene_diff = GeneDifference::new(reference.get_gene(gene_name.clone()), sample.get_gene(gene_name.clone()), MinorType::COV);
|
|
43
|
-
// println!("{:?}", gene_diff.mutations.iter().map(|mutation| mutation.mutation.clone()).collect::<Vec<String>>());
|
|
44
|
-
// println!("{:?}\n", gene_diff.minor_mutations.iter().map(|mutation| mutation.mutation.clone()).collect::<Vec<String>>());
|
|
45
39
|
let genome_start = SystemTime::now();
|
|
46
40
|
let difference = GenomeDifference::new(reference.clone(), sample.clone(), MinorType::COV);
|
|
47
41
|
println!("{:?}", difference.variants.iter().map(|variant| variant.variant.clone()).collect::<Vec<String>>());
|
|
@@ -62,12 +56,4 @@ fn main() {
|
|
|
62
56
|
println!("Genome diff took {:?}", genome_end.duration_since(genome_start).unwrap());
|
|
63
57
|
println!("Gene diff took {:?}", gene_end.duration_since(gene_start).unwrap());
|
|
64
58
|
|
|
65
|
-
|
|
66
|
-
// let gene_name = "fabG1".to_string();
|
|
67
|
-
// let rrs_diff = GeneDifference::new(reference.get_gene(gene_name.clone()), sample.get_gene(gene_name.clone()), MinorType::COV);
|
|
68
|
-
// println!("{:?}", rrs_diff.mutations.iter().map(|mutation| mutation.mutation.clone()).collect::<Vec<String>>());
|
|
69
|
-
// println!("{:?}", rrs_diff.minor_mutations.iter().map(|mutation| mutation.mutation.clone()).collect::<Vec<String>>());
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
59
|
}
|
|
@@ -237,15 +237,25 @@ impl VCFFile{
|
|
|
237
237
|
alt_idx = first.parse::<i32>().unwrap() - 1;
|
|
238
238
|
}
|
|
239
239
|
if cov.len() == 1{
|
|
240
|
-
// Just 1 item in the call so it's a null call
|
|
240
|
+
// Just 1 item in the call so santiy check if it's a null call
|
|
241
|
+
if genotype == &vec!["0", "0"]{
|
|
242
|
+
// Ref call
|
|
243
|
+
call_type = AltType::REF;
|
|
244
|
+
alt_allele = ref_allele.clone();
|
|
245
|
+
}
|
|
246
|
+
else{
|
|
247
|
+
// Null call
|
|
248
|
+
call_type = AltType::NULL;
|
|
249
|
+
alt_allele = "x".to_string();
|
|
250
|
+
}
|
|
241
251
|
calls.push(Evidence{
|
|
242
252
|
cov: Some(cov[0 as usize]),
|
|
243
253
|
frs: Some(ordered_float::OrderedFloat(1.0)),
|
|
244
254
|
genotype: genotype.join("/"),
|
|
245
|
-
call_type
|
|
255
|
+
call_type,
|
|
246
256
|
vcf_row: record.clone(),
|
|
247
257
|
reference: ref_allele.chars().nth(0).unwrap().to_string(),
|
|
248
|
-
alt:
|
|
258
|
+
alt: alt_allele.clone(),
|
|
249
259
|
genome_index: record.position,
|
|
250
260
|
is_minor: false,
|
|
251
261
|
vcf_idx: 0 as i64
|
|
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
|