Mercurial > repos > recetox > matchms_metadata_export
comparison matchms_metadata_export.xml @ 0:dfdbccfa8753 draft
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit c10d901c526d0895869d18a1d1bdd1ea58ed7473
| author | recetox |
|---|---|
| date | Thu, 18 May 2023 14:07:28 +0000 |
| parents | |
| children | f04610d25411 |
comparison
equal
deleted
inserted
replaced
| -1:000000000000 | 0:dfdbccfa8753 |
|---|---|
| 1 <tool id="matchms_metadata_export" name="matchms metadata export " version="0.19.0+galaxy0" profile="21.05"> | |
| 2 <description>extract all metadata from mass spectra file to tabular format</description> | |
| 3 <macros> | |
| 4 <import>macros.xml</import> | |
| 5 </macros> | |
| 6 <expand macro="creator"/> | |
| 7 <requirements> | |
| 8 <requirement type="package" version="0.19.0">matchms</requirement> | |
| 9 </requirements> | |
| 10 | |
| 11 <command detect_errors='aggressive'><![CDATA[ | |
| 12 python ${matchms_python_cli} | |
| 13 ]]></command> | |
| 14 | |
| 15 <configfiles> | |
| 16 <configfile name="matchms_python_cli"> | |
| 17 import pandas | |
| 18 from matchms.importing import load_from_msp, load_from_mgf | |
| 19 from matchms.exporting.metadata_export import export_metadata_as_csv | |
| 20 | |
| 21 spectra_list = list(load_from_${input_file.ext}("${input_file}", $harmonize_metadata)) | |
| 22 | |
| 23 export_metadata_as_csv(spectra_list, "${output_file}") | |
| 24 </configfile> | |
| 25 </configfiles> | |
| 26 | |
| 27 <inputs> | |
| 28 <param label="Spectra file" name="input_file" type="data" format="msp,mgf" help="Mass spectral library file."/> | |
| 29 <param label="Harmonize metadata" name="harmonize_metadata" type="boolean" truevalue="True" falsevalue="False" | |
| 30 checked="false" help="Apply harmonization process on the metadata keys (e.g. parse numeric values, derive precursor mass)."/> | |
| 31 </inputs> | |
| 32 | |
| 33 <outputs> | |
| 34 <data label="matchms extract metadata on ${on_string}" name="output_file" format="csv"/> | |
| 35 </outputs> | |
| 36 | |
| 37 <tests> | |
| 38 <test> | |
| 39 <param name="input_file" value="convert/mgf_out.mgf" ftype="mgf"/> | |
| 40 <output name="output_file" file="convert/metadata.csv" ftype="csv" compare="sim_size" delta="0"/> | |
| 41 </test> | |
| 42 <test> | |
| 43 <param name="input_file" value="similarity/RECETOX_Exposome_pesticides_HR_MS_20220323.msp" ftype="msp"/> | |
| 44 <output name="output_file" file="convert/metadata.csv" ftype="csv" compare="sim_size" delta="0"/> | |
| 45 </test> | |
| 46 </tests> | |
| 47 | |
| 48 <help><![CDATA[ | |
| 49 Documentation | |
| 50 Mass spectral libraries are often stored in various formats, such as `msp`, `mgf` or `json`. | |
| 51 This tool can be used to export the metadata accompanying the actual spectral information to a tabular file. | |
| 52 | |
| 53 During harmonization of metadata, some of the keywords might change during the conversion process to a unified form. | |
| 54 | |
| 55 For more documentation on the matchms library see https://github.com/matchms/matchms/blob/master/README.rst and https://matchms.readthedocs.io/en/latest/. | |
| 56 ]]></help> | |
| 57 | |
| 58 <expand macro="citations"/> | |
| 59 </tool> |
