1use std::path::PathBuf;
2
3use anyhow::Result;
4use clap::Parser;
5use cyto_io::validate_output_directory;
6
7#[derive(Parser, Debug)]
8#[clap(next_help_heading = "Output Options")]
9pub struct ArgsOutput {
10 #[clap(short = 'o', long, default_value = "./cyto_out")]
12 pub outdir: String,
13
14 #[clap(short = 'f', long)]
16 pub force: bool,
17
18 #[clap(long, default_value_t = 1_000)]
26 pub min_ibu_records: u64,
27}
28impl ArgsOutput {
29 pub fn validate_outdir(&self) -> Result<()> {
30 validate_output_directory(&self.outdir, self.force)
31 }
32 pub fn log_path(&self) -> PathBuf {
33 PathBuf::from(&self.outdir).join("cyto.log")
34 }
35}