2021-02-09 09:05:55 +00:00
|
|
|
process GUNZIP {
|
|
|
|
tag "$archive"
|
2022-09-19 09:54:47 +00:00
|
|
|
label 'process_single'
|
2021-02-09 09:05:55 +00:00
|
|
|
|
2021-02-16 23:58:23 +00:00
|
|
|
conda (params.enable_conda ? "conda-forge::sed=4.7" : null)
|
2021-11-26 07:58:40 +00:00
|
|
|
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
2022-04-22 13:50:07 +00:00
|
|
|
'https://depot.galaxyproject.org/singularity/ubuntu:20.04' :
|
|
|
|
'ubuntu:20.04' }"
|
2021-02-09 09:05:55 +00:00
|
|
|
|
|
|
|
input:
|
2021-11-21 12:41:03 +00:00
|
|
|
tuple val(meta), path(archive)
|
2021-02-09 09:05:55 +00:00
|
|
|
|
|
|
|
output:
|
2021-11-21 12:41:03 +00:00
|
|
|
tuple val(meta), path("$gunzip"), emit: gunzip
|
|
|
|
path "versions.yml" , emit: versions
|
2021-02-09 09:05:55 +00:00
|
|
|
|
2022-02-04 08:53:32 +00:00
|
|
|
when:
|
|
|
|
task.ext.when == null || task.ext.when
|
|
|
|
|
2021-02-09 09:05:55 +00:00
|
|
|
script:
|
2021-11-26 07:58:40 +00:00
|
|
|
def args = task.ext.args ?: ''
|
2021-11-21 12:41:03 +00:00
|
|
|
gunzip = archive.toString() - '.gz'
|
2021-02-09 09:05:55 +00:00
|
|
|
"""
|
2021-09-28 05:56:27 +00:00
|
|
|
gunzip \\
|
|
|
|
-f \\
|
2021-11-26 07:58:40 +00:00
|
|
|
$args \\
|
2021-09-28 05:56:27 +00:00
|
|
|
$archive
|
|
|
|
|
2021-09-27 08:41:24 +00:00
|
|
|
cat <<-END_VERSIONS > versions.yml
|
2021-11-26 07:58:40 +00:00
|
|
|
"${task.process}":
|
|
|
|
gunzip: \$(echo \$(gunzip --version 2>&1) | sed 's/^.*(gzip) //; s/ Copyright.*\$//')
|
2021-09-27 08:41:24 +00:00
|
|
|
END_VERSIONS
|
2021-02-09 09:05:55 +00:00
|
|
|
"""
|
2022-07-04 15:33:55 +00:00
|
|
|
|
|
|
|
stub:
|
|
|
|
gunzip = archive.toString() - '.gz'
|
|
|
|
"""
|
|
|
|
touch $gunzip
|
|
|
|
cat <<-END_VERSIONS > versions.yml
|
|
|
|
"${task.process}":
|
|
|
|
gunzip: \$(echo \$(gunzip --version 2>&1) | sed 's/^.*(gzip) //; s/ Copyright.*\$//')
|
|
|
|
END_VERSIONS
|
|
|
|
"""
|
2021-02-09 09:05:55 +00:00
|
|
|
}
|