CPTR-ReSeqTB / UVP

Mycobacterium tuberculosis next generation sequence analysis
MIT License
21 stars 12 forks source link

Allow users to provide a config file when launching UVP #25

Closed dfornika closed 4 years ago

dfornika commented 4 years ago

It may be more convenient for users if they can supply a config file on the command-line. If it is assumed that the config file is installed as part of the uvp package, there are situations where it may be difficult for users to locate and/or edit that file.

If UVP is installed as a shared conda package or a Docker container it may be difficult for users to edit the config file.

tseemann commented 4 years ago

An environment variable like $UVP_CONFIG_PATH would be good to override the default too. Then our containers or system could contain:

export UVP_CONFIG_PATH=/some/local/settings/folder/uvp.yaml

And not affect the software code or need to remember to add command line params.

dfornika commented 4 years ago

@tseemann good suggestion, though I haven't implemented that in the current pull-request. I want to make sure that all combinations of possible sources of those parameters are well-behaved. Adding the --config, --threads and --krakendb flags is sufficient for my plan to implement a galaxy wrapper.

Do you (or anyone reading this) think that loading the config from an environment variable should be added to #26? I'd prefer to merge as-is.

tseemann commented 4 years ago

I think --config is a major improvement, go for it!