DataBiosphere / toil

A scalable, efficient, cross-platform (Linux/macOS) and easy-to-use workflow engine in pure Python.
http://toil.ucsc-cgl.org/.
Apache License 2.0
892 stars 241 forks source link

`toilwdl.py` fails with AttributeError: 'Ast' object has no attribute 'source_string' #2312

Closed ghost closed 6 years ago

ghost commented 6 years ago

Hi Folks!

I was trying to run toilwdl.py on this workflow from dockstore. I get the following error:

python ~/Code/toil/src/toil/wdl/toilwdl.py mutect2.wdl mutect2.exome.inputs.json --dev_mode 2

mutect2.wdl.txt mutect2.exome.inputs.json.txt

Traceback (most recent call last):
  File "/Users/kghose/Code/toil/src/toil/wdl/toilwdl.py", line 145, in <module>
    main()
  File "/Users/kghose/Code/toil/src/toil/wdl/toilwdl.py", line 113, in main
    aWDL.create_tasks_dict(ast)
  File "/Users/kghose/Code/toil/src/toil/wdl/wdl_analysis.py", line 141, in create_tasks_dict
    self.parse_task(task)
  File "/Users/kghose/Code/toil/src/toil/wdl/wdl_analysis.py", line 164, in parse_task
    declaration_array.append(self.parse_task_declaration(declaration_subAST))
  File "/Users/kghose/Code/toil/src/toil/wdl/wdl_analysis.py", line 202, in parse_task_declaration
    var_type = self.parse_declaration_type(declaration_subAST.attr("type"))
  File "/Users/kghose/Code/toil/src/toil/wdl/wdl_analysis.py", line 637, in parse_declaration_type
    return typeAST.attr('innerType').source_string
AttributeError: 'Ast' object has no attribute 'source_string'
toil --version
3.17.0a1

This is commit f6bb9fbcf82e23ef78c2f75999c63def16734062 from source.

Thanks! -Kaushik

┆Issue is synchronized with this JIRA Story ┆Issue Number: TOIL-322

DailyDreaming commented 6 years ago

You may be the first person to have run our wdl support and posted an issue. Thanks for catching the bug!

I've made a fix at #2315, plus a couple of others that should run the GATK4 Mutect 2 workflow in the dockstore link provided. It finished successfully on my machine at least.

Thanks for posting the issue!