changeset 16:e6a02a387448 draft

planemo upload commit 4f23896d1a519a87f189c6238a95b8f5b5933e9a-dirty
author iracooke
date Sun, 17 May 2015 23:33:49 -0400
parents de34893b3834
children 29c43b953c1c
files README.rst datatypes_conf.xml proteomics.py
diffstat 3 files changed, 22 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/README.rst	Sun Mar 29 19:24:40 2015 -0400
+++ b/README.rst	Sun May 17 23:33:49 2015 -0400
@@ -35,7 +35,8 @@
 IdXML                 idxml                  False       OpenMS_
 TandemXML_            tandem                 False       XTandem output
 RAW                   raw                    False       Raw Mass Spec Data
-Msp                   msp                    False       Spectral Library
+Msp_                   msp                    True        Spectral Library
+SPLib                 splib 				 True        Spectral Library
 Ms2                   ms2                    False       MS/MS Spectra
 XHunterAslFormat      hlf                    False       Spectral Library
 ================      =====================  =======     ====================================
@@ -53,6 +54,8 @@
 .. _MzIdentML: http://www.psidev.info/mzidentml
 .. _TraML: http://www.psidev.info/traml
 .. _TandemXML: http://www.thegpm.org/docs/X_series_output_form.pdf
+.. _Msp: http://chemdata.nist.gov/mass-spc/ftp/mass-spc/PepLib.pdf
+.. _SPLib: http://tools.proteomecenter.org/wiki/index.php?title=Software:SpectraST#Developer.27s_Guide
 
 Visualization
 -------------
--- a/datatypes_conf.xml	Sun Mar 29 19:24:40 2015 -0400
+++ b/datatypes_conf.xml	Sun May 17 23:33:49 2015 -0400
@@ -46,6 +46,7 @@
     <datatype extension="msp" type="galaxy.datatypes.proteomics:Msp" display_in_upload="true" />
     <datatype extension="ms2" type="galaxy.datatypes.proteomics:Ms2" display_in_upload="true" />
     <datatype extension="hlf" type="galaxy.datatypes.proteomics:XHunterAslFormat" mimetype="application/octet-stream" display_in_upload="true" />
+    <datatype extension="splib" type="galaxy.datatypes.proteomics:SPLib" display_in_upload="true" />
   </registration>
   <sniffers>
     <sniffer type="galaxy.datatypes.proteomics:MzML"/>
@@ -57,5 +58,7 @@
     <sniffer type="galaxy.datatypes.proteomics:TraML"/>
     <sniffer type="galaxy.datatypes.proteomics:MzIdentML"/>
     <sniffer type="galaxy.datatypes.proteomics:MzQuantML"/>
+    <sniffer type="galaxy.datatypes.proteomics:Msp"/>
+    <sniffer type="galaxy.datatypes.proteomics:SPLib"/>
   </sniffers>
 </datatypes>
--- a/proteomics.py	Sun Mar 29 19:24:40 2015 -0400
+++ b/proteomics.py	Sun May 17 23:33:49 2015 -0400
@@ -285,6 +285,21 @@
         with open(filename, 'r') as contents:
             return Msp.next_line_starts_with(contents, "Name:") and Msp.next_line_starts_with(contents, "MW:")
 
+
+class SPLib( Msp ):
+    """SpectraST Spectral Library. Closely related to msp format"""
+    file_ext = "splib"
+
+    def set_peek( self, dataset, is_multi_byte=False ):
+        """Set the peek and blurb text"""
+        if not dataset.dataset.purged:
+            dataset.peek = data.get_file_peek( dataset.file_name, is_multi_byte=is_multi_byte )
+            dataset.blurb = 'splib Spectral Library Format'
+        else:
+            dataset.peek = 'file does not exist'
+            dataset.blurb = 'file purged from disk'
+
+
 class Ms2(Text):
     file_ext = "ms2"