diff spectrast_import.xml @ 0:4e23dcad9087 draft

planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/spectrast commit d390af4450c890f34bfb02a5c1feaaa10b015411-dirty
author jjohnson
date Mon, 14 May 2018 14:48:42 -0400
parents
children 7f02fc51bddf
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spectrast_import.xml	Mon May 14 14:48:42 2018 -0400
@@ -0,0 +1,44 @@
+<tool id="spectrast_import" name="SpectraST Import" version="@VERSION@.0">
+    <description>Spectral Library</description>
+    <macros>
+        <import>macros.xml</import>
+    </macros>
+    <expand macro="requirements" />
+    <command detect_errors="exit_code"><![CDATA[
+        ## Symlink dataset to name with recognized ext
+        #import re
+        #set $ext = '.' + str($input.extension)
+        #set $input_name = $re.sub('[.](ms2|msp|hlf)$','',$input.display_name.split('/')[-1]) + $ext
+        ln -s '$input' '$input_name' &&
+        mkdir -p '$output.files_path' &&
+        spectrast -cN'${output.files_path}/library' '$input_name' | tee '$output'
+    ]]></command>
+    <inputs>
+        <param name="input" type="data" format="ms2,msp,hlf" label="Spectral library ms2, msp, or hlf" 
+             help="BiblioSpec .ms2,  NIST .msp,  or X!Hunter .hlf"/>
+    </inputs>
+    <outputs>
+        <data name="output" format="splib"/>
+    </outputs>
+    <tests>
+        <test>
+            <param name="input" ftype="ms2" value="test.ms2"/>
+            <output name="output">
+                <assert_contents>
+                    <has_text_matching expression="Total number of spectra in library: 1" />
+                </assert_contents>
+            </output>
+        </test>
+    </tests>
+    <help><![CDATA[
+**What it does**
+
+Imports a spectral library from the following formats:
+
+    NIST (National Institute of Standards and Technology)'s .msp format 
+    X!Hunter's .hlf format 
+    BiblioSpec's .ms2 format 
+
+    ]]></help>
+    <expand macro="citations" />
+</tool>