mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-11-10 20:23:10 +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'
|
||||
publishDir "${params.outdir}",
|
||||
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)
|
||||
if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) {
|
||||
|
@ -19,14 +19,14 @@ process GUNZIP {
|
|||
}
|
||||
|
||||
input:
|
||||
path archive
|
||||
tuple val(meta), path(archive)
|
||||
|
||||
output:
|
||||
path "$gunzip", emit: gunzip
|
||||
path "versions.yml" , emit: versions
|
||||
tuple val(meta), path("$gunzip"), emit: gunzip
|
||||
path "versions.yml" , emit: versions
|
||||
|
||||
script:
|
||||
gunzip = archive.toString() - '.gz'
|
||||
gunzip = archive.toString() - '.gz'
|
||||
"""
|
||||
gunzip \\
|
||||
-f \\
|
||||
|
|
|
@ -10,6 +10,11 @@ tools:
|
|||
documentation: https://www.gnu.org/software/gzip/manual/gzip.html
|
||||
licence: ['GPL-3.0-or-later']
|
||||
input:
|
||||
- meta:
|
||||
type: map
|
||||
description: |
|
||||
Optional groovy Map containing meta information
|
||||
e.g. [ id:'test', single_end:false ]
|
||||
- archive:
|
||||
type: file
|
||||
description: File to be compressed/uncompressed
|
||||
|
@ -26,3 +31,4 @@ output:
|
|||
authors:
|
||||
- "@joseespinosa"
|
||||
- "@drpatelh"
|
||||
- "@jfy133"
|
||||
|
|
|
@ -5,7 +5,9 @@ nextflow.enable.dsl = 2
|
|||
include { GUNZIP } from '../../../modules/gunzip/main.nf' addParams( options: [:] )
|
||||
|
||||
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 )
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue