mirror of
https://github.com/MillironX/taxprofiler.git
synced 2024-11-22 18:19:54 +00:00
use proper working FASTP module
This commit is contained in:
parent
3fc7f1f0f8
commit
f087136ec9
4 changed files with 27 additions and 41 deletions
|
@ -43,7 +43,7 @@
|
||||||
},
|
},
|
||||||
"fastp": {
|
"fastp": {
|
||||||
"branch": "master",
|
"branch": "master",
|
||||||
"git_sha": "7e8ad566883449e7939062b5e2bcf53fc1e0002f",
|
"git_sha": "2c70c1c1951aaf884d2e8d8d9c871db79f7b35aa",
|
||||||
"patch": "modules/nf-core/modules/fastp/fastp.diff"
|
"patch": "modules/nf-core/modules/fastp/fastp.diff"
|
||||||
},
|
},
|
||||||
"fastqc": {
|
"fastqc": {
|
||||||
|
|
33
modules/nf-core/modules/fastp/fastp.diff
generated
33
modules/nf-core/modules/fastp/fastp.diff
generated
|
@ -1,33 +0,0 @@
|
||||||
Changes in module 'nf-core/modules/fastp'
|
|
||||||
--- modules/nf-core/modules/fastp/main.nf
|
|
||||||
+++ modules/nf-core/modules/fastp/main.nf
|
|
||||||
@@ -33,9 +33,8 @@
|
|
||||||
def fail_fastq = save_trimmed_fail ? "--failed_out ${prefix}.fail.fastq.gz" : ''
|
|
||||||
"""
|
|
||||||
[ ! -f ${prefix}.fastq.gz ] && ln -sf $reads ${prefix}.fastq.gz
|
|
||||||
- cat ${prefix}.fastq.gz \\
|
|
||||||
- | fastp \\
|
|
||||||
- --stdin \\
|
|
||||||
+
|
|
||||||
+ fastp \\
|
|
||||||
--stdout \\
|
|
||||||
--in1 ${prefix}.fastq.gz \\
|
|
||||||
--thread $task.cpus \\
|
|
||||||
@@ -45,6 +44,7 @@
|
|
||||||
$args \\
|
|
||||||
2> ${prefix}.fastp.log \\
|
|
||||||
| gzip -c > ${prefix}.fastp.fastq.gz
|
|
||||||
+
|
|
||||||
cat <<-END_VERSIONS > versions.yml
|
|
||||||
"${task.process}":
|
|
||||||
fastp: \$(fastp --version 2>&1 | sed -e "s/fastp //g")
|
|
||||||
@@ -69,6 +69,7 @@
|
|
||||||
--detect_adapter_for_pe \\
|
|
||||||
$args \\
|
|
||||||
2> ${prefix}.fastp.log
|
|
||||||
+
|
|
||||||
|
|
||||||
cat <<-END_VERSIONS > versions.yml
|
|
||||||
"${task.process}":
|
|
||||||
|
|
||||||
************************************************************
|
|
28
modules/nf-core/modules/fastp/main.nf
generated
28
modules/nf-core/modules/fastp/main.nf
generated
|
@ -26,11 +26,11 @@ process FASTP {
|
||||||
|
|
||||||
script:
|
script:
|
||||||
def args = task.ext.args ?: ''
|
def args = task.ext.args ?: ''
|
||||||
// Added soft-links to original fastqs for consistent naming in MultiQC
|
|
||||||
def prefix = task.ext.prefix ?: "${meta.id}"
|
def prefix = task.ext.prefix ?: "${meta.id}"
|
||||||
|
def fail_fastq = save_trimmed_fail && meta.single_end ? "--failed_out ${prefix}.fail.fastq.gz" : save_trimmed_fail && !meta.single_end ? "--unpaired1 ${prefix}_1.fail.fastq.gz --unpaired2 ${prefix}_2.fail.fastq.gz" : ''
|
||||||
|
// Added soft-links to original fastqs for consistent naming in MultiQC
|
||||||
// Use single ended for interleaved. Add --interleaved_in in config.
|
// Use single ended for interleaved. Add --interleaved_in in config.
|
||||||
if (meta.single_end) {
|
if ( task.ext.args?.contains('--interleaved_in') ) {
|
||||||
def fail_fastq = save_trimmed_fail ? "--failed_out ${prefix}.fail.fastq.gz" : ''
|
|
||||||
"""
|
"""
|
||||||
[ ! -f ${prefix}.fastq.gz ] && ln -sf $reads ${prefix}.fastq.gz
|
[ ! -f ${prefix}.fastq.gz ] && ln -sf $reads ${prefix}.fastq.gz
|
||||||
|
|
||||||
|
@ -45,13 +45,32 @@ process FASTP {
|
||||||
2> ${prefix}.fastp.log \\
|
2> ${prefix}.fastp.log \\
|
||||||
| gzip -c > ${prefix}.fastp.fastq.gz
|
| gzip -c > ${prefix}.fastp.fastq.gz
|
||||||
|
|
||||||
|
cat <<-END_VERSIONS > versions.yml
|
||||||
|
"${task.process}":
|
||||||
|
fastp: \$(fastp --version 2>&1 | sed -e "s/fastp //g")
|
||||||
|
END_VERSIONS
|
||||||
|
"""
|
||||||
|
} else if (meta.single_end) {
|
||||||
|
"""
|
||||||
|
[ ! -f ${prefix}.fastq.gz ] && ln -sf $reads ${prefix}.fastq.gz
|
||||||
|
|
||||||
|
fastp \\
|
||||||
|
--stdout \\
|
||||||
|
--in1 ${prefix}.fastq.gz \\
|
||||||
|
--out1 ${prefix}.fastp.fastq.gz \\
|
||||||
|
--thread $task.cpus \\
|
||||||
|
--json ${prefix}.fastp.json \\
|
||||||
|
--html ${prefix}.fastp.html \\
|
||||||
|
$fail_fastq \\
|
||||||
|
$args \\
|
||||||
|
2> ${prefix}.fastp.log
|
||||||
|
|
||||||
cat <<-END_VERSIONS > versions.yml
|
cat <<-END_VERSIONS > versions.yml
|
||||||
"${task.process}":
|
"${task.process}":
|
||||||
fastp: \$(fastp --version 2>&1 | sed -e "s/fastp //g")
|
fastp: \$(fastp --version 2>&1 | sed -e "s/fastp //g")
|
||||||
END_VERSIONS
|
END_VERSIONS
|
||||||
"""
|
"""
|
||||||
} else {
|
} else {
|
||||||
def fail_fastq = save_trimmed_fail ? "--unpaired1 ${prefix}_1.fail.fastq.gz --unpaired2 ${prefix}_2.fail.fastq.gz" : ''
|
|
||||||
def merge_fastq = save_merged ? "-m --merged_out ${prefix}.merged.fastq.gz" : ''
|
def merge_fastq = save_merged ? "-m --merged_out ${prefix}.merged.fastq.gz" : ''
|
||||||
"""
|
"""
|
||||||
[ ! -f ${prefix}_1.fastq.gz ] && ln -sf ${reads[0]} ${prefix}_1.fastq.gz
|
[ ! -f ${prefix}_1.fastq.gz ] && ln -sf ${reads[0]} ${prefix}_1.fastq.gz
|
||||||
|
@ -70,7 +89,6 @@ process FASTP {
|
||||||
$args \\
|
$args \\
|
||||||
2> ${prefix}.fastp.log
|
2> ${prefix}.fastp.log
|
||||||
|
|
||||||
|
|
||||||
cat <<-END_VERSIONS > versions.yml
|
cat <<-END_VERSIONS > versions.yml
|
||||||
"${task.process}":
|
"${task.process}":
|
||||||
fastp: \$(fastp --version 2>&1 | sed -e "s/fastp //g")
|
fastp: \$(fastp --version 2>&1 | sed -e "s/fastp //g")
|
||||||
|
|
3
modules/nf-core/modules/fastp/meta.yml
generated
3
modules/nf-core/modules/fastp/meta.yml
generated
|
@ -21,7 +21,8 @@ input:
|
||||||
type: file
|
type: file
|
||||||
description: |
|
description: |
|
||||||
List of input FastQ files of size 1 and 2 for single-end and paired-end data,
|
List of input FastQ files of size 1 and 2 for single-end and paired-end data,
|
||||||
respectively.
|
respectively. If you wish to run interleaved paired-end data, supply as single-end data
|
||||||
|
but with `--interleaved_in` in your `modules.conf`'s `ext.args` for the module.
|
||||||
- save_trimmed_fail:
|
- save_trimmed_fail:
|
||||||
type: boolean
|
type: boolean
|
||||||
description: Specify true to save files that failed to pass trimming thresholds ending in `*.fail.fastq.gz`
|
description: Specify true to save files that failed to pass trimming thresholds ending in `*.fail.fastq.gz`
|
||||||
|
|
Loading…
Reference in a new issue