biomedicalinformaticsgroup / Sargasso

Sargasso disambiguates mixed-species high-throughput sequencing data.
http://biomedicalinformaticsgroup.github.io/Sargasso/
Other
8 stars 4 forks source link

some options were overwritten by others #71

Closed hxin closed 5 years ago

hxin commented 6 years ago

The following options will be overwritten by the strategy option if provided.

[--mismatch-threshold=<mismatch-threshold>]
[--minmatch-threshold=<minmatch-threshold>]
[--multimap-threshold=<multimap-threshold>]
[--reject-multimaps]
hxin commented 5 years ago

Do we want a logic where if any of the above is specified by the user with a strategy, we overwrite the strategy value with the user-specified value?

Thus, the priority will be: user specify strategy default

Currently, the code is like this:

options = cls.parse(args, doc)
options[opts.SAMPLE_INFO_INDEX] = cls.parse_sample_info(options)
options[opts.SPECIES_OPTIONS_INDEX] = cls.parse_species_options(options)
options = cls._parse_sargasso_strategy(options)

The code implemented the above priority logic, but I cant seem to find a way to know, if a parameter is user provided or the default value? Maybe you have some idea? @lweasel

hxin commented 5 years ago

note this in the documentation, that the strategy will overwrite the following parameters: [--mismatch-threshold=] [--minmatch-threshold=] [--multimap-threshold=] [--reject-multimaps]