Skip to content

Commit bb0d35d

Browse files
committed
remove duplicate thread option
1 parent eb8e602 commit bb0d35d

File tree

5 files changed

+3
-27
lines changed

5 files changed

+3
-27
lines changed

src/cli/filter.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,6 @@ pub fn filter_fastq(
2727
error!("{}", FqkitError::InvalidPhredValue);
2828
std::process::exit(1);
2929
}
30-
if ncpu <= 1 {
31-
info!("thread num is: {}", ncpu);
32-
} else {
33-
info!("additional thread num is: {}", ncpu);
34-
}
3530
info!("output clean read1 file: {}", out1);
3631
info!("output clean read2 file: {}", out2);
3732

src/cli/search.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,6 @@ pub fn search_fq(
2626
}
2727

2828
info!("regex pattern is: {}", pat);
29-
if ncpu == 1 || ncpu == 0 {
30-
info!("thread num is: {}", ncpu);
31-
} else {
32-
info!("additional thread num is: {}", ncpu);
33-
}
3429

3530
let mut chunk = chunk;
3631
if chunk == 0 {

src/cli/size.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
use crate::utils::*;
22
use anyhow::Result;
33
use bio::io::fastq;
4-
//use crossbeam::channel::unbounded;
54
use crossbeam::channel::bounded;
65
use log::*;
76

@@ -43,7 +42,6 @@ pub fn size_fastq(
4342
} else {
4443
info!("reading from stdin");
4544
}
46-
info!("additional worker threads is: {}", ncpu);
4745

4846
let mut chunk = chunk;
4947
if chunk == 0 {

src/command.rs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -217,9 +217,6 @@ pub enum Subcli {
217217
/// the number of reads in the chunk on each thread
218218
#[arg(short, long, default_value_t = 5000, value_name = "INT")]
219219
chunk: usize,
220-
/// number of additional worker threads to use
221-
#[arg(short = '@', long = "thread", default_value_t = 4, value_name = "INT")]
222-
thread: usize,
223220
/// specify the file to store reads(interleaved) that cannot pass the filters, file ending in .gz/.bz2/.xz will be compressed automatically
224221
#[arg(short = 'u', long = "failed", value_name = "FILE")]
225222
failed: String,
@@ -260,9 +257,6 @@ pub enum Subcli {
260257
/// the number of reads in the chunk on each thread
261258
#[arg(short, long, default_value_t = 5000, value_name = "INT")]
262259
chunk: usize,
263-
/// number of additional worker threads to use
264-
#[arg(short = '@', long = "thread", default_value_t = 1, value_name = "INT")]
265-
thread: usize,
266260
/// output contain pattern/motif reads result fastq file or write to stdout, file ending in .gz/.bz2/.xz will be compressed automatically
267261
#[arg(short = 'o', long = "out", value_name = "FILE")]
268262
out: Option<String>,
@@ -334,9 +328,6 @@ pub enum Subcli {
334328
/// the number of reads in the chunk on each thread
335329
#[arg(short, long, default_value_t = 5000, value_name = "INT")]
336330
chunk: usize,
337-
/// number of additional worker threads to use
338-
#[arg(short = '@', long = "thread", default_value_t = 3, value_name = "INT")]
339-
thread: usize,
340331
/// output file name or write to stdout, file ending in .gz/.bz2/.xz will be compressed automatically
341332
#[arg(short = 'o', long = "out", value_name = "FILE")]
342333
out: Option<String>,

src/main.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,6 @@ fn main() -> Result<(), Error> {
140140
case,
141141
invert,
142142
chunk,
143-
thread,
144143
out,
145144
} => {
146145
search_fq(
@@ -150,7 +149,7 @@ fn main() -> Result<(), Error> {
150149
invert,
151150
chunk,
152151
out.as_ref(),
153-
thread,
152+
arg.threads,
154153
arg.compression_level,
155154
arg.stdout_type,
156155
)?;
@@ -283,13 +282,12 @@ fn main() -> Result<(), Error> {
283282
}
284283
Subcli::size {
285284
input,
286-
thread,
287285
chunk,
288286
out,
289287
} => {
290288
size_fastq(
291289
input.as_ref(),
292-
thread,
290+
arg.threads,
293291
chunk,
294292
out.as_ref(),
295293
arg.compression_level,
@@ -369,7 +367,6 @@ fn main() -> Result<(), Error> {
369367
average_qual,
370368
phred,
371369
chunk,
372-
thread,
373370
failed,
374371
out1,
375372
out2,
@@ -383,7 +380,7 @@ fn main() -> Result<(), Error> {
383380
average_qual,
384381
phred,
385382
chunk,
386-
thread,
383+
arg.threads,
387384
&failed,
388385
&out1,
389386
&out2,

0 commit comments

Comments
 (0)