diff --git a/.gitignore b/.gitignore index 6320cd2..044922b 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,3 @@ -data \ No newline at end of file +data +.DS_Store +output/* diff --git a/README.md b/README.md index cad16e8..c143d7d 100644 --- a/README.md +++ b/README.md @@ -16,3 +16,7 @@ To test, create `input` and `output` subfolders in the `data` directory. Create Re-Run: `docker-compose up --build` The testfile should be copied to the `data/output` directory. + +To run cwl file: + +`cwltool --outdir=data main.cwl job.yml` diff --git a/job.yml b/job.yml new file mode 100644 index 0000000..d336d6b --- /dev/null +++ b/job.yml @@ -0,0 +1,7 @@ +# job.yml +script: + class: File + path: main.py +input_dir: + class: Directory + path: data/input \ No newline at end of file diff --git a/main.cwl b/main.cwl new file mode 100644 index 0000000..8882716 --- /dev/null +++ b/main.cwl @@ -0,0 +1,34 @@ +cwlVersion: v1.2 +class: CommandLineTool + +requirements: + DockerRequirement: + dockerPull: hackathon/python + InitialWorkDirRequirement: + listing: + - entryname: main.py + entry: $(inputs.script) + - entryname: data/input + entry: $(inputs.input_dir) + - entryname: data/output + entry: "$(null)" + writable: true + EnvVarRequirement: + envDef: + INPUT_DIR: "data/input" + OUTPUT_DIR: "data/output" + +inputs: + script: + type: File + doc: "The main Python script" + + input_dir: + type: Directory + doc: "Input directory" + +outputs: + output_dir: + type: Directory + outputBinding: + glob: data/output \ No newline at end of file