1pub mod crispr;
2pub mod gex;
3mod input;
4mod options;
5mod runtime;
6
7pub use crispr::ArgsCrispr;
8pub use gex::ArgsGex;
9pub use input::MultiPairedInput;
10pub use options::MapOptions;
11pub use runtime::RuntimeOptions;
12
13use std::path::PathBuf;
14
15use anyhow::Result;
16use clap::Subcommand;
17
18#[derive(Subcommand, Debug)]
19pub enum MapCommand {
20 Gex(ArgsGex),
22 Crispr(ArgsCrispr),
24}
25
26impl MapCommand {
27 pub fn validate_outdir(&self) -> Result<()> {
28 match self {
29 MapCommand::Gex(args) => args.output.validate_outdir(),
30 MapCommand::Crispr(args) => args.output.validate_outdir(),
31 }
32 }
33
34 pub fn log_path(&self) -> PathBuf {
35 match self {
36 MapCommand::Gex(args) => args.output.log_path(),
37 MapCommand::Crispr(args) => args.output.log_path(),
38 }
39 }
40}
41
42pub const GEOMETRY_GEX_FLEX_V1: &str = "[barcode][umi:12] | [gex][:18][probe]";
43pub const GEOMETRY_GEX_FLEX_V2: &str = "[barcode][umi:12][:10][probe] | [gex]";
44pub const GEOMETRY_CRISPR_FLEX_V1: &str = "[barcode][umi:12] | [probe][anchor][protospacer]";
45pub const GEOMETRY_CRISPR_FLEX_V2: &str =
46 "[barcode][umi:12][:10][probe] | [:14][anchor][protospacer]";
47pub const GEOMETRY_CRISPR_PROPERSEQ: &str = "[barcode][umi:12] | [:18][probe][anchor][protospacer]";