mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-12-22 02:58:17 +00:00
Fix flash and cat/fastq modules (#759)
* Fix version commands: round 3 * Fix seqkit/split2 modules * Fix flash and cat/fastq modules * Remove md5sums on gz files
This commit is contained in:
parent
5c463ca6b4
commit
b932210f27
6 changed files with 43 additions and 32 deletions
|
@ -1,5 +1,5 @@
|
|||
// Import generic module functions
|
||||
include { initOptions; saveFiles } from './functions'
|
||||
include { initOptions; saveFiles; getSoftwareName; getProcessName } from './functions'
|
||||
|
||||
params.options = [:]
|
||||
options = initOptions(params.options)
|
||||
|
@ -23,6 +23,7 @@ process CAT_FASTQ {
|
|||
|
||||
output:
|
||||
tuple val(meta), path("*.merged.fastq.gz"), emit: reads
|
||||
path "versions.yml" , emit: version
|
||||
|
||||
script:
|
||||
def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}"
|
||||
|
@ -31,6 +32,11 @@ process CAT_FASTQ {
|
|||
if (readList.size > 1) {
|
||||
"""
|
||||
cat ${readList.sort().join(' ')} > ${prefix}.merged.fastq.gz
|
||||
|
||||
cat <<-END_VERSIONS > versions.yml
|
||||
${getProcessName(task.process)}:
|
||||
${getSoftwareName(task.process)}: \$(echo \$(cat --version 2>&1) | sed 's/^.*coreutils) //; s/ .*\$//')
|
||||
END_VERSIONS
|
||||
"""
|
||||
}
|
||||
} else {
|
||||
|
@ -41,6 +47,11 @@ process CAT_FASTQ {
|
|||
"""
|
||||
cat ${read1.sort().join(' ')} > ${prefix}_1.merged.fastq.gz
|
||||
cat ${read2.sort().join(' ')} > ${prefix}_2.merged.fastq.gz
|
||||
|
||||
cat <<-END_VERSIONS > versions.yml
|
||||
${getProcessName(task.process)}:
|
||||
${getSoftwareName(task.process)}: \$(echo \$(cat --version 2>&1) | sed 's/^.*coreutils) //; s/ .*\$//')
|
||||
END_VERSIONS
|
||||
"""
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,23 +21,23 @@ process FLASH {
|
|||
tuple val(meta), path(reads)
|
||||
|
||||
output:
|
||||
tuple val(meta), path("*.merged.*.fastq.gz"), emit: reads
|
||||
path "versions.yml" , emit: version
|
||||
tuple val(meta), path("*.fastq.gz"), emit: reads
|
||||
path "versions.yml" , emit: version
|
||||
|
||||
script:
|
||||
def software = getSoftwareName(task.process)
|
||||
def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}"
|
||||
def merged = "-o ${prefix}.merged"
|
||||
def input_reads = "${reads[0]} ${reads[1]}"
|
||||
"""
|
||||
flash \\
|
||||
$options.args \\
|
||||
$merged \\
|
||||
-o ${prefix} \\
|
||||
-z \\
|
||||
$input_reads
|
||||
${reads[0]} \\
|
||||
${reads[1]}
|
||||
|
||||
cat <<-END_VERSIONS > versions.yml
|
||||
${getProcessName(task.process)}:
|
||||
${getSoftwareName(task.process)}: \$(flash --version)
|
||||
${getSoftwareName(task.process)}: \$(echo \$(flash --version 2>&1) | sed 's/^.*FLASH v//; s/ .*\$//')
|
||||
END_VERSIONS
|
||||
"""
|
||||
}
|
||||
|
|
|
@ -2,24 +2,26 @@
|
|||
|
||||
nextflow.enable.dsl = 2
|
||||
|
||||
include { CAT_FASTQ } from '../../../../modules/cat/fastq/main.nf' addParams( options: [:] )
|
||||
include { CAT_FASTQ } from '../../../../modules/cat/fastq/main.nf' addParams( options: [publish_dir:'cat'] )
|
||||
|
||||
workflow test_cat_fastq_single_end {
|
||||
input = [ [ id:'test', single_end:true ], // meta map
|
||||
[ file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true),
|
||||
file(params.test_data['sarscov2']['illumina']['test2_1_fastq_gz'], checkIfExists: true) ]
|
||||
]
|
||||
input = [
|
||||
[ id:'test', single_end:true ], // meta map
|
||||
[ file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true),
|
||||
file(params.test_data['sarscov2']['illumina']['test2_1_fastq_gz'], checkIfExists: true) ]
|
||||
]
|
||||
|
||||
CAT_FASTQ ( input )
|
||||
}
|
||||
|
||||
workflow test_cat_fastq_paired_end {
|
||||
input = [ [ id:'test', single_end:false ], // meta map
|
||||
[ file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true),
|
||||
file(params.test_data['sarscov2']['illumina']['test_2_fastq_gz'], checkIfExists: true),
|
||||
file(params.test_data['sarscov2']['illumina']['test2_1_fastq_gz'], checkIfExists: true),
|
||||
file(params.test_data['sarscov2']['illumina']['test2_2_fastq_gz'], checkIfExists: true) ]
|
||||
]
|
||||
input = [
|
||||
[ id:'test', single_end:false ], // meta map
|
||||
[ file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true),
|
||||
file(params.test_data['sarscov2']['illumina']['test_2_fastq_gz'], checkIfExists: true),
|
||||
file(params.test_data['sarscov2']['illumina']['test2_1_fastq_gz'], checkIfExists: true),
|
||||
file(params.test_data['sarscov2']['illumina']['test2_2_fastq_gz'], checkIfExists: true) ]
|
||||
]
|
||||
|
||||
CAT_FASTQ ( input )
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
- cat
|
||||
- cat/fastq
|
||||
files:
|
||||
- path: ./output/merged_fastq/test.merged.fastq.gz
|
||||
- path: ./output/cat/test.merged.fastq.gz
|
||||
md5sum: 59f6dbe193741bb40f498f254aeb2e99
|
||||
|
||||
- name: cat fastq fastqc_paired_end
|
||||
|
@ -13,7 +13,7 @@
|
|||
- cat
|
||||
- cat/fastq
|
||||
files:
|
||||
- path: ./output/merged_fastq/test_2.merged.fastq.gz
|
||||
- path: ./output/cat/test_2.merged.fastq.gz
|
||||
md5sum: d2b1a836eef1058738ecab36c907c5ba
|
||||
- path: ./output/merged_fastq/test_1.merged.fastq.gz
|
||||
- path: ./output/cat/test_1.merged.fastq.gz
|
||||
md5sum: 59f6dbe193741bb40f498f254aeb2e99
|
||||
|
|
|
@ -5,10 +5,11 @@ nextflow.enable.dsl = 2
|
|||
include { FLASH } from '../../../modules/flash/main.nf' addParams( options: [args:'-m 20 -M 100'] )
|
||||
|
||||
workflow test_flash {
|
||||
input = [ [ id:'test', single_end:false ], // meta map
|
||||
[ file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true),
|
||||
file(params.test_data['sarscov2']['illumina']['test_2_fastq_gz'], checkIfExists: true) ]
|
||||
]
|
||||
input = [
|
||||
[ id:'test', single_end:false ], // meta map
|
||||
[ file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true),
|
||||
file(params.test_data['sarscov2']['illumina']['test_2_fastq_gz'], checkIfExists: true) ]
|
||||
]
|
||||
|
||||
FLASH ( input )
|
||||
}
|
||||
|
|
|
@ -3,9 +3,6 @@
|
|||
tags:
|
||||
- flash
|
||||
files:
|
||||
- path: output/flash/test.merged.notCombined_2.fastq.gz
|
||||
md5sum: 96ec044281fe60e0061976d928810314
|
||||
- path: output/flash/test.merged.extendedFrags.fastq.gz
|
||||
md5sum: da20afa705e8ea881e66960bb75607c9
|
||||
- path: output/flash/test.merged.notCombined_1.fastq.gz
|
||||
md5sum: 32451c87f89172c764bec19136592d29
|
||||
- path: output/flash/test.notCombined_2.fastq.gz
|
||||
- path: output/flash/test.extendedFrags.fastq.gz
|
||||
- path: output/flash/test.notCombined_1.fastq.gz
|
||||
|
|
Loading…
Reference in a new issue