| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- use std::path::PathBuf;
- use serde::{Serialize, Deserialize};
- use anyhow::Result;
- #[derive(Serialize, Deserialize, Clone, Debug)]
- pub struct Config {
- pub db: String,
- pub reference_fa: String,
- pub longreads_results_dir: String,
- pub panel_results_dir: String,
- pub dict_file: String,
- pub gff_path: String,
- pub min_loh_diff: f32,
- pub deepvariant_loh_pval: f64,
- pub min_mrd_depth: u32,
- pub min_diversity: f64,
- pub vep_chunk_size: usize,
- pub max_gnomad_af: f64,
- }
- impl ::std::default::Default for Config {
- fn default() -> Self {
- Self {
- db: "/data/db_results.sqlite".to_string(),
- reference_fa: "/data/ref/hs1/chm13v2.0.fa".to_string(),
- longreads_results_dir: "/data/longreads_basic_pipe".to_string(),
- panel_results_dir: "/data/oncoT".to_string(),
- dict_file: "/data/ref/hs1/chm13v2.0.dict".to_string(),
- gff_path: "/data/ref/hs1/features_not_in_vep.gff.gz".to_string(),
- min_loh_diff: 0.25,
- deepvariant_loh_pval: 0.001,
- min_mrd_depth: 6,
- min_diversity: 1.6,
- vep_chunk_size: 1_000,
- max_gnomad_af: 0.01,
- }
- }
- }
- impl Config {
- pub fn get() -> Result<Self> {
- Ok(confy::load("pandora_lib_variants", None)?)
- }
- pub fn path() -> Result<PathBuf> {
- Ok(confy::get_configuration_file_path("pandora_lib_variants", None)?)
- }
- }
|