From e06e6735e889bcc914c9de5c06978badb1a76ffe Mon Sep 17 00:00:00 2001 From: mvdbeek Date: Fri, 12 Apr 2024 13:58:41 +0200 Subject: [PATCH] Fix boolean to select bugs in msconvert Fixes ``` NotFound: cannot find 'input_ident' while searching for 'data_processing.precursor_refinement.input_ident.ext' File "galaxy/jobs/runners/__init__.py", line 297, in prepare_job job_wrapper.prepare() File "galaxy/jobs/__init__.py", line 1256, in prepare ) = tool_evaluator.build() File "galaxy/tools/evaluation.py", line 588, in build global_tool_logs(self._build_command_line, config_file, "Building Command Line") File "galaxy/tools/evaluation.py", line 98, in global_tool_logs raise e File "galaxy/tools/evaluation.py", line 94, in global_tool_logs return func() File "galaxy/tools/evaluation.py", line 611, in _build_command_line command_line = fill_template( File "galaxy/util/template.py", line 115, in fill_template return fill_template( File "galaxy/util/template.py", line 115, in fill_template return fill_template( File "galaxy/util/template.py", line 115, in fill_template return fill_template( File "galaxy/util/template.py", line 115, in fill_template return fill_template( File "galaxy/util/template.py", line 115, in fill_template return fill_template( File "galaxy/util/template.py", line 115, in fill_template return fill_template( File "galaxy/util/template.py", line 115, in fill_template return fill_template( File "galaxy/util/template.py", line 115, in fill_template return fill_template( File "galaxy/util/template.py", line 115, in fill_template return fill_template( File "galaxy/util/template.py", line 115, in fill_template return fill_template( File "galaxy/util/template.py", line 123, in fill_template raise first_exception or e File "galaxy/util/template.py", line 87, in fill_template return unicodify(t, log_exception=False) File "galaxy/util/__init__.py", line 1196, in unicodify value = str(value) File "Cheetah/Template.py", line 1053, in __unicode__ return getattr(self, mainMethName)() File "cheetah_DynamicallyCompiledCheetahTemplate_1712898486_6070771_49370.py", line 146, in respond ``` --- tools/msconvert/msconvert.xml | 2 +- tools/msconvert/msconvert_macros.xml | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/tools/msconvert/msconvert.xml b/tools/msconvert/msconvert.xml index 17f7f8b5a..0a5d2028a 100644 --- a/tools/msconvert/msconvert.xml +++ b/tools/msconvert/msconvert.xml @@ -1,4 +1,4 @@ - + Convert and/or filter mass spectrometry files msconvert_macros.xml diff --git a/tools/msconvert/msconvert_macros.xml b/tools/msconvert/msconvert_macros.xml index d48494c90..cf78a68b6 100644 --- a/tools/msconvert/msconvert_macros.xml +++ b/tools/msconvert/msconvert_macros.xml @@ -32,7 +32,7 @@ #set inputmask = "'"+$basename+"'" #end if - #if $data_processing.precursor_refinement.use_mzrefinement + #if $data_processing.precursor_refinement.use_mzrefinement == "true" #set input_ident_name = ".".join((os.path.splitext($basename)[0], $data_processing.precursor_refinement.input_ident.ext)) #set output_refinement_name = os.path.splitext($basename)[0] + '.mzRefinement.tsv' ln -s '$data_processing.precursor_refinement.input_ident' '$input_ident_name' && @@ -65,7 +65,7 @@ --filter "scanSumming precursorTol=$general_options.scan_summing.precursorTol scanTimeTol=$general_options.scan_summing.scanTimeTol ionMobilityTol=$general_options.scan_summing.ionMobilityTol" #end if - #if $general_options.multi_run_output.do_multi_run_output: + #if $general_options.multi_run_output.do_multi_run_output == "true": #if len($general_options.multi_run_output.run_index_set) > 0 --runIndexSet " #for $index in $general_options.multi_run_output.run_index_set @@ -85,7 +85,7 @@ --filter "peakPicking $data_processing.peak_picking.pick_peaks_algorithm msLevel=$data_processing.peak_picking.pick_peaks_ms_levels" #end if - #if $data_processing.precursor_refinement.use_mzrefinement + #if $data_processing.precursor_refinement.use_mzrefinement == "true" --filter "mzRefiner $input_ident_name msLevels=$data_processing.precursor_refinement.precursor_refinement_ms_levels thresholdScore=$data_processing.precursor_refinement.thresholdScore @@ -229,7 +229,7 @@ #end if #end if - #if $data_processing.precursor_refinement.use_mzrefinement + #if $data_processing.precursor_refinement.use_mzrefinement == "true" && mv '$output_refinement_name' '$output_refinement'; #end if ]]> @@ -560,10 +560,10 @@ - data_processing['precursor_refinement']['use_mzrefinement'] == True + data_processing['precursor_refinement']['use_mzrefinement'] == "true" - general_options['multi_run_output']['do_multi_run_output'] == True + general_options['multi_run_output']['do_multi_run_output'] == "true"