From e9dd9c3be50e00482fcae5b512e75702257a9321 Mon Sep 17 00:00:00 2001 From: Nima Mousavi Date: Mon, 31 Jan 2022 13:37:45 -0800 Subject: [PATCH] updating enclone to changed vdj_ann --- Cargo.lock | 9 +++--- enclone/Cargo.toml | 2 +- enclone/src/join.rs | 40 ++++++++++++++++++++++++--- enclone_args/Cargo.toml | 2 +- enclone_args/src/read_json.rs | 10 ++++++- enclone_com/Cargo.toml | 2 +- enclone_core/Cargo.toml | 2 +- enclone_denovo/Cargo.toml | 4 +-- enclone_main/Cargo.toml | 4 +-- enclone_print/Cargo.toml | 2 +- enclone_proto/Cargo.toml | 2 +- enclone_ranger/Cargo.toml | 2 +- enclone_stuff/Cargo.toml | 2 +- enclone_tail/Cargo.toml | 2 +- enclone_tools/Cargo.toml | 4 +-- enclone_tools/src/bin/annotate_seq.rs | 11 ++++---- master.toml | 4 +-- 17 files changed, 72 insertions(+), 32 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c99c60578f..2ad508aa47 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3961,7 +3961,7 @@ dependencies = [ "io_utils", "lazy_static", "libc", - "nix 0.23.1", + "nix 0.20.0", "pprof", "stats_utils", "string_utils", @@ -5124,7 +5124,7 @@ version = "1.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4ee73e6e4924fe940354b8d4d98cad5231175d615cd855b758adc658c0aac6a0" dependencies = [ - "cfg-if 1.0.0", + "cfg-if 0.1.10", "rand", "static_assertions", ] @@ -5278,8 +5278,7 @@ dependencies = [ [[package]] name = "vdj_ann" version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf2382451427e4e963c910f39d8823ea29d015c5d77193db2aa4278c429a9dc8" +source = "git+https://github.com/10XGenomics/rust-toolbox.git?branch=nmmsv/missing-gd-features#47149b03e9b70db731ec4f33fe9e8c3a051319a1" dependencies = [ "align_tools", "amino", @@ -5301,7 +5300,7 @@ dependencies = [ [[package]] name = "vdj_ann_ref" version = "0.2.0" -source = "git+https://github.com/10XGenomics/rust-toolbox.git?rev=8ed8d7b3186b13c5db6ec7ad3fb8786f111eda65#8ed8d7b3186b13c5db6ec7ad3fb8786f111eda65" +source = "git+https://github.com/10XGenomics/rust-toolbox.git?branch=nmmsv/missing-gd-features#47149b03e9b70db731ec4f33fe9e8c3a051319a1" dependencies = [ "debruijn", "exons", diff --git a/enclone/Cargo.toml b/enclone/Cargo.toml index 22ac778afe..01bba8a247 100644 --- a/enclone/Cargo.toml +++ b/enclone/Cargo.toml @@ -43,7 +43,7 @@ serde_derive = "1" serde_json = "1" stats_utils = "0.1" string_utils = "0.1" -vdj_ann = "0.4" +vdj_ann = { git = "https://github.com/10XGenomics/rust-toolbox.git", branch = "nmmsv/missing-gd-features"} vector_utils = "0.1" [dev-dependencies] diff --git a/enclone/src/join.rs b/enclone/src/join.rs index 7d3b534030..2cbe0eccd1 100644 --- a/enclone/src/join.rs +++ b/enclone/src/join.rs @@ -432,12 +432,28 @@ pub fn join_exacts( if !info[k1].has_del[m] { fwriteln!(log, "chain {}, tig 1", m + 1); let t1 = DnaString::from_acgt_bytes(tig1); - print_annotations(&t1, refdata, &mut log, false, true, false); + print_annotations( + &t1, + refdata, + &mut log, + false, + true, + false, + Some(ctl.gen_opt.gamma_delta), + ); } } if ctl.join_print_opt.ann { fwriteln!(log, "chain {}, tig 1", m + 1); - print_annotations(&otig1, refdata, &mut log, false, true, false); + print_annotations( + &otig1, + refdata, + &mut log, + false, + true, + false, + Some(ctl.gen_opt.gamma_delta), + ); } if ctl.join_print_opt.seq { fwriteln!(log, "\nchain {}, tig 2 = {}", m + 1, otig2.to_string()); @@ -447,12 +463,28 @@ pub fn join_exacts( if !info[k2].has_del[m] { fwriteln!(log, "chain {}, tig 2", m + 1); let t2 = DnaString::from_acgt_bytes(tig2); - print_annotations(&t2, refdata, &mut log, false, true, false); + print_annotations( + &t2, + refdata, + &mut log, + false, + true, + false, + Some(ctl.gen_opt.gamma_delta), + ); } } if ctl.join_print_opt.ann { fwriteln!(log, "chain {}, tig 2", m + 1); - print_annotations(&otig2, refdata, &mut log, false, true, false); + print_annotations( + &otig2, + refdata, + &mut log, + false, + true, + false, + Some(ctl.gen_opt.gamma_delta), + ); } } } diff --git a/enclone_args/Cargo.toml b/enclone_args/Cargo.toml index 903b2f1c1f..41ab4acd48 100644 --- a/enclone_args/Cargo.toml +++ b/enclone_args/Cargo.toml @@ -39,5 +39,5 @@ regex = { version = "1", default-features = false, features = ["std", "perf"] } serde_json = "1" string_utils = "0.1" tilde-expand = "0.1" -vdj_ann = "0.4" +vdj_ann = { git = "https://github.com/10XGenomics/rust-toolbox.git", branch = "nmmsv/missing-gd-features"} vector_utils = "0.1" diff --git a/enclone_args/src/read_json.rs b/enclone_args/src/read_json.rs index 31f88261d9..040f6fb28f 100644 --- a/enclone_args/src/read_json.rs +++ b/enclone_args/src/read_json.rs @@ -203,7 +203,15 @@ fn parse_vector_entry_from_json( if reannotate || ctl.gen_opt.reprod { let x = DnaString::from_dna_string(full_seq); let mut ann = Vec::<(i32, i32, i32, i32, i32)>::new(); - annotate_seq(&x, refdata, &mut ann, true, false, true); + annotate_seq( + &x, + refdata, + &mut ann, + true, + false, + true, + Some(ctl.gen_opt.gamma_delta), + ); // If there are multiple V segment alignments, possibly reduce to just one. diff --git a/enclone_com/Cargo.toml b/enclone_com/Cargo.toml index 8306668135..59ec9c74eb 100644 --- a/enclone_com/Cargo.toml +++ b/enclone_com/Cargo.toml @@ -27,5 +27,5 @@ lazy_static = "1" pretty_trace = "0.5" string_utils = "0.1" tokio = { version = "1", default-features = false, features = ["io-util", "macros", "rt-multi-thread"] } -vdj_ann = "0.4" +vdj_ann = { git = "https://github.com/10XGenomics/rust-toolbox.git", branch = "nmmsv/missing-gd-features"} diff --git a/enclone_core/Cargo.toml b/enclone_core/Cargo.toml index 284098f90a..dbe52eb013 100644 --- a/enclone_core/Cargo.toml +++ b/enclone_core/Cargo.toml @@ -43,7 +43,7 @@ stirling_numbers = "0.1" string_utils = "0.1" superslice = "1" tables = "0.1" -vdj_ann = "0.4" +vdj_ann = { git = "https://github.com/10XGenomics/rust-toolbox.git", branch = "nmmsv/missing-gd-features"} vector_utils = "0.1" zstd = "0.9" diff --git a/enclone_denovo/Cargo.toml b/enclone_denovo/Cargo.toml index c155233fa0..7696a15ba6 100644 --- a/enclone_denovo/Cargo.toml +++ b/enclone_denovo/Cargo.toml @@ -39,6 +39,6 @@ stats_utils = "0.1" string_utils = "0.1" superslice = "1" tables = "0.1" -vdj_ann = "0.4" -vdj_ann_ref = { git = "https://github.com/10XGenomics/rust-toolbox.git", rev = "8ed8d7b3186b13c5db6ec7ad3fb8786f111eda65" } +vdj_ann = { git = "https://github.com/10XGenomics/rust-toolbox.git", branch = "nmmsv/missing-gd-features"} +vdj_ann_ref = { git = "https://github.com/10XGenomics/rust-toolbox.git", branch = "nmmsv/missing-gd-features"} vector_utils = "0.1" diff --git a/enclone_main/Cargo.toml b/enclone_main/Cargo.toml index edd84f88a3..4069ab8d9e 100644 --- a/enclone_main/Cargo.toml +++ b/enclone_main/Cargo.toml @@ -42,6 +42,6 @@ stats_utils = "0.1" string_utils = "0.1" tables = "0.1" tilde-expand = "0.1" -vdj_ann = "0.4" -vdj_ann_ref = { git = "https://github.com/10XGenomics/rust-toolbox.git", rev = "8ed8d7b3186b13c5db6ec7ad3fb8786f111eda65" } +vdj_ann = { git = "https://github.com/10XGenomics/rust-toolbox.git", branch = "nmmsv/missing-gd-features"} +vdj_ann_ref = { git = "https://github.com/10XGenomics/rust-toolbox.git", branch = "nmmsv/missing-gd-features"} vector_utils = "0.1" diff --git a/enclone_print/Cargo.toml b/enclone_print/Cargo.toml index 03e6156a31..8822c6ed41 100644 --- a/enclone_print/Cargo.toml +++ b/enclone_print/Cargo.toml @@ -51,5 +51,5 @@ serde_json = "1" stats_utils = "0.1" string_utils = "0.1" tables = "0.1" -vdj_ann = "0.4" +vdj_ann = { git = "https://github.com/10XGenomics/rust-toolbox.git", branch = "nmmsv/missing-gd-features"} vector_utils = "0.1" diff --git a/enclone_proto/Cargo.toml b/enclone_proto/Cargo.toml index fde444fcd1..0532f76640 100644 --- a/enclone_proto/Cargo.toml +++ b/enclone_proto/Cargo.toml @@ -25,7 +25,7 @@ prost = { version = "0.9", default_features = false, features = ["std", "prost-d serde = "1" serde_derive = "1" thiserror = "1" -vdj_ann = "0.4" +vdj_ann = { git = "https://github.com/10XGenomics/rust-toolbox.git", branch = "nmmsv/missing-gd-features"} [build-dependencies] prost-build = "0.9" diff --git a/enclone_ranger/Cargo.toml b/enclone_ranger/Cargo.toml index 1b238f6b65..f9b0f823a3 100644 --- a/enclone_ranger/Cargo.toml +++ b/enclone_ranger/Cargo.toml @@ -31,5 +31,5 @@ io_utils = "0.3" itertools = "0.10" rayon = "1" string_utils = "0.1" -vdj_ann = "0.4" +vdj_ann = { git = "https://github.com/10XGenomics/rust-toolbox.git", branch = "nmmsv/missing-gd-features"} vector_utils = "0.1" diff --git a/enclone_stuff/Cargo.toml b/enclone_stuff/Cargo.toml index f2182b4cff..08c274a922 100644 --- a/enclone_stuff/Cargo.toml +++ b/enclone_stuff/Cargo.toml @@ -38,5 +38,5 @@ regex = { version = "1", default-features = false, features = ["std", "perf"] } stats_utils = "0.1" string_utils = "0.1" tables = "0.1" -vdj_ann = "0.4" +vdj_ann = { git = "https://github.com/10XGenomics/rust-toolbox.git", branch = "nmmsv/missing-gd-features"} vector_utils = "0.1" diff --git a/enclone_tail/Cargo.toml b/enclone_tail/Cargo.toml index f67753a19e..01f8501058 100644 --- a/enclone_tail/Cargo.toml +++ b/enclone_tail/Cargo.toml @@ -56,7 +56,7 @@ tables = "0.1" tar = "0.4" tiny-skia = "0.6" usvg = { version = "0.19", features = ["text"] } -vdj_ann = "0.4" +vdj_ann = { git = "https://github.com/10XGenomics/rust-toolbox.git", branch = "nmmsv/missing-gd-features"} vector_utils = "0.1" # to replace by this after bumping version # vector_utils = "0.1.0" diff --git a/enclone_tools/Cargo.toml b/enclone_tools/Cargo.toml index 4d55ff5923..b41367c123 100644 --- a/enclone_tools/Cargo.toml +++ b/enclone_tools/Cargo.toml @@ -46,6 +46,6 @@ regex = { version = "1", default-features = false, features = ["std", "perf"] } serde_json = "1" stats_utils = "0.1" string_utils = "0.1" -vdj_ann = "0.4" -vdj_ann_ref = { git = "https://github.com/10XGenomics/rust-toolbox.git", rev = "8ed8d7b3186b13c5db6ec7ad3fb8786f111eda65" } +vdj_ann = { git = "https://github.com/10XGenomics/rust-toolbox.git", branch = "nmmsv/missing-gd-features"} +vdj_ann_ref = { git = "https://github.com/10XGenomics/rust-toolbox.git", branch = "nmmsv/missing-gd-features"} vector_utils = "0.1" diff --git a/enclone_tools/src/bin/annotate_seq.rs b/enclone_tools/src/bin/annotate_seq.rs index 0a1214cd84..96c555aff2 100644 --- a/enclone_tools/src/bin/annotate_seq.rs +++ b/enclone_tools/src/bin/annotate_seq.rs @@ -98,6 +98,7 @@ fn main() { gamma_delta = true; } } + let is_gd = Some(gamma_delta); // Make reference data. @@ -128,9 +129,9 @@ fn main() { if ext { fwriteln!(log, "\nFW ANNOTATION VERSUS PLAIN REFERENCE\n"); } - print_annotations(&seq, &refdata, &mut log, false, true, verbose); + print_annotations(&seq, &refdata, &mut log, false, true, verbose, is_gd); let mut ann = Vec::<(i32, i32, i32, i32, i32)>::new(); - annotate_seq(&seq, &refdata, &mut ann, true, false, true); + annotate_seq(&seq, &refdata, &mut ann, true, false, true, is_gd); print_cdr3_using_ann(&seq, &refdata, &ann, &mut log); print_start_codon_positions(&seq, &mut log); if is_valid(&seq, &refdata, &ann, true, &mut log, Some(gamma_delta)) { @@ -255,16 +256,16 @@ fn main() { if ext { let seq_rc = seq.rc(); fwriteln!(log, "\nRC ANNOTATION VERSUS PLAIN REFERENCE\n"); - print_annotations(&seq_rc, &refdata, &mut log, false, false, verbose); + print_annotations(&seq_rc, &refdata, &mut log, false, false, verbose, is_gd); // Annotate using the extended reference. let mut refdatax = RefData::new(); make_vdj_ref_data(&mut refdatax, imgt, &species, true, is_tcr, is_bcr); fwriteln!(log, "\nFW ANNOTATION VERSUS EXTENDED REFERENCE\n"); - print_annotations(&seq, &refdatax, &mut log, false, false, verbose); + print_annotations(&seq, &refdatax, &mut log, false, false, verbose, is_gd); fwriteln!(log, "\nRC ANNOTATION VERSUS EXTENDED REFERENCE\n"); - print_annotations(&seq_rc, &refdatax, &mut log, false, false, verbose); + print_annotations(&seq_rc, &refdatax, &mut log, false, false, verbose, is_gd); } // Print. diff --git a/master.toml b/master.toml index 817d9e75b4..4d7392630a 100755 --- a/master.toml +++ b/master.toml @@ -103,7 +103,7 @@ tonic = { version = "0.6", default-features = false, features = ["transport", "c tonic-build = { version = "0.6", default-features = false, features = ["transport", "prost"] } users = "0.11" usvg = { version = "0.19", features = ["text"] } -vdj_ann = "0.4" -vdj_ann_ref = { git = "https://github.com/10XGenomics/rust-toolbox.git", rev = "8ed8d7b3186b13c5db6ec7ad3fb8786f111eda65" } +vdj_ann = { git = "https://github.com/10XGenomics/rust-toolbox.git", branch = "nmmsv/missing-gd-features"} +vdj_ann = { git = "https://github.com/10XGenomics/rust-toolbox.git", branch = "nmmsv/missing-gd-features"} vector_utils = "0.1" yaml-rust = "0.4"