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