From 97c16db8245570196b556854570b0c120abcb8b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gr=C3=BCning?= Date: Wed, 2 Aug 2017 21:37:21 +0200 Subject: [PATCH 1/4] Add ImzML composite defintion --- lib/galaxy/datatypes/proteomics.py | 38 ++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/lib/galaxy/datatypes/proteomics.py b/lib/galaxy/datatypes/proteomics.py index de6229b81f9..d0f7192a5ab 100644 --- a/lib/galaxy/datatypes/proteomics.py +++ b/lib/galaxy/datatypes/proteomics.py @@ -425,3 +425,41 @@ class XHunterAslFormat(Binary): class Sf3(Binary): """Class describing a Scaffold SF3 files""" file_ext = "sf3" + + +class ImzML(Binary): + """ + Class for imzML files. + http://www.imzml.org + """ + file_ext = 'imzml' + allow_datatype_change = False + composite_type = 'auto_primary_file' + + def __init__(self, **kwd): + Binary.__init__(self, **kwd) + + """The metadata""" + self.add_composite_file( + 'imzml', + description='The imzML metadata component.', + is_binary=False) + + """The mass spectral data""" + self.add_composite_file( + 'ibd', + description='The mass spectral data component.', + is_binary=True) + + def generate_primary_file(self, dataset=None): + rval = ['imzML Composite Dataset

'] + rval.append('

This composite dataset is composed of the following files:

') + return "\n".join(rval) From e2f69a9c5bc7d11274190e223493d6d12d33afb3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gr=C3=BCning?= Date: Wed, 2 Aug 2017 21:40:39 +0200 Subject: [PATCH 2/4] add imzml to the datatypes conf file --- config/datatypes_conf.xml.sample | 1 + 1 file changed, 1 insertion(+) diff --git a/config/datatypes_conf.xml.sample b/config/datatypes_conf.xml.sample index 056f6a3d383..84c3ec9a89d 100644 --- a/config/datatypes_conf.xml.sample +++ b/config/datatypes_conf.xml.sample @@ -240,6 +240,7 @@ + From 1d609ca2caa158422adcdee0bbc65e73ce0527d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gr=C3=BCning?= Date: Wed, 2 Aug 2017 21:46:18 +0200 Subject: [PATCH 3/4] add edam format --- lib/galaxy/datatypes/proteomics.py | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/galaxy/datatypes/proteomics.py b/lib/galaxy/datatypes/proteomics.py index d0f7192a5ab..5662cf98ee5 100644 --- a/lib/galaxy/datatypes/proteomics.py +++ b/lib/galaxy/datatypes/proteomics.py @@ -432,6 +432,7 @@ class ImzML(Binary): Class for imzML files. http://www.imzml.org """ + edam_format = "format_3682" file_ext = 'imzml' allow_datatype_change = False composite_type = 'auto_primary_file' From e768e77392471a60425984ae518fb4f34a0552ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gr=C3=BCning?= Date: Wed, 2 Aug 2017 22:45:40 +0200 Subject: [PATCH 4/4] fix pep8 --- lib/galaxy/datatypes/proteomics.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/galaxy/datatypes/proteomics.py b/lib/galaxy/datatypes/proteomics.py index 5662cf98ee5..1d61d1f375a 100644 --- a/lib/galaxy/datatypes/proteomics.py +++ b/lib/galaxy/datatypes/proteomics.py @@ -445,7 +445,7 @@ class ImzML(Binary): 'imzml', description='The imzML metadata component.', is_binary=False) - + """The mass spectral data""" self.add_composite_file( 'ibd',