Repository 'proteomics_datatypes'
hg clone https://toolshed.g2.bx.psu.edu/repos/iracooke/proteomics_datatypes

Changeset 16:e6a02a387448 (2015-05-17)
Previous changeset 15:de34893b3834 (2015-03-29) Next changeset 17:29c43b953c1c (2015-05-17)
Commit message:
planemo upload commit 4f23896d1a519a87f189c6238a95b8f5b5933e9a-dirty
modified:
README.rst
datatypes_conf.xml
proteomics.py
b
diff -r de34893b3834 -r e6a02a387448 README.rst
--- a/README.rst Sun Mar 29 19:24:40 2015 -0400
+++ b/README.rst Sun May 17 23:33:49 2015 -0400
b
@@ -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
 -------------
b
diff -r de34893b3834 -r e6a02a387448 datatypes_conf.xml
--- a/datatypes_conf.xml Sun Mar 29 19:24:40 2015 -0400
+++ b/datatypes_conf.xml Sun May 17 23:33:49 2015 -0400
b
@@ -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>
b
diff -r de34893b3834 -r e6a02a387448 proteomics.py
--- a/proteomics.py Sun Mar 29 19:24:40 2015 -0400
+++ b/proteomics.py Sun May 17 23:33:49 2015 -0400
b
@@ -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"