@@ -43,7 +43,7 @@ class CommandLineTool(object):
43
43
__CLASS__ = 'CommandLineTool'
44
44
45
45
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 ):
47
47
'''
48
48
:param tool_id: unique identifier for this tool
49
49
:type tool_id: STRING
@@ -80,6 +80,7 @@ def __init__(self, tool_id=None, base_command=None, label=None, doc=None,
80
80
self .outputs = [] # List of [CommandOutputParameter] objects
81
81
self .baseCommand = base_command
82
82
self .arguments = [] # List of [CommandLineBinding] objects
83
+ self .edam = None
83
84
self .doc = doc
84
85
self .stdin = stdin
85
86
self .stderr = stderr
@@ -98,6 +99,9 @@ def export(self, outfile=None):
98
99
cwl_tool = {k : v for k , v in vars (self ).items () if v is not None and \
99
100
type (v ) is str }
100
101
cwl_tool ['class' ] = self .__CLASS__
102
+ # EDAM ?
103
+ if self .edam :
104
+ cwl_tool ['edam' ] = self .edam .get_dict ()
101
105
# Treat doc for multiline writting
102
106
if self .doc :
103
107
cwl_tool ['doc' ] = literal (self .doc )
@@ -433,3 +437,18 @@ class Metadata(object):
433
437
def __init__ (self , ** kwargs ):
434
438
for key , value in kwargs .items ():
435
439
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