Mercurial > repos > galaxyp > openms_mztabexporter
comparison fill_ctd.py @ 13:2735db4dd8d9 draft
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 3d1e5f37fd16524a415f707772eeb7ead848c5e3
author | galaxyp |
---|---|
date | Thu, 01 Dec 2022 19:23:13 +0000 |
parents | c679f920716e |
children |
comparison
equal
deleted
inserted
replaced
12:ee860980edc6 | 13:2735db4dd8d9 |
---|---|
30 no values of d are overwritten | 30 no values of d are overwritten |
31 """ | 31 """ |
32 for k, v in e.items(): | 32 for k, v in e.items(): |
33 if (k in d and isinstance(d[k], dict) and isinstance(e[k], collections.abc.Mapping)): | 33 if (k in d and isinstance(d[k], dict) and isinstance(e[k], collections.abc.Mapping)): |
34 mergeDicts(d[k], e[k]) | 34 mergeDicts(d[k], e[k]) |
35 elif k not in d and not isinstance(e[k], collections.abc.Mapping): | 35 elif k not in d: |
36 d[k] = e[k] | 36 d[k] = e[k] |
37 else: | 37 else: |
38 sys.stderr.write("fill_ctd.py: could not merge key %s for %s in %s" % (k, d, e)) | 38 sys.stderr.write("fill_ctd.py: could not merge key %s for %s in %s" % (k, d, e)) |
39 sys.exit(1) | 39 sys.exit(1) |
40 | 40 |
133 hc_args = json.load(fh, object_hook=_json_object_hook) | 133 hc_args = json.load(fh, object_hook=_json_object_hook) |
134 | 134 |
135 # insert the hc_args into the args | 135 # insert the hc_args into the args |
136 mergeDicts(args, hc_args) | 136 mergeDicts(args, hc_args) |
137 | 137 |
138 if "adv_opts_cond" in args: | 138 # put the contents of the advanced options section into the main dict |
139 args.update(args["adv_opts_cond"]) | 139 if "adv_opts" in args: |
140 del args["adv_opts_cond"] | 140 args.update(args["adv_opts"]) |
141 del args["adv_opts"] | |
141 | 142 |
142 # IDMapper has in and spectra:in params, in is used in out as format_source", | 143 # IDMapper has in and spectra:in params, in is used in out as format_source", |
143 # which does not work in Galaxy: https://github.com/galaxyproject/galaxy/pull/9493" | 144 # which does not work in Galaxy: https://github.com/galaxyproject/galaxy/pull/9493" |
144 # therefore hardcoded params change the name of spectra:in to spectra:_in | 145 # therefore hardcoded params change the name of spectra:in to spectra:_in |
145 # which is corrected here again | 146 # which is corrected here again |