mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-11-13 05:13:09 +00:00
update: gunzip
to include meta input tuple (#1082)
* Specify more guidelines on input channels * Linting * Updates based on code review * Update README.md * Fix broken sentence * feat: add megahit module, currently decompressed output * Update main.nf * Update tests/modules/megahit/test.yml Co-authored-by: Maxime Borry <maxibor@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * feat: compress all outputs, remove md5sums due to gz stochasicity * fix: wrong conda channel for pigz * fix: broken singleend tests and update meta.yml * Missed one * Apply suggestions from code review Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * fix: pigz formatting * Apply suggestions from code review Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Apply suggestions from code review * Add bamUtil trimBam * Update modules/bamutil/trimbam/main.nf Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update modules/bamutil/trimbam/main.nf * Changes after code-review * YAML lint * update: add (optional) meta to input tuple * YAML linting * Update main.nf Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> Co-authored-by: Maxime Borry <maxibor@users.noreply.github.com> Co-authored-by: Sébastien Guizard <sguizard@ed.ac.uk> Co-authored-by: Robert A. Petit III <robbie.petit@gmail.com>
This commit is contained in:
parent
29c669766d
commit
d30bf235b1
3 changed files with 14 additions and 6 deletions
|
@ -9,7 +9,7 @@ process GUNZIP {
|
||||||
label 'process_low'
|
label 'process_low'
|
||||||
publishDir "${params.outdir}",
|
publishDir "${params.outdir}",
|
||||||
mode: params.publish_dir_mode,
|
mode: params.publish_dir_mode,
|
||||||
saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), meta:[:], publish_by_meta:[]) }
|
saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), meta:meta, publish_by_meta:['id']) }
|
||||||
|
|
||||||
conda (params.enable_conda ? "conda-forge::sed=4.7" : null)
|
conda (params.enable_conda ? "conda-forge::sed=4.7" : null)
|
||||||
if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) {
|
if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) {
|
||||||
|
@ -19,14 +19,14 @@ process GUNZIP {
|
||||||
}
|
}
|
||||||
|
|
||||||
input:
|
input:
|
||||||
path archive
|
tuple val(meta), path(archive)
|
||||||
|
|
||||||
output:
|
output:
|
||||||
path "$gunzip", emit: gunzip
|
tuple val(meta), path("$gunzip"), emit: gunzip
|
||||||
path "versions.yml" , emit: versions
|
path "versions.yml" , emit: versions
|
||||||
|
|
||||||
script:
|
script:
|
||||||
gunzip = archive.toString() - '.gz'
|
gunzip = archive.toString() - '.gz'
|
||||||
"""
|
"""
|
||||||
gunzip \\
|
gunzip \\
|
||||||
-f \\
|
-f \\
|
||||||
|
|
|
@ -10,6 +10,11 @@ tools:
|
||||||
documentation: https://www.gnu.org/software/gzip/manual/gzip.html
|
documentation: https://www.gnu.org/software/gzip/manual/gzip.html
|
||||||
licence: ['GPL-3.0-or-later']
|
licence: ['GPL-3.0-or-later']
|
||||||
input:
|
input:
|
||||||
|
- meta:
|
||||||
|
type: map
|
||||||
|
description: |
|
||||||
|
Optional groovy Map containing meta information
|
||||||
|
e.g. [ id:'test', single_end:false ]
|
||||||
- archive:
|
- archive:
|
||||||
type: file
|
type: file
|
||||||
description: File to be compressed/uncompressed
|
description: File to be compressed/uncompressed
|
||||||
|
@ -26,3 +31,4 @@ output:
|
||||||
authors:
|
authors:
|
||||||
- "@joseespinosa"
|
- "@joseespinosa"
|
||||||
- "@drpatelh"
|
- "@drpatelh"
|
||||||
|
- "@jfy133"
|
||||||
|
|
|
@ -5,7 +5,9 @@ nextflow.enable.dsl = 2
|
||||||
include { GUNZIP } from '../../../modules/gunzip/main.nf' addParams( options: [:] )
|
include { GUNZIP } from '../../../modules/gunzip/main.nf' addParams( options: [:] )
|
||||||
|
|
||||||
workflow test_gunzip {
|
workflow test_gunzip {
|
||||||
input = file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true)
|
input = [ [],
|
||||||
|
file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true)
|
||||||
|
]
|
||||||
|
|
||||||
GUNZIP ( input )
|
GUNZIP ( input )
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue