Skip to content

Commit

Permalink
don't use set_threads after reading header
Browse files Browse the repository at this point in the history
found with test-file from #12
  • Loading branch information
brentp committed Feb 26, 2022
1 parent 8f7596f commit ea2cbfb
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ path = "src/main.rs"

flate2 = { version = "1.0", features = ["zlib-ng-compat"]}

rust-htslib = { version = "*", features = ["libdeflate", "static"] }
rust-htslib = { version = "0.38.2", features = ["libdeflate", "static"] }
#bitpacking = "0.8.4"
stream-vbyte = {version = "0.4.0", features=["x86_ssse3", "x86_sse41"]}
clap = {version = "~2.27.0", features=["suggestions"] }
Expand Down
4 changes: 2 additions & 2 deletions src/commands/encoder_cmd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -261,9 +261,9 @@ pub fn encoder_main(vpaths: Vec<&str>, opath: &str, jpath: &str) {
Err(error) => panic!("problem opening from stdin: {:?}", error),
}
};
vcf.set_threads(2).ok();
}
eprintln!("[echtvar] adding VCF:{}", vpath);
vcf.set_threads(2).ok();

for r in vcf.records() {
let rec = r.expect("error getting record");
Expand Down Expand Up @@ -377,7 +377,7 @@ pub fn encoder_main(vpaths: Vec<&str>, opath: &str, jpath: &str) {
}

let alleles = rec.alleles();
if alleles.len() > 2 {
if alleles.len() != 2 {
panic!(
"[echtvar] variants must be decomposed before running {:?}",
rec
Expand Down
2 changes: 1 addition & 1 deletion src/lib/echtvar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ impl EchtVars {
}

let alleles = variant.alleles();
if alleles.len() > 2 {
if alleles.len() != 2 {
panic!(
"[echtvar] variants must be decomposed before running. got variant with {} alleles at {}:{}",
alleles.len() - 1,
Expand Down

0 comments on commit ea2cbfb

Please sign in to comment.