mkdir demo_gzip
cd demo_gzip
echo test > test_input.txtmkdir nextflow-src
# Create nextflow-src/main.nf using contents below
vi nextflow-src/main.nfnextflow.enable.dsl=2
process COMPRESS {
input:
path input_file
val compression_level
output:
path "${input_file.simpleName}.gz" // .simpleName keeps just the filename
publishDir 'out', mode: 'symlink'
script:
"""
gzip -c -${compression_level} ${input_file} > ${input_file.simpleName}.gz
"""
}
workflow {
input_path = file(params.input_file)
gzip_out = COMPRESS(input_path, params.compression_level)
}nextflow run nextflow-src/ --input_file test_input.txt --compression_level 5process.container = 'ubuntu:latest'nextflow run nextflow-src/ --input_file test_input.txt --compression_level 5 -with-dockerprocess.container = 'ubuntu:latest'
profiles {
test {
params {
input_file = 'test_input.txt'
compression_level = 5
}
}
}nextflow run nextflow-src/ -profile test -with-dockerprocess.container = 'ubuntu:latest'
profiles {
test {
params {
input_file = 'test_input.txt'
compression_level = 5
}
}
docker {
docker.enabled = true
}
}nextflow run nextflow-src/ -profile test,dockerpipeline-dev run-in-bench{
"$defs": {
"input_output_options": {
"title": "Input/output options",
"properties": {
"input_file": {
"description": "Input file to compress",
"help_text": "The file that will get compressed",
"type": "string",
"format": "file-path"
},
"compression_level": {
"type": "integer",
"description": "Compression level to use (1-9)",
"default": 5,
"minimum": 1,
"maximum": 9
}
}
}
}
}$ pipeline-dev project-info --init
pipeline-dev.project-info not found. Let's create it with 2 questions:
Please enter your project name: demo_gzip
Please enter a project description: Bench gzip demopipeline-dev deploy-as-flow-pipelinepipeline-dev launch-validation-in-flow/data/demo $ pipeline-dev launch-validation-in-flow
pipelineld: 331f209d-2a72-48cd-aa69-070142f57f73
Getting Analysis Storage Id
Launching as ICA Flow Analysis...
ICA Analysis created:
- Name: Test demo_gzip
- Id: 17106efc-7884-4121-a66d-b551a782b620
- Url: https://stage.v2.stratus.illumina.com/ica/projects/1873043/analyses/17106efc-7884-4121-a66d-b551a782620


