nextflow-io / cwl2nxf

Import a CWL workflow specification to Nextflow script (experimental)
Apache License 2.0
27 stars 5 forks source link

cwl2nxf

Note: This project is no longer under active development

This is a prototype conversion tool from Common Workflow Language (CWL) to Nextflow. Example workflows to demonstrate the conversion are included in the 'sample_data' folder with additional information on how to convert and run each exmaple.

CircleCI status

Supported features

Unsupported features

Building cwl2nxf

Note: Make sure to have Java 8 installed.

Clone this repository with the following command:

git clone https://github.com/nextflow-io/cwl2nxf.git && cwl2nxf && export CWL2NXF_HOME=$PWD

Then build the project by using the following command:

./gradlew uberjar

Finally you can execute the cwl2nxf application as shown below:

cd sample_data/tutorial_tar_test
java -jar $CWL2NXF_HOME/build/libs/cwl2nxf-*.jar -o sample.nf wf.cwl wf.yml 

Upon execution sample.nf file will be created in the base folder. This file will then be runnable using Nextflow:

nextflow run sample.nf

Development

Compile and run from sources by using the following command:

./gradlew jar 
./launch.sh <wf.cwl> <wf.yml>

Debug the execution by using a remote debugger (eg. IntelliJ IDEA) as shown below:

./launch.sh -remote-debug <wf.cwl> <wf.yml>

Run the code coverage by using the command:

./gradlew cobertura  

The generated report is available at the following path:

open ./build/reports/cobertura/index.html

Graphs

A comparison of native CWL graph to the Nextflow generated graph after conversion.

CWL graph:

Alt text

Nextflow graph after conversion:

Alt text

License

The cwl2nxf is released under the Apache 2.0 License.