Mercurial > repos > recetox > matchms_metadata_export
annotate 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 |
rev | line source |
---|---|
12
c01868645f1b
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit da193865f41a3a840ecc4ba0afab1d358554998a
recetox
parents:
4
diff
changeset
|
1 <tool id="matchms_metadata_export" name="matchms metadata export" version="@TOOL_VERSION@+galaxy1" profile="21.09"> |
0
dfdbccfa8753
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit c10d901c526d0895869d18a1d1bdd1ea58ed7473
recetox
parents:
diff
changeset
|
2 <description>extract all metadata from mass spectra file to tabular format</description> |
dfdbccfa8753
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit c10d901c526d0895869d18a1d1bdd1ea58ed7473
recetox
parents:
diff
changeset
|
3 <macros> |
dfdbccfa8753
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit c10d901c526d0895869d18a1d1bdd1ea58ed7473
recetox
parents:
diff
changeset
|
4 <import>macros.xml</import> |
2
f04610d25411
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit f79a5b51599254817727bc9028b9797ea994cb4e
recetox
parents:
0
diff
changeset
|
5 <import>help.xml</import> |
0
dfdbccfa8753
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit c10d901c526d0895869d18a1d1bdd1ea58ed7473
recetox
parents:
diff
changeset
|
6 </macros> |
dfdbccfa8753
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit c10d901c526d0895869d18a1d1bdd1ea58ed7473
recetox
parents:
diff
changeset
|
7 <expand macro="creator"/> |
2
f04610d25411
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit f79a5b51599254817727bc9028b9797ea994cb4e
recetox
parents:
0
diff
changeset
|
8 <expand macro="bio.tools"/> |
f04610d25411
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit f79a5b51599254817727bc9028b9797ea994cb4e
recetox
parents:
0
diff
changeset
|
9 |
0
dfdbccfa8753
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit c10d901c526d0895869d18a1d1bdd1ea58ed7473
recetox
parents:
diff
changeset
|
10 <requirements> |
2
f04610d25411
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit f79a5b51599254817727bc9028b9797ea994cb4e
recetox
parents:
0
diff
changeset
|
11 <requirement type="package" version="@TOOL_VERSION@">matchms</requirement> |
0
dfdbccfa8753
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit c10d901c526d0895869d18a1d1bdd1ea58ed7473
recetox
parents:
diff
changeset
|
12 </requirements> |
dfdbccfa8753
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit c10d901c526d0895869d18a1d1bdd1ea58ed7473
recetox
parents:
diff
changeset
|
13 |
dfdbccfa8753
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit c10d901c526d0895869d18a1d1bdd1ea58ed7473
recetox
parents:
diff
changeset
|
14 <command detect_errors='aggressive'><![CDATA[ |
dfdbccfa8753
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit c10d901c526d0895869d18a1d1bdd1ea58ed7473
recetox
parents:
diff
changeset
|
15 python ${matchms_python_cli} |
dfdbccfa8753
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit c10d901c526d0895869d18a1d1bdd1ea58ed7473
recetox
parents:
diff
changeset
|
16 ]]></command> |
dfdbccfa8753
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit c10d901c526d0895869d18a1d1bdd1ea58ed7473
recetox
parents:
diff
changeset
|
17 |
dfdbccfa8753
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit c10d901c526d0895869d18a1d1bdd1ea58ed7473
recetox
parents:
diff
changeset
|
18 <configfiles> |
dfdbccfa8753
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit c10d901c526d0895869d18a1d1bdd1ea58ed7473
recetox
parents:
diff
changeset
|
19 <configfile name="matchms_python_cli"> |
12
c01868645f1b
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit da193865f41a3a840ecc4ba0afab1d358554998a
recetox
parents:
4
diff
changeset
|
20 import matchms |
0
dfdbccfa8753
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit c10d901c526d0895869d18a1d1bdd1ea58ed7473
recetox
parents:
diff
changeset
|
21 from matchms.importing import load_from_msp, load_from_mgf |
dfdbccfa8753
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit c10d901c526d0895869d18a1d1bdd1ea58ed7473
recetox
parents:
diff
changeset
|
22 from matchms.exporting.metadata_export import export_metadata_as_csv |
dfdbccfa8753
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit c10d901c526d0895869d18a1d1bdd1ea58ed7473
recetox
parents:
diff
changeset
|
23 |
12
c01868645f1b
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit da193865f41a3a840ecc4ba0afab1d358554998a
recetox
parents:
4
diff
changeset
|
24 |
c01868645f1b
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit da193865f41a3a840ecc4ba0afab1d358554998a
recetox
parents:
4
diff
changeset
|
25 if "$harmonize_metadata" == "False": |
c01868645f1b
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit da193865f41a3a840ecc4ba0afab1d358554998a
recetox
parents:
4
diff
changeset
|
26 matchms.Metadata.set_key_replacements({}) |
c01868645f1b
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit da193865f41a3a840ecc4ba0afab1d358554998a
recetox
parents:
4
diff
changeset
|
27 |
0
dfdbccfa8753
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit c10d901c526d0895869d18a1d1bdd1ea58ed7473
recetox
parents:
diff
changeset
|
28 spectra_list = list(load_from_${input_file.ext}("${input_file}", $harmonize_metadata)) |
dfdbccfa8753
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit c10d901c526d0895869d18a1d1bdd1ea58ed7473
recetox
parents:
diff
changeset
|
29 |
dfdbccfa8753
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit c10d901c526d0895869d18a1d1bdd1ea58ed7473
recetox
parents:
diff
changeset
|
30 export_metadata_as_csv(spectra_list, "${output_file}") |
dfdbccfa8753
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit c10d901c526d0895869d18a1d1bdd1ea58ed7473
recetox
parents:
diff
changeset
|
31 </configfile> |
dfdbccfa8753
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit c10d901c526d0895869d18a1d1bdd1ea58ed7473
recetox
parents:
diff
changeset
|
32 </configfiles> |
dfdbccfa8753
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit c10d901c526d0895869d18a1d1bdd1ea58ed7473
recetox
parents:
diff
changeset
|
33 |
dfdbccfa8753
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit c10d901c526d0895869d18a1d1bdd1ea58ed7473
recetox
parents:
diff
changeset
|
34 <inputs> |
dfdbccfa8753
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit c10d901c526d0895869d18a1d1bdd1ea58ed7473
recetox
parents:
diff
changeset
|
35 <param label="Spectra file" name="input_file" type="data" format="msp,mgf" help="Mass spectral library file."/> |
dfdbccfa8753
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit c10d901c526d0895869d18a1d1bdd1ea58ed7473
recetox
parents:
diff
changeset
|
36 <param label="Harmonize metadata" name="harmonize_metadata" type="boolean" truevalue="True" falsevalue="False" |
dfdbccfa8753
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit c10d901c526d0895869d18a1d1bdd1ea58ed7473
recetox
parents:
diff
changeset
|
37 checked="false" help="Apply harmonization process on the metadata keys (e.g. parse numeric values, derive precursor mass)."/> |
dfdbccfa8753
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit c10d901c526d0895869d18a1d1bdd1ea58ed7473
recetox
parents:
diff
changeset
|
38 </inputs> |
dfdbccfa8753
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit c10d901c526d0895869d18a1d1bdd1ea58ed7473
recetox
parents:
diff
changeset
|
39 |
dfdbccfa8753
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit c10d901c526d0895869d18a1d1bdd1ea58ed7473
recetox
parents:
diff
changeset
|
40 <outputs> |
dfdbccfa8753
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit c10d901c526d0895869d18a1d1bdd1ea58ed7473
recetox
parents:
diff
changeset
|
41 <data label="matchms extract metadata on ${on_string}" name="output_file" format="csv"/> |
dfdbccfa8753
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit c10d901c526d0895869d18a1d1bdd1ea58ed7473
recetox
parents:
diff
changeset
|
42 </outputs> |
dfdbccfa8753
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit c10d901c526d0895869d18a1d1bdd1ea58ed7473
recetox
parents:
diff
changeset
|
43 |
dfdbccfa8753
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit c10d901c526d0895869d18a1d1bdd1ea58ed7473
recetox
parents:
diff
changeset
|
44 <tests> |
dfdbccfa8753
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit c10d901c526d0895869d18a1d1bdd1ea58ed7473
recetox
parents:
diff
changeset
|
45 <test> |
dfdbccfa8753
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit c10d901c526d0895869d18a1d1bdd1ea58ed7473
recetox
parents:
diff
changeset
|
46 <param name="input_file" value="convert/mgf_out.mgf" ftype="mgf"/> |
12
c01868645f1b
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit da193865f41a3a840ecc4ba0afab1d358554998a
recetox
parents:
4
diff
changeset
|
47 <param name="harmonize_metadata" value="True"/> |
0
dfdbccfa8753
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit c10d901c526d0895869d18a1d1bdd1ea58ed7473
recetox
parents:
diff
changeset
|
48 <output name="output_file" file="convert/metadata.csv" ftype="csv" compare="sim_size" delta="0"/> |
dfdbccfa8753
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit c10d901c526d0895869d18a1d1bdd1ea58ed7473
recetox
parents:
diff
changeset
|
49 </test> |
dfdbccfa8753
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit c10d901c526d0895869d18a1d1bdd1ea58ed7473
recetox
parents:
diff
changeset
|
50 <test> |
dfdbccfa8753
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit c10d901c526d0895869d18a1d1bdd1ea58ed7473
recetox
parents:
diff
changeset
|
51 <param name="input_file" value="similarity/RECETOX_Exposome_pesticides_HR_MS_20220323.msp" ftype="msp"/> |
12
c01868645f1b
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit da193865f41a3a840ecc4ba0afab1d358554998a
recetox
parents:
4
diff
changeset
|
52 <param name="harmonize_metadata" value="True"/> |
0
dfdbccfa8753
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit c10d901c526d0895869d18a1d1bdd1ea58ed7473
recetox
parents:
diff
changeset
|
53 <output name="output_file" file="convert/metadata.csv" ftype="csv" compare="sim_size" delta="0"/> |
dfdbccfa8753
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit c10d901c526d0895869d18a1d1bdd1ea58ed7473
recetox
parents:
diff
changeset
|
54 </test> |
dfdbccfa8753
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit c10d901c526d0895869d18a1d1bdd1ea58ed7473
recetox
parents:
diff
changeset
|
55 </tests> |
dfdbccfa8753
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit c10d901c526d0895869d18a1d1bdd1ea58ed7473
recetox
parents:
diff
changeset
|
56 |
2
f04610d25411
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit f79a5b51599254817727bc9028b9797ea994cb4e
recetox
parents:
0
diff
changeset
|
57 <help> |
f04610d25411
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit f79a5b51599254817727bc9028b9797ea994cb4e
recetox
parents:
0
diff
changeset
|
58 Documentation |
f04610d25411
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit f79a5b51599254817727bc9028b9797ea994cb4e
recetox
parents:
0
diff
changeset
|
59 Mass spectral libraries are often stored in various formats, such as `msp`, `mgf` or `json`. |
f04610d25411
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit f79a5b51599254817727bc9028b9797ea994cb4e
recetox
parents:
0
diff
changeset
|
60 This tool can be used to export the metadata accompanying the actual spectral to a tabular file, |
f04610d25411
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit f79a5b51599254817727bc9028b9797ea994cb4e
recetox
parents:
0
diff
changeset
|
61 creating a column for each attribute and a row for each spectrum. |
f04610d25411
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit f79a5b51599254817727bc9028b9797ea994cb4e
recetox
parents:
0
diff
changeset
|
62 All keys which are present in at least one spectrum are contained in the output. |
f04610d25411
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit f79a5b51599254817727bc9028b9797ea994cb4e
recetox
parents:
0
diff
changeset
|
63 |
f04610d25411
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit f79a5b51599254817727bc9028b9797ea994cb4e
recetox
parents:
0
diff
changeset
|
64 @HELP_matchms@ |
f04610d25411
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit f79a5b51599254817727bc9028b9797ea994cb4e
recetox
parents:
0
diff
changeset
|
65 </help> |
0
dfdbccfa8753
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit c10d901c526d0895869d18a1d1bdd1ea58ed7473
recetox
parents:
diff
changeset
|
66 |
dfdbccfa8753
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit c10d901c526d0895869d18a1d1bdd1ea58ed7473
recetox
parents:
diff
changeset
|
67 <expand macro="citations"/> |
dfdbccfa8753
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/matchms commit c10d901c526d0895869d18a1d1bdd1ea58ed7473
recetox
parents:
diff
changeset
|
68 </tool> |