Skip to content

Commit b956eb9

Browse files
authored
Update main.rs
1 parent 1104c76 commit b956eb9

1 file changed

Lines changed: 23 additions & 2 deletions

File tree

src/main.rs

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ mod barcode;
1414
#[derive(Parser, Debug)]
1515
#[command(
1616
author = "size_t",
17-
version = "version 0.2.2",
17+
version = "version 0.2.3",
1818
about = "fqkit: a simple program for fastq file manipulation",
1919
long_about = None
2020
)]
@@ -163,8 +163,22 @@ enum Subcli {
163163
/// fastq file outdir
164164
#[arg(short = 'o', long = "out", default_value_t = String::from("."))]
165165
out: String,
166-
}
166+
},
167+
168+
/// merge PE reads as interleaved fastq file
169+
merge {
170+
/// input read1 fastq[.gz] file.
171+
#[arg(short = '1', long = "read1")]
172+
read1: String,
167173

174+
/// input read2 fastq[.gz] file.
175+
#[arg(short = '2', long = "read2")]
176+
read2: String,
177+
178+
/// output interleaved fastq file name.
179+
#[arg(short = 'o', long = "out", default_value_t = String::from("interleaved.fq.gz"))]
180+
out: String,
181+
}
168182
}
169183

170184
fn main() -> Result<()> {
@@ -299,6 +313,13 @@ fn main() -> Result<()> {
299313
} => {
300314
split_interleaved(&Some(&input), &out, &pre)?;
301315
}
316+
Subcli::merge {
317+
read1,
318+
read2,
319+
out,
320+
} => {
321+
interleaved(&Some(read1.as_str()), &Some(read2.as_str()), &Some(out.as_str()))?;
322+
}
302323
}
303324
Ok(())
304325
}

0 commit comments

Comments
 (0)