commit/galaxy-central: jmchilton: Merged in jmchilton/galaxy-central-fork-1 (pull request #457)
1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/08e25f0ffc06/ Changeset: 08e25f0ffc06 User: jmchilton Date: 2014-08-14 03:53:30 Summary: Merged in jmchilton/galaxy-central-fork-1 (pull request #457) Allow cheetah tool templates to reason polymorphically about datatypes. Affected #: 1 file diff -r be407987417297cb1543864e8448d49bb93851ab -r 08e25f0ffc06543bd76efbe7bca8a329bb1858cb lib/galaxy/tools/wrappers.py --- a/lib/galaxy/tools/wrappers.py +++ b/lib/galaxy/tools/wrappers.py @@ -194,6 +194,7 @@ else: self.dataset = dataset self.metadata = self.MetadataWrapper( dataset.metadata ) + self.datatypes_registry = datatypes_registry self.false_path = getattr( dataset_path, "false_path", None ) self.false_extra_files_path = getattr( dataset_path, "false_extra_files_path", None ) @@ -201,6 +202,10 @@ def is_collection( self ): return False + def is_of_type( self, *exts ): + datatypes = [ self.datatypes_registry.get_datatype_by_extension( e ) for e in exts ] + return self.dataset.datatype.matches_any( datatypes ) + def __str__( self ): if self.false_path is not None: return self.false_path Repository URL: https://bitbucket.org/galaxy/galaxy-central/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.
participants (1)
-
commits-noreply@bitbucket.org