@@ -43,7 +43,7 @@ class CommandLineTool(object):
4343 __CLASS__ = 'CommandLineTool'
4444
4545 def __init__ (self , tool_id = None , base_command = None , label = None , doc = None ,
46- cwl_version = None , stdin = None , stderr = None , stdout = None ):
46+ cwl_version = None , stdin = None , stderr = None , stdout = None , edam = None ):
4747 '''
4848 :param tool_id: unique identifier for this tool
4949 :type tool_id: STRING
@@ -80,6 +80,7 @@ def __init__(self, tool_id=None, base_command=None, label=None, doc=None,
8080 self .outputs = [] # List of [CommandOutputParameter] objects
8181 self .baseCommand = base_command
8282 self .arguments = [] # List of [CommandLineBinding] objects
83+ self .edam = None
8384 self .doc = doc
8485 self .stdin = stdin
8586 self .stderr = stderr
@@ -98,6 +99,9 @@ def export(self, outfile=None):
9899 cwl_tool = {k : v for k , v in vars (self ).items () if v is not None and \
99100 type (v ) is str }
100101 cwl_tool ['class' ] = self .__CLASS__
102+ # EDAM ?
103+ if self .edam :
104+ cwl_tool ['edam' ] = self .edam .get_dict ()
101105 # Treat doc for multiline writting
102106 if self .doc :
103107 cwl_tool ['doc' ] = literal (self .doc )
@@ -433,3 +437,18 @@ class Metadata(object):
433437 def __init__ (self , ** kwargs ):
434438 for key , value in kwargs .items ():
435439 setattr (self , key , value )
440+
441+ class Edam (object ):
442+ """
443+ Represent edam terms
444+ """
445+
446+ def __init__ (self ):
447+ """
448+ """
449+ self .name = "edam"
450+ self .topics = []
451+ self .operations = []
452+
453+ def get_dict (self ):
454+ return {'topics' : self .topics , 'operations' : self .operations }
0 commit comments