Skip to content
Merged

Dev #25

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@
*test*
*lock
**/*lock
*.crt
3 changes: 1 addition & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,4 @@ zoe = { version = "0.0.19", default-features = false, features = [
] }

[profile.release]
strip = true
csv = "1.3.1"
strip = true
11 changes: 10 additions & 1 deletion variants_of_interest_table/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ pub struct RefInput {

#[derive(Deserialize, Debug)]
pub struct MutsOfInterestInput {
subtype: String,
protein: String,
aa_position: String,
aa: String,
Expand All @@ -121,6 +122,7 @@ pub struct Entry<'a> {
impl Entry<'_> {
fn update_entry_from_alignment(
&mut self,
subtype: &str,
aa_1: u8,
aa_2: u8,
muts_columns: &Vec<MutsOfInterestInput>,
Expand All @@ -130,7 +132,10 @@ impl Entry<'_> {
let hold_aa_mut = self.aa_mut.to_string();
//aa differences that are also in our "mutations of interest" list are written to file
for muts_entry in muts_columns {
if self.protein == muts_entry.protein
//println!("ref {}", subtype);
//println!("mut {}", muts_entry.subtype);
if subtype == muts_entry.subtype
&& self.protein == muts_entry.protein
&& self.aa_position.to_string() == muts_entry.aa_position
{
if hold_aa_mut == muts_entry.aa {
Expand Down Expand Up @@ -296,6 +301,7 @@ fn main() -> Result<(), Box<dyn Error>> {

//aa difference moved forward in process;
if entry.update_entry_from_alignment(
&ref_entry.subtype,
ref_aa,
query_aa,
&muts_interest,
Expand Down Expand Up @@ -346,6 +352,7 @@ fn main() -> Result<(), Box<dyn Error>> {

//aa difference moved forward in process;
if entry.update_entry_from_alignment(
&ref_entry.subtype,
partial_codon,
partial_codon,
&muts_interest,
Expand Down Expand Up @@ -435,6 +442,7 @@ fn main() -> Result<(), Box<dyn Error>> {

//aa difference moved forward in process;
if entry.update_entry_from_alignment(
&ref_entry.subtype,
ref_aa,
query_aa,
&muts_interest,
Expand Down Expand Up @@ -485,6 +493,7 @@ fn main() -> Result<(), Box<dyn Error>> {

//aa difference moved forward in process;
if entry.update_entry_from_alignment(
&ref_entry.subtype,
partial_codon,
partial_codon,
&muts_interest,
Expand Down