PMCC-BioinformaticsCore / janis-core

Core python modules for Janis Pipeline workflow assistant
GNU General Public License v3.0
4 stars 9 forks source link

Question: Is there a way to use your tool to convert WDL to CWL format #76

Closed michael-kotliar closed 3 years ago

michael-kotliar commented 3 years ago

Not an actual issue, just a question. Is there any way to use your tool to convert WDL into CWL format? Or, at least, parse WDL into some objects that are compatible with source code from cwltool?

Thanks!

illusional commented 3 years ago

Hey @michael-kotliar! I've been working on a WDL parser in #69, it's not wrapped up nicely yet in the tool suite, but you could use it to convert some workflows. Note the limitations in the description of #69.

Here's a direct link to the script: https://raw.githubusercontent.com/PMCC-BioinformaticsCore/janis-core/master/janis_core/ingestion/fromwdl.py You'll have to have janis-core + MiniWDL installed, you could change the last line (L447) to translate"cwl" instead of "janis", and then run the script directly:

python3 fromwdl.py <yourscript.wdl>
michael-kotliar commented 3 years ago

Hi @illusional, Great! Thanks for the script!

illusional commented 3 years ago

How'd you go @michael-kotliar?

michael-kotliar commented 3 years ago

It works fine. I tested it with a simple WDL workflow that I had and I was able to run it with cwltool. I think I had to make some changes in the code to generate outputs, but for now, I anyway use it only for testing purposes. However, I hope that this script will evolve and will cover more features from WDL:)