cyto_cli/map/
mod.rs

1pub mod crispr;
2pub mod generic;
3pub mod geometry;
4pub mod gex;
5pub mod input;
6pub mod map;
7pub mod probe;
8pub mod runtime;
9
10pub use crispr::ArgsCrispr;
11pub use generic::ArgsGeneric;
12pub use geometry::Geometry;
13pub use gex::ArgsGex;
14pub use input::{BinseqInput, MultiPairedInput, PairedInput};
15pub use map::MapOptions;
16pub use probe::ProbeOptions;
17pub use runtime::RuntimeOptions;
18
19use std::path::PathBuf;
20
21use anyhow::Result;
22use clap::Subcommand;
23
24#[derive(Subcommand, Debug)]
25/// Map sequences to a library
26pub enum MapCommand {
27    /// Map sequences to a Flex CRISPR library
28    Crispr(ArgsCrispr),
29    /// Map sequences to a Flex GEX library
30    Gex(ArgsGex),
31    /// Map sequences to a generic library
32    Generic(ArgsGeneric),
33}
34impl MapCommand {
35    pub fn validate_outdir(&self) -> Result<()> {
36        match self {
37            MapCommand::Crispr(args) => args.validate_outdir(),
38            MapCommand::Gex(args) => args.validate_outdir(),
39            MapCommand::Generic(args) => args.validate_outdir(),
40        }
41    }
42    pub fn log_path(&self) -> PathBuf {
43        match self {
44            MapCommand::Crispr(args) => args.log_path(),
45            MapCommand::Gex(args) => args.log_path(),
46            MapCommand::Generic(args) => args.log_path(),
47        }
48    }
49}