comparison 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
comparison
equal deleted inserted replaced
0:9ff95a1a2705 1:3f96c93f8566
1 <tool id="matchms_spectral_similarity" name="matchms spectral similarity" version="@TOOL_VERSION@+galaxy0" profile="21.09"> 1 <tool id="matchms_spectral_similarity" name="matchms spectral similarity" version="@TOOL_VERSION@+galaxy2" profile="21.09">
2 <description>matchms spectral similarity calculation</description> 2 <description>matchms spectral similarity calculation</description>
3 3
4 <macros> 4 <macros>
5 <import>macros.xml</import> 5 <import>macros.xml</import>
6 <import>help.xml</import> 6 <import>help.xml</import>
10 10
11 <requirements> 11 <requirements>
12 <requirement type="package" version="@TOOL_VERSION@">matchms</requirement> 12 <requirement type="package" version="@TOOL_VERSION@">matchms</requirement>
13 </requirements> 13 </requirements>
14 14
15 <command detect_errors="exit_code"><![CDATA[
16 python3 ${python_wrapper}
17 ]]> </command>
18
15 <environment_variables> 19 <environment_variables>
16 <environment_variable name="MPLCONFIGDIR">\$_GALAXY_JOB_TMP_DIR</environment_variable> 20 <environment_variable name="MPLCONFIGDIR">\$_GALAXY_JOB_TMP_DIR</environment_variable>
17 </environment_variables> 21 </environment_variables>
18
19 <command detect_errors="exit_code"><![CDATA[
20 python3 ${python_wrapper}
21 ]]> </command>
22 22
23 <configfiles> 23 <configfiles>
24 <configfile name="python_wrapper"> 24 <configfile name="python_wrapper">
25 @init_logger@ 25 @init_logger@
26 26
34 ) 34 )
35 name="${similarity_metric}_${algorithm.tolerance}_${algorithm.mz_power}_${algorithm.intensity_power}" 35 name="${similarity_metric}_${algorithm.tolerance}_${algorithm.mz_power}_${algorithm.intensity_power}"
36 36
37 @init_scores@ 37 @init_scores@
38 38
39 #if $scores.use_scores == "True"
39 layer = similarity.sparse_array( 40 layer = similarity.sparse_array(
40 references=scores.references, 41 references=scores.references,
41 queries=scores.queries, 42 queries=scores.queries,
42 idx_row = scores._scores.row, 43 idx_row = scores._scores.row,
43 idx_col = scores._scores.col, 44 idx_col = scores._scores.col,
44 is_symmetric=False) 45 is_symmetric=False)
46 scores._scores.add_sparse_data(scores._scores.row, scores._scores.col, layer, name)
47 #else
48 scores._scores = similarity.matrix(
49 references=scores.references,
50 queries=scores.queries,
51 array_type="sparse",
52 is_symmetric=False)
53 scores._scores.data.dtype.names = [name+"_scores", name+"_matches"]
54 #end if
45 55
46 scores._scores.add_sparse_data(scores._scores.row, scores._scores.col, layer, name) 56 scores.filter_by_range(name=name+"_matches", low=0)
47
48 scores.filter_by_range(inplace=True, name=name+"_matches", low=0)
49 scores.to_json("$similarity_scores") 57 scores.to_json("$similarity_scores")
50 </configfile> 58 </configfile>
51 </configfiles> 59 </configfiles>
52 <inputs> 60 <inputs>
53 <expand macro="input_param"/> 61 <expand macro="input_param"/>