From 3b25dba4e341b1cf89a0194cd42009c47eceb574 Mon Sep 17 00:00:00 2001 From: Zargham Ahmad Date: Mon, 25 Sep 2023 15:31:47 +0200 Subject: [PATCH] changed boolean to select --- tools/matchms/macros.xml | 12 ++- tools/matchms/matchms_filtering.xml | 100 +++++++----------- tools/matchms/matchms_similarity.xml | 20 ++-- tools/matchms/matchms_spectral_similarity.xml | 2 +- 4 files changed, 58 insertions(+), 76 deletions(-) diff --git a/tools/matchms/macros.xml b/tools/matchms/macros.xml index 8beccdc2..83a1a8c5 100644 --- a/tools/matchms/macros.xml +++ b/tools/matchms/macros.xml @@ -57,9 +57,11 @@ - - + + + + + outer - + from matchms.importing import load_from_msp, scores_from_json from matchms import Scores -#if $scores.use_scores +#if $scores.use_scores == "True" scores = scores_from_json("$scores_in") join_type = "$scores.join_type" #else diff --git a/tools/matchms/matchms_filtering.xml b/tools/matchms/matchms_filtering.xml index 1a3b7a71..cd70c028 100644 --- a/tools/matchms/matchms_filtering.xml +++ b/tools/matchms/matchms_filtering.xml @@ -30,32 +30,32 @@ python3 ${__tool_directory__}/matchms_filtering_wrapper.py \ --spectra "$spectra" \ --spectra_format "$spectra.ext" \ - #if $normalise_intensities.is_true + #if $normalise_intensities_is_true == "TRUE" -normalise_intensities \ #end if - #if $default_filters.is_true + #if $default_filters_is_true == "TRUE" -default_filters \ #end if - #if $clean_metadata.is_true + #if $clean_metadata_is_true == "TRUE" -clean_metadata \ #end if - #if $relative_intensity.is_true + #if $relative_intensity.is_true == "TRUE" -relative_intensity \ --from_intensity "$relative_intensity.from_intensity" \ --to_intensity "$relative_intensity.to_intensity" \ #end if - #if $mz_range.is_true + #if $mz_range.is_true == "TRUE" -mz_range \ --from_mz "$mz_range.from_mz" \ --to_mz "$mz_range.to_mz" \ #end if - #if $require_smiles.is_true + #if $require_smiles_is_true == "TRUE" -require_smiles \ #end if - #if $require_inchi.is_true + #if $require_inchi_is_true == "TRUE" -require_inchi \ #end if - #if $reduce_to_top_n_peaks.is_true + #if $reduce_to_top_n_peaks.is_true == "TRUE" -reduce_to_top_n_peaks \ --n_max "$reduce_to_top_n_peaks.n_max" \ #end if @@ -65,31 +65,19 @@ - - - - - - - - - - - - - - - - - - + + + - + + + + @@ -98,8 +86,11 @@ - + + + + @@ -107,23 +98,18 @@ - - - - - + - - - - - + - + + + + @@ -139,23 +125,17 @@ -
- -
+
-
- -
+
-
- -
+
@@ -178,16 +158,12 @@ -
- -
+
-
- -
+
diff --git a/tools/matchms/matchms_similarity.xml b/tools/matchms/matchms_similarity.xml index c827f1fa..d196f0ff 100644 --- a/tools/matchms/matchms_similarity.xml +++ b/tools/matchms/matchms_similarity.xml @@ -24,10 +24,10 @@ python3 ${__tool_directory__}/matchms_similarity_wrapper.py \ - #if $ri_filtering.is_true + #if $ri_filtering.is_true == "TRUE" -r $ri_filtering.tolerance \ #end if - #if $symmetric.is_symmetric + #if $symmetric.is_symmetric == "TRUE" -s \ #else --ref "$references" \ @@ -58,8 +58,10 @@ - + + + + @@ -108,8 +110,10 @@ - + + + + @@ -143,7 +147,7 @@ - + @@ -166,7 +170,7 @@ - + diff --git a/tools/matchms/matchms_spectral_similarity.xml b/tools/matchms/matchms_spectral_similarity.xml index 12dc1bde..d0d9c82e 100644 --- a/tools/matchms/matchms_spectral_similarity.xml +++ b/tools/matchms/matchms_spectral_similarity.xml @@ -36,7 +36,7 @@ name="${similarity_metric}_${algorithm.tolerance}_${algorithm.mz_power}_${algori @init_scores@ -#if $scores.use_scores +#if $scores.use_scores == "True" layer = similarity.sparse_array( references=scores.references, queries=scores.queries,