Skip to content

Commit 7d8b7b3

Browse files
authored
Update fromwdl.py to read file path from sys.argv
1 parent 0ee5a82 commit 7d8b7b3

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

janis_core/ingestion/fromwdl.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -436,8 +436,12 @@ def parse_command_tool_output(self, outp: WDL.Decl):
436436

437437

438438
if __name__ == "__main__":
439-
# doc = "path/to/doc.wdl"
440-
doc = "/Users/michael.franklin/source/wdlz/cramqc.wdl"
441-
t = WdlParser.from_doc(doc)
442-
t.get_dot_plot(log_to_stdout=True)
443-
t.translate("hail")
439+
import sys
440+
if len(sys.argv) != 2:
441+
raise Exception("Expected 1 argument, the name of a CWL tool.")
442+
443+
toolname = sys.argv[1]
444+
445+
tool = WdlParser.from_doc(toolname)
446+
447+
tool.translate("janis")

0 commit comments

Comments
 (0)