Mercurial > repos > recetox > matchms_spectral_similarity
diff matchms_spectral_similarity.xml @ 1:3f96c93f8566 draft
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit b1cc1aebf796f170d93e3dd46ffcdefdc7b8018a
author | recetox |
---|---|
date | Thu, 12 Oct 2023 13:29:49 +0000 |
parents | 9ff95a1a2705 |
children | 54b6775010e0 |
line wrap: on
line diff
--- a/matchms_spectral_similarity.xml Tue Jun 27 14:28:07 2023 +0000 +++ b/matchms_spectral_similarity.xml Thu Oct 12 13:29:49 2023 +0000 @@ -1,4 +1,4 @@ -<tool id="matchms_spectral_similarity" name="matchms spectral similarity" version="@TOOL_VERSION@+galaxy0" profile="21.09"> +<tool id="matchms_spectral_similarity" name="matchms spectral similarity" version="@TOOL_VERSION@+galaxy2" profile="21.09"> <description>matchms spectral similarity calculation</description> <macros> @@ -12,14 +12,14 @@ <requirement type="package" version="@TOOL_VERSION@">matchms</requirement> </requirements> + <command detect_errors="exit_code"><![CDATA[ + python3 ${python_wrapper} + ]]> </command> + <environment_variables> <environment_variable name="MPLCONFIGDIR">\$_GALAXY_JOB_TMP_DIR</environment_variable> </environment_variables> - <command detect_errors="exit_code"><![CDATA[ - python3 ${python_wrapper} - ]]> </command> - <configfiles> <configfile name="python_wrapper"> @init_logger@ @@ -36,16 +36,24 @@ @init_scores@ +#if $scores.use_scores == "True" layer = similarity.sparse_array( references=scores.references, queries=scores.queries, idx_row = scores._scores.row, idx_col = scores._scores.col, is_symmetric=False) +scores._scores.add_sparse_data(scores._scores.row, scores._scores.col, layer, name) +#else +scores._scores = similarity.matrix( + references=scores.references, + queries=scores.queries, + array_type="sparse", + is_symmetric=False) +scores._scores.data.dtype.names = [name+"_scores", name+"_matches"] +#end if -scores._scores.add_sparse_data(scores._scores.row, scores._scores.col, layer, name) - -scores.filter_by_range(inplace=True, name=name+"_matches", low=0) +scores.filter_by_range(name=name+"_matches", low=0) scores.to_json("$similarity_scores") </configfile> </configfiles>