Skip to content
Snippets Groups Projects
Commit ad361e6a authored by Peng Lian's avatar Peng Lian
Browse files

Use channel to handle files

parent 50fdc1f9
Branches
1 merge request!1Add Submodule Support
Pipeline #11642 failed with stages
...@@ -13,7 +13,7 @@ author: 'Peng Lian, Erand Smakaj' ...@@ -13,7 +13,7 @@ author: 'Peng Lian, Erand Smakaj'
# A contact email address for questions # A contact email address for questions
email: 'biohpc-help@utsouthwestern.edu' email: 'biohpc-help@utsouthwestern.edu'
# A more informative title for the workflow package # A more informative title for the workflow package
title: 'Example git Based Workflow' title: 'Example Git Based Workflow'
# A summary of the workflow package in plain text # A summary of the workflow package in plain text
description: | description: |
This is a minimal example that uses Astrocyte as a runner to run an existing workflow in a given git repo. This is a minimal example that uses Astrocyte as a runner to run an existing workflow in a given git repo.
...@@ -119,7 +119,7 @@ workflow_parameters: ...@@ -119,7 +119,7 @@ workflow_parameters:
A parameter that need to be passed to the above command A parameter that need to be passed to the above command
- id: parameter_nonopt - id: parameter_nonopt
type: string type: file
required: false required: false
description: | description: |
A non-optinal parameter that need to be passed to the above command A non-optinal parameter that need to be passed to the above command
......
...@@ -16,6 +16,8 @@ params.parameter1 = "A" ...@@ -16,6 +16,8 @@ params.parameter1 = "A"
params.parameter2 = "B" params.parameter2 = "B"
params.parameter_nonopt = "$baseDir/../test_data/mobydick.txt" params.parameter_nonopt = "$baseDir/../test_data/mobydick.txt"
// It's better to use a channel to handle the files
inputfiles = Channel.fromPath( params.parameter_nonopt )
process parameters { process parameters {
...@@ -43,12 +45,15 @@ process run_source { ...@@ -43,12 +45,15 @@ process run_source {
queue 'super' queue 'super'
cpus 1 cpus 1
input:
file inputfile from inputfiles
output: output:
file "astrocyte_run.out" file "astrocyte_run.out"
file "astrocyte_run.err" file "astrocyte_run.err"
""" """
# run the program with received parameters # run the program with received parameters
eval $baseDir/../workflow/external_repo/astrocyte_example_git_source__slave/${params.source_entrypoint} -p1 ${params.parameter1} -p2 ${params.parameter2} ${params.parameter_nonopt} 1> astrocyte_run.out 2> astrocyte_run.err eval $baseDir/../workflow/external_repo/astrocyte_example_git_source__slave/${params.source_entrypoint} -p1 ${params.parameter1} -p2 ${params.parameter2} $inputfile 1> astrocyte_run.out 2> astrocyte_run.err
""" """
} }
\ No newline at end of file
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment