Skip to content

Commit

Permalink
remove duplicate thread option
Browse files Browse the repository at this point in the history
  • Loading branch information
sharkLoc committed Dec 19, 2024
1 parent eb8e602 commit bb0d35d
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 27 deletions.
5 changes: 0 additions & 5 deletions src/cli/filter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,6 @@ pub fn filter_fastq(
error!("{}", FqkitError::InvalidPhredValue);
std::process::exit(1);
}
if ncpu <= 1 {
info!("thread num is: {}", ncpu);
} else {
info!("additional thread num is: {}", ncpu);
}
info!("output clean read1 file: {}", out1);
info!("output clean read2 file: {}", out2);

Expand Down
5 changes: 0 additions & 5 deletions src/cli/search.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,6 @@ pub fn search_fq(
}

info!("regex pattern is: {}", pat);
if ncpu == 1 || ncpu == 0 {
info!("thread num is: {}", ncpu);
} else {
info!("additional thread num is: {}", ncpu);
}

let mut chunk = chunk;
if chunk == 0 {
Expand Down
2 changes: 0 additions & 2 deletions src/cli/size.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
use crate::utils::*;
use anyhow::Result;
use bio::io::fastq;
//use crossbeam::channel::unbounded;
use crossbeam::channel::bounded;
use log::*;

Expand Down Expand Up @@ -43,7 +42,6 @@ pub fn size_fastq(
} else {
info!("reading from stdin");
}
info!("additional worker threads is: {}", ncpu);

let mut chunk = chunk;
if chunk == 0 {
Expand Down
9 changes: 0 additions & 9 deletions src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -217,9 +217,6 @@ pub enum Subcli {
/// the number of reads in the chunk on each thread
#[arg(short, long, default_value_t = 5000, value_name = "INT")]
chunk: usize,
/// number of additional worker threads to use
#[arg(short = '@', long = "thread", default_value_t = 4, value_name = "INT")]
thread: usize,
/// specify the file to store reads(interleaved) that cannot pass the filters, file ending in .gz/.bz2/.xz will be compressed automatically
#[arg(short = 'u', long = "failed", value_name = "FILE")]
failed: String,
Expand Down Expand Up @@ -260,9 +257,6 @@ pub enum Subcli {
/// the number of reads in the chunk on each thread
#[arg(short, long, default_value_t = 5000, value_name = "INT")]
chunk: usize,
/// number of additional worker threads to use
#[arg(short = '@', long = "thread", default_value_t = 1, value_name = "INT")]
thread: usize,
/// output contain pattern/motif reads result fastq file or write to stdout, file ending in .gz/.bz2/.xz will be compressed automatically
#[arg(short = 'o', long = "out", value_name = "FILE")]
out: Option<String>,
Expand Down Expand Up @@ -334,9 +328,6 @@ pub enum Subcli {
/// the number of reads in the chunk on each thread
#[arg(short, long, default_value_t = 5000, value_name = "INT")]
chunk: usize,
/// number of additional worker threads to use
#[arg(short = '@', long = "thread", default_value_t = 3, value_name = "INT")]
thread: usize,
/// output file name or write to stdout, file ending in .gz/.bz2/.xz will be compressed automatically
#[arg(short = 'o', long = "out", value_name = "FILE")]
out: Option<String>,
Expand Down
9 changes: 3 additions & 6 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,6 @@ fn main() -> Result<(), Error> {
case,
invert,
chunk,
thread,
out,
} => {
search_fq(
Expand All @@ -150,7 +149,7 @@ fn main() -> Result<(), Error> {
invert,
chunk,
out.as_ref(),
thread,
arg.threads,
arg.compression_level,
arg.stdout_type,
)?;
Expand Down Expand Up @@ -283,13 +282,12 @@ fn main() -> Result<(), Error> {
}
Subcli::size {
input,
thread,
chunk,
out,
} => {
size_fastq(
input.as_ref(),
thread,
arg.threads,
chunk,
out.as_ref(),
arg.compression_level,
Expand Down Expand Up @@ -369,7 +367,6 @@ fn main() -> Result<(), Error> {
average_qual,
phred,
chunk,
thread,
failed,
out1,
out2,
Expand All @@ -383,7 +380,7 @@ fn main() -> Result<(), Error> {
average_qual,
phred,
chunk,
thread,
arg.threads,
&failed,
&out1,
&out2,
Expand Down

0 comments on commit bb0d35d

Please sign in to comment.