Skip to content

Commit

Permalink
Merge pull request #32 from JMencius/master
Browse files Browse the repository at this point in the history
enhance -i performace
  • Loading branch information
wdecoster authored May 18, 2024
2 parents eeb5438 + a4409fc commit 98e0dc9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ clap = { version = "4.2.1", features = ["derive"] }
rayon = "1.7.0"
approx = "0.5.1"
minimap2 = "0.1.17+minimap2.2.27"
flate2 = "1.0"
flate2 = { version = "1.0.17", features = ["zlib-ng"], default-features = false }
7 changes: 4 additions & 3 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use bio::io::fastq;
use clap::Parser;
use minimap2::*;
use rayon::prelude::*;
use std::io::{self, Read};
use std::io::{self, Read, BufReader};
use std::path::{PathBuf, Path};
use std::sync::atomic::{AtomicUsize, Ordering};
use std::sync::Arc;
Expand Down Expand Up @@ -94,8 +94,9 @@ fn main() {
if path.extension().and_then(|s| s.to_str()) == Some("gz") {
// deal with gz compressed file
let gzfile = File::open(&path).expect("Error: Unable to open gzipped file");
let mut decoder = GzDecoder::new(gzfile);
filter(&mut decoder, args);
let buf_reader = BufReader::with_capacity(512*1024, gzfile);
let mut decoder = GzDecoder::new(buf_reader);
filter(&mut decoder, args);

}
else {
Expand Down

0 comments on commit 98e0dc9

Please sign in to comment.