From eaf1428f959eac531af6a696e726b52e022b88e4 Mon Sep 17 00:00:00 2001 From: Yangyang Li Date: Wed, 1 Nov 2023 11:28:52 -0500 Subject: [PATCH] fix(main): fix command line argument parsing bug --- Cargo.toml | 3 ++- src/extract.rs | 1 - src/main.rs | 3 +-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 6050342..8a1ee83 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -26,12 +26,13 @@ codegen-units = 1 [dependencies] anyhow = { version = "1.0" } -clap = { version = "4.4.7", features = ["wrap_help", "derive"] } +clap = { version = "4.4.7", features = ["wrap_help", "derive", "color"] } clap-verbosity-flag = "2.1.0" env_logger = "0.10" human-panic = "1.2.1" indicatif = "0.17" log = "0.4" +colored = "2" noodles-bam = "0.49.0" noodles-bgzf = "0.25" diff --git a/src/extract.rs b/src/extract.rs index 6fe7b10..ffa538b 100644 --- a/src/extract.rs +++ b/src/extract.rs @@ -39,7 +39,6 @@ where ReadName::try_from(s.into_bytes()) .map_err(|e| io::Error::new(io::ErrorKind::InvalidData, e)) })?; - read_names.insert(read_name); } diff --git a/src/main.rs b/src/main.rs index 6a8810a..bc30cc2 100644 --- a/src/main.rs +++ b/src/main.rs @@ -22,12 +22,11 @@ enum Commands { /// Extract reads from a BAM file Extract { /// Read IDs - #[arg(short, long)] readids: String, /// Bam input file - #[arg(short, long)] input: PathBuf, + /// Is the output file a BAM file #[arg(short = 'b', default_value = "false")] isbam: bool, },