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)]
25pub enum MapCommand {
27 Crispr(ArgsCrispr),
29 Gex(ArgsGex),
31 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}