Quickstart Guide¶
Summary¶
To translate a tool / workflow, we use the
translate
functionality of janis.If we have a local CWL tool,
tools/samtools_flagstat.cwl
, we can translate it to Nextflow with the following command:janis translate --from cwl --to nextflow tools/samtools_flagstat.cwl
Translating a workflow has the same syntax:
janis translate --from cwl --to nextflow workflows/align_sort_markdup.cwl
Note that we only need to point janis to the main workflow file we wish to translate. All supplementary files are detected and translated automatically.
Sample Translations¶
Try out the translation functionality by following the instructions below.
(Go to the bottom to see the full usage of the
translate
command)Install Janis
python -m venv venv
source venv/bin/activate
pip install janis-pipelines
Obtain Sample Files
git clone https://github.com/GraceAHall/sample_translation_files
Sample Tool Translations
# From CWL
janis translate --from cwl --to nextflow sample_translation_files/cwl_tool/samtools_flagstat.cwl
janis translate --from cwl --to wdl sample_translation_files/cwl_tool/samtools_flagstat.cwl
# From Galaxy
janis translate --from galaxy --to cwl sample_translation_files/galaxy_tool/samtools_flagstat.xml
janis translate --from galaxy --to nextflow sample_translation_files/galaxy_tool/samtools_flagstat.xml
janis translate --from galaxy --to wdl sample_translation_files/galaxy_tool/samtools_flagstat.xml
# From WDL
janis translate --from wdl --to cwl sample_translation_files/wdl_tool/cutadapt.wdl
janis translate --from wdl --to nextflow sample_translation_files/wdl_tool/cutadapt.wdl
Sample Workflow Translations
# From CWL
janis translate --from cwl --to nextflow sample_translation_files/cwl_workflow/align_sort_markdup.cwl
janis translate --from cwl --to wdl sample_translation_files/cwl_workflow/align_sort_markdup.cwl
# From Galaxy
janis translate --from galaxy --to cwl sample_translation_files/galaxy_workflow/rna-seq-reads-to-counts.ga
janis translate --from galaxy --to nextflow sample_translation_files/galaxy_workflow/rna-seq-reads-to-counts.ga
janis translate --from galaxy --to wdl sample_translation_files/galaxy_workflow/rna-seq-reads-to-counts.ga
# From WDL
janis translate --from wdl --to cwl sample_translation_files/wdl_workflow/linear.wdl
janis translate --from wdl --to nextflow sample_translation_files/wdl_workflow/linear.wdl
Full Usage¶
NAME janis translate - generate translation from a source tool / workflow SYNOPSIS janis translate --from src --to dest [OPTION] infile DESCRIPTION Ingests a source tool / workflow to generate a translation in the destination language. infile Path to the source tool / main workflow file. For workflow translation, all supplementary files are detected and translated. --from STRING Source language of infile. Options: cwl | wdl | galaxy --to STRING Destination language to translate to. Options: cwl | wdl | nextflow --mode STRING Translation flavour. Options: skeleton | regular | extended. Default: extended extended: full translation as close to original as possible. regular: only "required" tool inputs / outputs appear during workflow translation. inferred based on workflow connections & optionality. skeleton: as regular mode, except command blocks are not templated. for CWL, InputBindings are not templated for tool inputs. --output-dir STRING Path to the output directory for the translated files. Default: "./translated"