changeset 0:4484e5822a6b draft default tip

planemo upload for repository https://github.com/RECETOX/galaxytools/tree/main/tools/mzspeclib commit 6707579ea4c2d22b625b85c30e5b9705ae142b20
author recetox
date Mon, 30 Jun 2025 08:12:11 +0000
parents
children
files macros.xml mzspeclib_describe.xml test-data/sample.msp test-data/sample.txt test-data/sample_describe_report.txt test-data/sample_validate_report_base.txt test-data/sample_validate_report_consensus.txt
diffstat 5 files changed, 294 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/macros.xml	Mon Jun 30 08:12:11 2025 +0000
@@ -0,0 +1,23 @@
+<macros>
+    <token name="@TOOL_VERSION@">1.0.7</token>
+
+    <xml name="creator">
+        <creator>
+            <person
+                givenName="Helge"
+                familyName="Hecht"
+                url="https://github.com/hechth"
+                identifier="0000-0001-6744-996X" />
+            <organization
+                url="https://www.recetox.muni.cz/"
+                email="GalaxyToolsDevelopmentandDeployment@space.muni.cz"
+                name="RECETOX MUNI" />
+        </creator>
+    </xml>
+
+    <xml name="citations">
+        <citations>
+            <citation type="doi">10.1021/acs.analchem.4c04091</citation>
+        </citations>
+    </xml>
+</macros>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mzspeclib_describe.xml	Mon Jun 30 08:12:11 2025 +0000
@@ -0,0 +1,73 @@
+<tool id="mzspeclib_describe" name="mzspeclib describe" version="@TOOL_VERSION@+galaxy0" profile="23.0">
+    <description>Summarize and describe mzspeclib files using mzspeclib.</description>
+    <macros>
+        <import>macros.xml</import>
+    </macros>
+    <xrefs>
+        <xref type="bio.tools">mzspeclib</xref>
+    </xrefs>
+    <requirements>
+        <requirement type="package" version="@TOOL_VERSION@">mzspeclib</requirement>
+    </requirements>
+
+    <command detect_errors="exit_code"><![CDATA[
+    mzspeclib describe -i mzspeclib.${input.ext} ${input} > ${output}
+    ]]></command>
+
+    <inputs>
+        <param name="input" type="data" format="txt,json" label="Input mzspeclib file" help="Input mzspeclib file (text or JSON) to be summarized."/>
+    </inputs>
+
+    <outputs>
+        <data name="output" format="txt"/>
+    </outputs>
+
+    <tests>
+        <test>
+            <param name="input" value="sample.txt" ftype="txt"/>
+            <output name="output" file="sample_describe_report.txt" compare="diff" lines_diff="2">
+                <!-- <assert_contents>
+                    <has_line line="Format: text"/>
+                    <has_line line="Spectrum Count: 6"/>
+                    <has_line line="MS:1003186|library format version=1.0"/>
+                </assert_contents> -->
+            </output>
+        </test>
+    </tests>
+
+    <help><![CDATA[
+.. _mzspeclib_describe:
+
+==========================
+mzspeclib Describe Tool
+==========================
+
+**Tool Description**
+
+This tool summarizes and describes mzspeclib files using the mzspeclib library. It provides an overview of the content, such as the number of spectra, library type, and other metadata.
+
+Inputs
+------
+
+- **Input mzspeclib file**  
+  The mzspeclib file to be summarized. Supported formats: text (txt), JSON.
+
+Outputs
+-------
+
+- **mzspeclib description**  
+  A text file containing a summary and description of the mzspeclib file.
+
+Example
+-------
+
+Suppose you have a file `sample.txt` in mzspeclib text format. Upload this file as input and run the tool. The output will be a summary report describing the contents of the file.
+
+Notes
+-----
+
+- Ensure your input file is in mzspeclib text or JSON format.
+- Use this tool to quickly inspect the contents and structure of your mzspeclib files.
+    ]]></help>
+    <expand macro="citations"/>
+</tool>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/sample.msp	Mon Jun 30 08:12:11 2025 +0000
@@ -0,0 +1,75 @@
+NAME: Hydrogen
+FORMULA: H2
+MW: 2
+CASNO: 1333740
+ID: 1
+COMMENT: NIST MS# 245692, Seq# M1
+NUM PEAKS: 2
+1.0	20.98
+2.0	999.0
+
+NAME: Deuterium
+FORMULA: D2
+MW: 4
+CASNO: 7782390
+ID: 2
+COMMENT: NIST MS# 61316, Seq# M2
+NUM PEAKS: 2
+2.0	14.99
+4.0	999.0
+
+NAME: Methane
+FORMULA: CH4
+MW: 16
+CASNO: 74828
+ID: 3
+COMMENT: Any=100 ; NIST MS# 61313, Seq# M64
+NUM PEAKS: 6
+12.0	37.97
+13.0	105.9
+14.0	203.82
+15.0	886.2
+16.0	999.0
+17.0	15.99
+
+NAME: Methane
+FORMULA: CH4
+MW: 16
+CASNO: 74828
+ID: 4
+COMMENT: Any=100 ; NIST MS# 18807, Seq# R26
+NUM PEAKS: 6
+12.0	25.98
+13.0	85.92
+14.0	170.85
+15.0	855.23
+16.0	999.0
+17.0	10.99
+
+NAME: Methane
+FORMULA: CH4
+MW: 16
+CASNO: 74828
+ID: 5
+COMMENT: Any=100 ; NIST MS# 18809, Seq# R27
+NUM PEAKS: 6
+12.0	7.99
+13.0	28.97
+14.0	74.93
+15.0	753.32
+16.0	999.0
+17.0	11.99
+
+NAME: Methane
+FORMULA: CH4
+MW: 16
+CASNO: 74828
+ID: 6
+COMMENT: Any=100 ; NIST MS# 423924, Seq# R28
+NUM PEAKS: 6
+12.0	25.98
+13.0	74.93
+14.0	152.86
+15.0	829.25
+16.0	999.0
+17.0	10.99
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/sample.txt	Mon Jun 30 08:12:11 2025 +0000
@@ -0,0 +1,118 @@
+<mzSpecLib>
+MS:1003186|library format version=1.0
+MS:1003188|library name=dataset_37ac08b5-2367-4c10-9dc7-7750885ff733.dat
+<AttributeSet Spectrum=all>
+<AttributeSet Analyte=all>
+<AttributeSet Interpretation=all>
+<Spectrum=1>
+MS:1003061|library spectrum name=Hydrogen
+MS:1003059|number of peaks=2
+[1]MS:1003275|other attribute name=CASNO
+[1]MS:1003276|other attribute value=1333740
+[2]MS:1003275|other attribute name=ID
+[2]MS:1003276|other attribute value=1
+[3]MS:1003275|other attribute name=COMMENT
+[3]MS:1003276|other attribute value=NIST MS# 245692, Seq# M1
+<Analyte=1>
+MS:1000866|molecular formula=H2
+MS:1003243|adduct ion mass=2
+<Peaks>
+1.0	20.98	?
+2.0	999.0	?
+
+<Spectrum=2>
+MS:1003061|library spectrum name=Deuterium
+MS:1003059|number of peaks=2
+[1]MS:1003275|other attribute name=CASNO
+[1]MS:1003276|other attribute value=7782390
+[2]MS:1003275|other attribute name=ID
+[2]MS:1003276|other attribute value=2
+[3]MS:1003275|other attribute name=COMMENT
+[3]MS:1003276|other attribute value=NIST MS# 61316, Seq# M2
+<Analyte=1>
+MS:1000866|molecular formula=D2
+MS:1003243|adduct ion mass=4
+<Peaks>
+2.0	14.99	?
+4.0	999.0	?
+
+<Spectrum=3>
+MS:1003061|library spectrum name=Methane
+MS:1003059|number of peaks=6
+[1]MS:1003275|other attribute name=CASNO
+[1]MS:1003276|other attribute value=74828
+[2]MS:1003275|other attribute name=ID
+[2]MS:1003276|other attribute value=3
+[3]MS:1003275|other attribute name=COMMENT
+[3]MS:1003276|other attribute value=Any=100 ; NIST MS# 61313, Seq# M64
+<Analyte=1>
+MS:1000866|molecular formula=CH4
+MS:1003243|adduct ion mass=16
+<Peaks>
+12.0	37.97	?
+13.0	105.9	?
+14.0	203.82	?
+15.0	886.2	?
+16.0	999.0	?
+17.0	15.99	?
+
+<Spectrum=4>
+MS:1003061|library spectrum name=Methane
+MS:1003059|number of peaks=6
+[1]MS:1003275|other attribute name=CASNO
+[1]MS:1003276|other attribute value=74828
+[2]MS:1003275|other attribute name=ID
+[2]MS:1003276|other attribute value=4
+[3]MS:1003275|other attribute name=COMMENT
+[3]MS:1003276|other attribute value=Any=100 ; NIST MS# 18807, Seq# R26
+<Analyte=1>
+MS:1000866|molecular formula=CH4
+MS:1003243|adduct ion mass=16
+<Peaks>
+12.0	25.98	?
+13.0	85.92	?
+14.0	170.85	?
+15.0	855.23	?
+16.0	999.0	?
+17.0	10.99	?
+
+<Spectrum=5>
+MS:1003061|library spectrum name=Methane
+MS:1003059|number of peaks=6
+[1]MS:1003275|other attribute name=CASNO
+[1]MS:1003276|other attribute value=74828
+[2]MS:1003275|other attribute name=ID
+[2]MS:1003276|other attribute value=5
+[3]MS:1003275|other attribute name=COMMENT
+[3]MS:1003276|other attribute value=Any=100 ; NIST MS# 18809, Seq# R27
+<Analyte=1>
+MS:1000866|molecular formula=CH4
+MS:1003243|adduct ion mass=16
+<Peaks>
+12.0	7.99	?
+13.0	28.97	?
+14.0	74.93	?
+15.0	753.32	?
+16.0	999.0	?
+17.0	11.99	?
+
+<Spectrum=6>
+MS:1003061|library spectrum name=Methane
+MS:1003059|number of peaks=6
+[1]MS:1003275|other attribute name=CASNO
+[1]MS:1003276|other attribute value=74828
+[2]MS:1003275|other attribute name=ID
+[2]MS:1003276|other attribute value=6
+[3]MS:1003275|other attribute name=COMMENT
+[3]MS:1003276|other attribute value=Any=100 ; NIST MS# 423924, Seq# R28
+<Analyte=1>
+MS:1000866|molecular formula=CH4
+MS:1003243|adduct ion mass=16
+<Peaks>
+12.0	25.98	?
+13.0	74.93	?
+14.0	152.86	?
+15.0	829.25	?
+16.0	999.0	?
+17.0	10.99	?
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/sample_describe_report.txt	Mon Jun 30 08:12:11 2025 +0000
@@ -0,0 +1,5 @@
+Describing "/tmp/tmpl5cf8gh4/files/c/6/5/dataset_c6563ebf-2d17-451d-a1ba-b3f19426818f.dat"
+Format: text
+Spectrum Count: 6
+MS:1003186|library format version=1.0
+MS:1003188|library name=dataset_37ac08b5-2367-4c10-9dc7-7750885ff733.dat