changeset 19:e5551a35e508 draft

planemo upload for repository https://github.com/iracooke/proteomics-datatypes commit a71820c91d9d7629415a27526bbf700800d12f3f
author iracooke
date Wed, 03 Jun 2015 18:24:50 -0400
parents d1ea609e57d4
children 300fc3aa6954
files datatypes_conf.xml proteomics.py
diffstat 2 files changed, 28 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/datatypes_conf.xml	Wed May 20 01:39:39 2015 -0400
+++ b/datatypes_conf.xml	Wed Jun 03 18:24:50 2015 -0400
@@ -46,7 +46,12 @@
     <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:SPLibNoIndex" display_in_upload="true" />
     <datatype extension="splib" type="galaxy.datatypes.proteomics:SPLib" display_in_upload="true" />
+    <datatype extension="sf3" type="galaxy.datatypes.proteomics:Sf3" display_in_upload="true" />
+    <datatype extension="searchgui_zip" type="galaxy.datatypes.binary:Binary" mimetype="application/octet-stream" subclass="True" />
+    <datatype extension="peptideshaker_zip" type="galaxy.datatypes.binary:Binary" mimetype="application/octet-stream" subclass="True" />
+
   </registration>
   <sniffers>
     <sniffer type="galaxy.datatypes.proteomics:MzML"/>
--- a/proteomics.py	Wed May 20 01:39:39 2015 -0400
+++ b/proteomics.py	Wed Jun 03 18:24:50 2015 -0400
@@ -285,6 +285,19 @@
         with open(filename, 'r') as contents:
             return Msp.next_line_starts_with(contents, "Name:") and Msp.next_line_starts_with(contents, "MW:")
 
+class SPLibNoIndex( Text ):
+    """SPlib without index file """
+    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 = 'Spectral Library without index files'
+        else:
+            dataset.peek = 'file does not exist'
+            dataset.blurb = 'file purged from disk'
+
 
 class SPLib( Msp ):
     """SpectraST Spectral Library. Closely related to msp format"""
@@ -378,3 +391,13 @@
 
 if hasattr(Binary, 'register_unsniffable_binary_ext'):
     Binary.register_unsniffable_binary_ext('hlf')
+
+
+class Sf3(Binary):
+    """Class describing a Scaffold SF3 files"""
+    file_ext = "sf3"
+
+if hasattr(Binary, 'register_unsniffable_binary_ext'):
+    Binary.register_unsniffable_binary_ext('sf3')
+
+