# HG changeset patch
# User iracooke
# Date 1402006115 14400
# Node ID 6ca516faacfc16acb3983e3707d41cfdcf78496f
# Parent  58469754fd826386453652c171d20502dd600c2e
Uploaded
diff -r 58469754fd82 -r 6ca516faacfc README
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/README	Thu Jun 05 18:08:35 2014 -0400
@@ -0,0 +1,11 @@
+# What is it?
+
+Galaxy datatype and display-application definitions for Proteomics data
+
+# Installation
+
+Install into your local galaxy instance from the main galaxy toolshed at http://toolshed.g2.bx.psu.edu/
+
+˝To visualize data you will need to install the protviz visualization web application.  This is available at
+[https://bitbucket.org/Andrew_Brock/proteomics-visualise](https://bitbucket.org/Andrew_Brock/proteomics-visualise)
+
diff -r 58469754fd82 -r 6ca516faacfc datatypes_conf.xml
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/datatypes_conf.xml	Thu Jun 05 18:08:35 2014 -0400
@@ -0,0 +1,55 @@
+
+
+  
+    
+  
+  
+    
+    
+      
+    
+    
+      
+    
+    
+      
+    
+    
+      
+    
+    
+      
+    
+    
+    
+    
+    
+      
+      
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+  
+  
+    
+    
+    
+    
+    
+    
+    
+    
+  
+
diff -r 58469754fd82 -r 6ca516faacfc display_applications/proteomics/PepXml.xml
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/display_applications/proteomics/PepXml.xml	Thu Jun 05 18:08:35 2014 -0400
@@ -0,0 +1,18 @@
+
+    
+        
+        
+        
+        
+        ${site_url}/init_local?file=${encoded_filename.qp}&type=pepxml
+        
+        
+        
+            #import binascii
+            ${binascii.hexlify( $pepxml_file.file_name )}
+        
+        
+                ${BASE_URL.split(":")[1][2:]}
+        
+    
+
diff -r 58469754fd82 -r 6ca516faacfc display_applications/proteomics/ProtXml.xml
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/display_applications/proteomics/ProtXml.xml	Thu Jun 05 18:08:35 2014 -0400
@@ -0,0 +1,18 @@
+
+	
+        
+        
+        
+        
+        ${site_url}/init_local?file=${encoded_filename.qp}&type=protxml
+        
+        
+        
+            #import binascii
+            ${binascii.hexlify( $protxml_file.file_name )}
+        
+        
+                ${BASE_URL.split(":")[1][2:]}
+        
+    
+
diff -r 58469754fd82 -r 6ca516faacfc display_applications/proteomics/mzML.xml
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/display_applications/proteomics/mzML.xml	Thu Jun 05 18:08:35 2014 -0400
@@ -0,0 +1,18 @@
+
+	
+        
+        
+        
+        
+        ${site_url}/init_local?file=${encoded_filename.qp}&type=mzml
+        
+        
+        
+            #import binascii
+            ${binascii.hexlify( $mzml_file.file_name )}
+        
+        
+                ${BASE_URL.split(":")[1][2:]}
+        
+    
+
diff -r 58469754fd82 -r 6ca516faacfc proteomics.py
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/proteomics.py	Thu Jun 05 18:08:35 2014 -0400
@@ -0,0 +1,325 @@
+"""
+Proteomics format classes
+"""
+import logging
+import re
+import binascii
+
+from galaxy.datatypes.sniff import *
+from galaxy.datatypes import data
+from galaxy.datatypes.data import Text
+from galaxy.datatypes.xml import GenericXml
+from galaxy.datatypes.binary import Binary
+from galaxy.datatypes.tabular import Tabular
+from galaxy.datatypes.interval import Gff
+
+log = logging.getLogger(__name__)
+
+
+class Wiff( Binary ):
+    """Class for wiff files."""
+    file_ext = 'wiff'
+    allow_datatype_change = False
+    composite_type = 'auto_primary_file'
+
+    def __init__(self, **kwd):
+        Binary.__init__(self, **kwd)
+        self.add_composite_file( 'wiff', 
+            description = 'AB SCIEX files in .wiff format. This can contain all needed information or only metadata.', 
+            is_binary = True )
+        self.add_composite_file( 'wiff_scan', 
+            description = 'AB SCIEX spectra file (wiff.scan), if the corresponding .wiff file only contains metadata.', 
+            optional = 'True', is_binary = True )
+
+    def generate_primary_file( self, dataset = None ):
+        rval = ['
Wiff Composite Dataset ']
+        rval.append('This composite dataset is composed of the following files:
')
+        for composite_name, composite_file in self.get_composite_files( dataset = dataset ).iteritems():
+            fn = composite_name
+            opt_text = ''
+            if composite_file.optional:
+                opt_text = ' (optional)'
+            if composite_file.get('description'):
+                rval.append( '- %s (%s)%s' % ( fn, fn, composite_file.get('description'), opt_text ) )
+            else:
+                rval.append( '
- %s%s' % ( fn, fn, opt_text ) )
+        rval.append( '