snaketool_utils
cli_utils.py
OrderedCommands
Bases: click.Group
This class will preserve the order of subcommands, which is useful when printing --help
copy_config(local_config, merge_config=None, system_config=None, log=None)
Copy a config file, optionally merging in new config values.
| Parameters: |
|
|---|
echo_click(msg, log=None)
Print Error message to STDERR and copy to log file
| Parameters: |
|
|---|
msg(err_message, log=None)
Format error message for printing
| Parameters: |
|
|---|
msg_box(splash, errmsg=None, log=None)
Fancy formatting and multi-line error message for printing
| Parameters: |
|
|---|
read_config(file)
Read a config file to a dictionary
| Parameters: |
|
|---|
Returns (dict): Config read from YAML file
recursive_merge_config(config, overwrite_config)
Recursively merge a dictionary.
This is required for updating/merging config dictionaries that are more than one level deep.
| Parameters: |
|
|---|
run_snakemake(configfile=None, system_config=None, snakefile_path=None, merge_config=None, threads=1, use_conda=False, conda_prefix=None, snake_default=None, snake_args=[], profile=None, log=None, **kwargs)
Run a Snakefile!
| Parameters: |
|
|---|
Returns (int): Exit code
tuple_to_list(dictionary)
Convert click tuples to lists in (nested) dictionaries for safe dumping with pyyaml
| Parameters: |
|
|---|
| Returns: |
|
|---|
update_config(in_config=None, merge=None, output_config=None, log=None)
Update the default config with the new config values
| Parameters: |
|
|---|
write_config(config, file, log=None)
Write the config dictionary to a YAML file
| Parameters: |
|
|---|