Skip to content

Commit

Permalink
Update fromwdl.py to read file path from sys.argv
Browse files Browse the repository at this point in the history
  • Loading branch information
illusional authored May 31, 2021
1 parent 0ee5a82 commit 7d8b7b3
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions janis_core/ingestion/fromwdl.py
Original file line number Diff line number Diff line change
Expand Up @@ -436,8 +436,12 @@ def parse_command_tool_output(self, outp: WDL.Decl):


if __name__ == "__main__":
# doc = "path/to/doc.wdl"
doc = "/Users/michael.franklin/source/wdlz/cramqc.wdl"
t = WdlParser.from_doc(doc)
t.get_dot_plot(log_to_stdout=True)
t.translate("hail")
import sys
if len(sys.argv) != 2:
raise Exception("Expected 1 argument, the name of a CWL tool.")

toolname = sys.argv[1]

tool = WdlParser.from_doc(toolname)

tool.translate("janis")

0 comments on commit 7d8b7b3

Please sign in to comment.