Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ minor versions may carry breaking changes).
- Experimental **WFA alignment backend** (`--align-backend wfa2`) with a
`--wfa-max-edits` edit-budget cap (#49, #51). ASV-equivalent to Needleman-
Wunsch on tested Illumina and PacBio HiFi data, but not byte-identical.
- `dada-pooled --gzip` writes the per-sample JSON files gzip-compressed as
`{sample}.json.gz` (#70).
- `merge-pairs` records input-file provenance and warns on mismatch (#10).
- `just` / `make` task runners for build, install, test, and docs (#46).

Expand Down
4 changes: 4 additions & 0 deletions src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -572,6 +572,10 @@ pub enum Commands {
#[arg(long)]
compact: bool,

/// Gzip-compress the per-sample JSON files (written as `{sample}.json.gz`)
#[arg(long)]
gzip: bool,

/// Print progress to stderr
#[arg(long)]
verbose: bool,
Expand Down
9 changes: 7 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1238,6 +1238,7 @@ fn main() -> io::Result<()> {
no_kmer_screen,
failed_uniques: failed_uniques_path,
compact,
gzip,
verbose,
} => {
use std::collections::{HashMap, HashSet};
Expand Down Expand Up @@ -1559,8 +1560,12 @@ fn main() -> io::Result<()> {

let json = to_json(&Tagged::new("dada-pooled", out), compact)?;

let path = output_dir.join(format!("{sample_name}.json"));
std::fs::write(&path, &json)?;
let path = output_dir.join(if gzip {
format!("{sample_name}.json.gz")
} else {
format!("{sample_name}.json")
});
misc::write_maybe_gz(&path, json.as_bytes())?;
if verbose {
eprintln!(
"[dada-pooled] wrote {} ({} ASV(s), {} reads)",
Expand Down
Loading