Skip to content

Commit

Permalink
use build_global() to fix issue with using inappropriate number of th…
Browse files Browse the repository at this point in the history
…reads
  • Loading branch information
wdecoster committed Jul 4, 2024
1 parent 1fa9fcc commit dd2f307
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "STRdust"
version = "0.8.4"
version = "0.8.5"
edition = "2021"


Expand Down
4 changes: 2 additions & 2 deletions src/call.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ pub fn genotype_repeats(args: Cli) {
// output is sorted by chrom, start and end
rayon::ThreadPoolBuilder::new()
.num_threads(args.threads)
.build()
.build_global()
.expect("Failed to create threadpool");
// genotypes contains the output of the genotyping, a struct instance
let genotypes = Mutex::new(Vec::new());
Expand Down Expand Up @@ -59,7 +59,7 @@ pub fn genotype_repeats(args: Cli) {
// this does not use the BufWriter (as that doesn't work across threads), but writes directly to stdout
rayon::ThreadPoolBuilder::new()
.num_threads(args.threads)
.build()
.build_global()
.expect("Failed to create threadpool");
let num_intervals = repeats.num_intervals;
repeats
Expand Down
1 change: 1 addition & 0 deletions src/genotype.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ fn genotype_repeat(
// Create an index for minimap2 alignment to the artificial reference
let aligner = minimap2::Aligner::builder()
.map_ont()
.with_index_threads(1)
.with_cigar()
.with_seq(&repeat_compressed_reference)
.unwrap_or_else(|err| panic!("Unable to build index:\n{err}"));
Expand Down

0 comments on commit dd2f307

Please sign in to comment.