deeprvat.deeprvat.config
Module Contents
Functions
Updates base_config with values from input_config, for intersecting nested keys. |
|
Generates the necessary deeprvat_config.yaml file for running all pipelines. This function expects inputs as shown in the following config-file: - DEEPRVAT_DIR/example/deeprvat_input_config.yaml |
|
Generates the necessary sg_discovery_config.yaml file for running the seed_gene_discovery pipelines. This function expects inputs as shown in the following config-file: - DEEPRVAT_DIR/example/seed_gene_discovery_input_config.yaml |
|
Select seed genes based on baseline results and update the configuration file. |
Data
API
- deeprvat.deeprvat.config.REPO_DIR = 'resolve(...)'
- deeprvat.deeprvat.config.logger = 'getLogger(...)'
- deeprvat.deeprvat.config.cli()
- deeprvat.deeprvat.config.setup_logging(log_filename: str = 'config_generate.log')
- deeprvat.deeprvat.config.load_yaml(file_path: str)
- deeprvat.deeprvat.config.update_defaults(base_config, input_config)
Updates base_config with values from input_config, for intersecting nested keys.
- Args:
base_config (dict): base DeepRVAT configurations input_config (dict): user input DeepRVAt configurations
- Returns:
dict: updated base_config based on any intersecting inputs from input_config
- deeprvat.deeprvat.config.handle_cv_options(input_config, full_config, expected_input_keys)
- deeprvat.deeprvat.config.handle_regenie_options(input_config, full_config, expected_input_keys)
- deeprvat.deeprvat.config.handle_pretrained_models(input_config, expected_input_keys)
- deeprvat.deeprvat.config.update_thresholds(input_config, full_config, train_only)
- deeprvat.deeprvat.config.update_full_config(input_config, full_config, train_only)
- deeprvat.deeprvat.config.validate_keys(input_config, expected_input_keys, optional_input_keys, base_config)
- deeprvat.deeprvat.config.create_main_config(config_file: str, output_dir: Optional[str] = '.', clobber: Optional[bool] = False)
Generates the necessary deeprvat_config.yaml file for running all pipelines. This function expects inputs as shown in the following config-file: - DEEPRVAT_DIR/example/deeprvat_input_config.yaml
- Parameters:
config_file (str) – Path to directory of relevant config yaml file
output_dir (str) – Path to directory where created deeprvat_config.yaml will be saved.
clobber (bool) – Overwrite existing deeprvat_config.yaml, even if it is newer than config_file
- Returns:
Joined configuration file saved to deeprvat_config.yaml.
- deeprvat.deeprvat.config.create_sg_discovery_config(config_file: str, output_dir: Optional[str] = '.')
Generates the necessary sg_discovery_config.yaml file for running the seed_gene_discovery pipelines. This function expects inputs as shown in the following config-file: - DEEPRVAT_DIR/example/seed_gene_discovery_input_config.yaml
- Parameters:
config_file (str) – Path to directory of relevant config yaml file
output_dir (str) – Path to directory where created sg_discovery_config.yaml will be saved.
- Returns:
Joined configuration file saved to sg_discovery_config.yaml.
- deeprvat.deeprvat.config.update_config(association_only: bool, phenotype: Optional[str], baseline_results: Tuple[str], baseline_results_out: Optional[str], seed_genes_out: Optional[str], old_config_file: str, new_config_file: str)
Select seed genes based on baseline results and update the configuration file.
- Parameters:
association_only (bool) – Update config file only for association testing
old_config_file (str) – Path to the old configuration file.
phenotype (Optional[str]) – Phenotype to update in the configuration.
baseline_results (Tuple[str]) – Paths to baseline result files.
baseline_results_out (Optional[str]) – Path to save the updated baseline results.
seed_genes_out (Optional[str]) – Path to save the seed genes.
new_config_file (str) – Path to the new configuration file.
- Raises:
ValueError – If neither –seed-gene-dir nor –baseline-results is specified.
- Returns:
Updated configuration file saved to new_config.yaml. Selected seed genes saved to seed_genes_out.parquet. Optionally, save baseline results to a parquet file if baseline_results_out is specified.