comparison matchms_metadata_export.xml @ 12:c01868645f1b draft

planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit da193865f41a3a840ecc4ba0afab1d358554998a
author recetox
date Mon, 05 Feb 2024 10:40:38 +0000
parents 73c902331bbc
children 48c7b584032a
comparison
equal deleted inserted replaced
11:cbadbec49b5d 12:c01868645f1b
1 <tool id="matchms_metadata_export" name="matchms metadata export" version="@TOOL_VERSION@+galaxy0" profile="21.09"> 1 <tool id="matchms_metadata_export" name="matchms metadata export" version="@TOOL_VERSION@+galaxy1" profile="21.09">
2 <description>extract all metadata from mass spectra file to tabular format</description> 2 <description>extract all metadata from mass spectra file to tabular format</description>
3 <macros> 3 <macros>
4 <import>macros.xml</import> 4 <import>macros.xml</import>
5 <import>help.xml</import> 5 <import>help.xml</import>
6 </macros> 6 </macros>
15 python ${matchms_python_cli} 15 python ${matchms_python_cli}
16 ]]></command> 16 ]]></command>
17 17
18 <configfiles> 18 <configfiles>
19 <configfile name="matchms_python_cli"> 19 <configfile name="matchms_python_cli">
20 import matchms
20 from matchms.importing import load_from_msp, load_from_mgf 21 from matchms.importing import load_from_msp, load_from_mgf
21 from matchms.exporting.metadata_export import export_metadata_as_csv 22 from matchms.exporting.metadata_export import export_metadata_as_csv
23
24
25 if "$harmonize_metadata" == "False":
26 matchms.Metadata.set_key_replacements({})
22 27
23 spectra_list = list(load_from_${input_file.ext}("${input_file}", $harmonize_metadata)) 28 spectra_list = list(load_from_${input_file.ext}("${input_file}", $harmonize_metadata))
24 29
25 export_metadata_as_csv(spectra_list, "${output_file}") 30 export_metadata_as_csv(spectra_list, "${output_file}")
26 </configfile> 31 </configfile>
37 </outputs> 42 </outputs>
38 43
39 <tests> 44 <tests>
40 <test> 45 <test>
41 <param name="input_file" value="convert/mgf_out.mgf" ftype="mgf"/> 46 <param name="input_file" value="convert/mgf_out.mgf" ftype="mgf"/>
47 <param name="harmonize_metadata" value="True"/>
42 <output name="output_file" file="convert/metadata.csv" ftype="csv" compare="sim_size" delta="0"/> 48 <output name="output_file" file="convert/metadata.csv" ftype="csv" compare="sim_size" delta="0"/>
43 </test> 49 </test>
44 <test> 50 <test>
45 <param name="input_file" value="similarity/RECETOX_Exposome_pesticides_HR_MS_20220323.msp" ftype="msp"/> 51 <param name="input_file" value="similarity/RECETOX_Exposome_pesticides_HR_MS_20220323.msp" ftype="msp"/>
52 <param name="harmonize_metadata" value="True"/>
46 <output name="output_file" file="convert/metadata.csv" ftype="csv" compare="sim_size" delta="0"/> 53 <output name="output_file" file="convert/metadata.csv" ftype="csv" compare="sim_size" delta="0"/>
47 </test> 54 </test>
48 </tests> 55 </tests>
49 56
50 <help> 57 <help>