Skip to main content

cyto_cli/map/
crispr.rs

1use std::path::PathBuf;
2
3use anyhow::Result;
4use clap::Parser;
5
6use crate::map::{MultiPairedInput, RuntimeOptions};
7use crate::ArgsOutput;
8
9use super::MapOptions;
10
11#[derive(Parser, Debug)]
12pub struct ArgsCrispr {
13    #[clap(flatten)]
14    pub input: MultiPairedInput,
15
16    #[clap(flatten)]
17    pub map: MapOptions,
18
19    #[clap(flatten)]
20    pub crispr: CrisprOptions,
21
22    #[clap(flatten)]
23    pub runtime: RuntimeOptions,
24
25    #[clap(flatten)]
26    pub output: ArgsOutput,
27}
28
29#[derive(Parser, Debug)]
30#[clap(next_help_heading = "CRISPR Options")]
31pub struct CrisprOptions {
32    /// Path to CRISPR guides library file
33    #[clap(short = 'c', long = "guides")]
34    pub guides_filepath: String,
35}
36
37impl ArgsCrispr {
38    pub fn validate_outdir(&self) -> Result<()> {
39        self.output.validate_outdir()
40    }
41    pub fn log_path(&self) -> PathBuf {
42        self.output.log_path()
43    }
44}