fibertools_rs/cli/
qc_opts.rs

1use crate::utils::input_bam::InputBam;
2use clap::Args;
3use std::fmt::Debug;
4
5#[derive(Args, Debug)]
6pub struct QcOpts {
7    #[clap(flatten)]
8    pub input: InputBam,
9    /// Output text file with QC metrics. The format is a tab-separated file with the following columns: "statistic\tvalue\tcount" where "statistic" is the name of the metric, "value" is the value of the metric, and "count" is the number of times the metric was observed.
10    #[clap(default_value = "-")]
11    pub out: String,
12    /// Calculate the auto-correlation function of the m6A marks in the fiber-seq data.
13    #[clap(long)]
14    pub acf: bool,
15    /// maximum lag for the ACF calculation
16    #[clap(long, default_value = "250")]
17    pub acf_max_lag: usize,
18    /// Minimum number of m6A marks to use a read in the ACF calculation
19    #[clap(long, default_value = "100")]
20    pub acf_min_m6a: usize,
21    /// maximum number of reads to use in the ACF calculation
22    #[clap(long, default_value = "10000")]
23    pub acf_max_reads: usize,
24    /// After sampling the first "acf-max-reads" randomly sample one of every "acf-sample-rate" reads and replace one of the previous reads at random.
25    #[clap(long, default_value = "100")]
26    pub acf_sample_rate: f32,
27    /// In the output include a measure of the number of m6A events per MSPs of a given size.
28    /// The output format is: "m6a_per_msp_size\t{m6A count},{MSP size},{is a FIRE}\t{count}"
29    /// e.g. "m6a_per_msp_size\t35,100,false\t100"
30    #[clap(short, long)]
31    pub m6a_per_msp: bool,
32    /// Only process the first "n" reads in the input bam file.
33    #[clap(long)]
34    pub n_reads: Option<usize>,
35}