diff matchms_similarity_wrapper.py @ 3:9f8532c99845 draft

planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit 38a5028a7abe99794086e9b1374ab4bb8bfa68de
author recetox
date Wed, 21 Sep 2022 15:28:55 +0000
parents 67ed0d4f3724
children ba5e9bd05d5b
line wrap: on
line diff
--- a/matchms_similarity_wrapper.py	Thu Sep 08 14:48:21 2022 +0000
+++ b/matchms_similarity_wrapper.py	Wed Sep 21 15:28:55 2022 +0000
@@ -47,7 +47,7 @@
         raise ValueError(f'File format {args.queries_format} not supported for query spectra.')
 
     if args.symmetric:
-        reference_spectra = []
+        reference_spectra = queries_spectra.copy()
     else:
         if args.references_format == 'msp':
             reference_spectra = list(load_from_msp(args.references_filename))
@@ -73,7 +73,7 @@
 
     print("Calculating scores...")
     scores = calculate_scores(
-        references=queries_spectra if args.symmetric else reference_spectra,
+        references=reference_spectra,
         queries=queries_spectra,
         similarity_function=similarity_metric,
         is_symmetric=args.symmetric