Mercurial > repos > galaxyp > ms_data_converter
changeset 1:a36e9f847308 default tip
Fixes for running on Windows via pulsar
author | Jim Johnson <jj@umn.edu> |
---|---|
date | Wed, 11 Mar 2015 16:47:12 -0500 |
parents | dfafbfd7983d |
children | |
files | ms_data_converter.py ms_data_converter.xml |
diffstat | 2 files changed, 12 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/ms_data_converter.py Wed Mar 11 11:36:26 2015 -0400 +++ b/ms_data_converter.py Wed Mar 11 16:47:12 2015 -0500 @@ -118,6 +118,9 @@ stop_err("Must specify output location") input_files = [] for i, input in enumerate(options.inputs): + # the commnadline template cannot determine if optional files exists, so do it here + if not os.path.exists(input): + continue input_base = None if len(options.input_names) > i: input_base = options.input_names[i] @@ -141,11 +144,11 @@ ## AB_SCIEX_MS_Converter <input format> <input data> <output content type> <output format> <output file> [data compression setting] [data precision setting] [create index flag] inputs_as_str = " ".join(['%s' % shellquote(input) for input in input_files]) output_file = re.sub('(%s)?$' % options.fromextension.lower(), options.toextension, input_files[0].lower()) - cmd = "AB_SCIEX_MS_Converter %s %s %s %s %s" % (options.fromextension.upper(), inputs_as_str, options.content_type, options.toextension.upper(), output_file ) + cmd = "AB_SCIEX_MS_Converter %s %s -%s %s %s" % (options.fromextension.upper(), inputs_as_str, options.content_type, options.toextension.upper(), output_file ) if str_to_bool(options.zlib): cmd = "%s %s" % (cmd, "/zlib") if options.binaryencoding: - cmd = "%s %s" % (cmd, "/singleprecision" if options.binaryencoding == '32' else "/doubleprecision") + cmd = "%s %s" % (cmd, "/singleprecision" if options.binaryencoding == '32' else "") if str_to_bool(options.zlib): cmd = "%s %s" % (cmd, "/index") if options.debug:
--- a/ms_data_converter.xml Wed Mar 11 11:36:26 2015 -0400 +++ b/ms_data_converter.xml Wed Mar 11 16:47:12 2015 -0500 @@ -18,16 +18,18 @@ #end if --input="${input.extra_files_path}/wiff" --input_name="${basename}.wiff" - #if $os.path.exists($os.path.join($input.extra_files_path,'wiff_scan')): + #### The os.path.exist did not work on Windows + ## #if $os.path.exists($os.path.join($input.extra_files_path,'wiff_scan')): --implicit="${input.extra_files_path}/wiff_scan" --input="${input.extra_files_path}/wiff_scan" --input_name="${basename}.wiff.scan" - #end if - #if $os.path.exists($os.path.join($input.extra_files_path,'wiff_mtd')): + ## #end if + #### The os.path.exist did not work on Windows + ## #if $os.path.exists($os.path.join($input.extra_files_path,'wiff_mtd')): --implicit="${input.extra_files_path}/wiff_mtd" --input="${input.extra_files_path}/wiff_mtd" --input_name="${basename}.wiff.mtd" - #end if + ## #end if --output=${output} ## BEGIN_VERSION_DEFAULT --fromextension=$ext @@ -39,6 +41,7 @@ --binaryencoding=${result.precision} --index=${result.index} #end if + --debug </command> <inputs>