diff --git a/config/datatypes_conf.xml.sample b/config/datatypes_conf.xml.sample index f4f353ee074..c726ff23fb3 100644 --- a/config/datatypes_conf.xml.sample +++ b/config/datatypes_conf.xml.sample @@ -245,6 +245,7 @@ + diff --git a/lib/galaxy/datatypes/proteomics.py b/lib/galaxy/datatypes/proteomics.py index 525ffb1daab..f235b054c22 100644 --- a/lib/galaxy/datatypes/proteomics.py +++ b/lib/galaxy/datatypes/proteomics.py @@ -464,3 +464,50 @@ class ImzML(Binary): rval.append('
  • %s%s
  • ' % (fn, fn, opt_text)) rval.append('') return "\n".join(rval) + + +class Analyze75(Binary): + """ + Mayo Analyze 7.5 files + http://www.imzml.org + """ + file_ext = 'analyze75' + allow_datatype_change = False + composite_type = 'auto_primary_file' + + def __init__(self, **kwd): + Binary.__init__(self, **kwd) + + """The header file. Provides information about dimensions, identification, and processing history.""" + self.add_composite_file( + 'hdr', + description='The Analyze75 header file.', + is_binary=False) + + """The image file. Image data, whose data type and ordering are described by the header file.""" + self.add_composite_file( + 'img', + description='The Analyze75 image file.', + is_binary=True) + + """The optional t2m file.""" + self.add_composite_file( + 't2m', + description='The Analyze75 t2m file.', + optional='True', is_binary=True) + + def generate_primary_file(self, dataset=None): + rval = ['Analyze75 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('
    ') + return "\n".join(rval) +