Skip to main content

fibertools_rs/cli/
pg_lift_opts.rs

1use crate::cli::GlobalOpts;
2use clap::Args;
3use std::fmt::Debug;
4
5#[derive(Args, Debug)]
6pub struct PgLiftOptions {
7    /// Reference FASTA file to use as source coordinates
8    #[clap()]
9    pub reference: String,
10    /// Input file with annotations to lift (defaults to BED format)
11    #[clap(short, long)]
12    pub input: String,
13    /// Input file is in BAM format (default: BED format)
14    #[clap(long)]
15    pub bam: bool,
16    /// Pangenome graph file in GBZ format
17    #[clap(short, long)]
18    pub graph: String,
19    /// Output BED file with lifted annotations
20    #[clap(short, long, default_value = "-")]
21    pub out: String,
22    /// panSN-spec prefix to add before graph injection (e.g., "HG002_2#0#")
23    #[clap(short, long)]
24    pub prefix: String,
25    /// Target sample/haplotype name for surjection (e.g., "HG002_1")
26    #[clap(long)]
27    pub target: String,
28    /// Split contigs into multiple BAM records every N base pairs for graph injection
29    #[clap(long, default_value_t = 100_000)]
30    pub split_size: usize,
31    /// Number of threads to use for vg operations
32    #[clap(long, default_value_t = 16)]
33    pub vg_threads: usize,
34    /// Path to vg binary (default: searches PATH)
35    #[clap(long, default_value = "vg")]
36    pub vg_binary: String,
37    /// Delimiter character to use when stripping panSN-spec (default: '#')
38    #[clap(short, long, default_value = "#")]
39    pub delimiter: char,
40    /// Keep intermediate files for debugging
41    #[clap(long)]
42    pub keep_intermediate: bool,
43    #[clap(flatten)]
44    pub global: GlobalOpts,
45}