1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
//! Grumpy, genetic analysis in Rust.
//!
//! This library provides a set of tools for genetic analysis, including:
//! - Genome representation
//! - Gene representation
//! - VCF file parsing
//! - Finding effects of a given VCF file at both genome and gene levels
//!
//! # Example
//! ```
//! use grumpy::genome::{Genome, mutate};
//! use grumpy::vcf::VCFFile;
//! use grumpy::difference::{GenomeDifference, GeneDifference};
//! use grumpy::common::MinorType;
//!
//! let mut reference = Genome::new("reference/MN908947.3.gb");
//! let vcf = VCFFile::new("test/dummy.vcf".to_string(), false, 3);
//! let mut sample = mutate(&reference, vcf);
//!
//! let genome_diff = GenomeDifference::new(reference.clone(), sample.clone(), MinorType::COV);
//! for variant in genome_diff.variants.iter(){
//! println!("{}", variant.variant);
//! }
//!
//! for gene_name in sample.genes_with_mutations.clone().iter(){
//! let gene_diff = GeneDifference::new(reference.get_gene(gene_name.clone()), sample.get_gene(gene_name.clone()), MinorType::COV);
//! for mutation in gene_diff.mutations.iter(){
//! println!("{}", mutation.mutation);
//! }
//! }
//!
//! ```
//!
//! Also provides an interface to this library as a Python module using PyO3.
//! `pip install bio-grumpy`
use *;
/// Grumpy, genetic analysis in Rust.
///
/// This library provides a set of tools for genetic analysis, including:
/// - Genome representation
/// - Gene representation
/// - VCF file parsing
/// - Finding effects of a given VCF file at both genome and gene levels