1
0
Fork 0
mirror of https://github.com/MillironX/taxprofiler.git synced 2024-11-22 15:19:54 +00:00

Merge pull request #128 from nf-core/fastp-patch-removal

use proper working FASTP module
This commit is contained in:
James A. Fellows Yates 2022-09-09 19:07:12 +02:00 committed by GitHub
commit db688575f6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 27 additions and 42 deletions

View file

@ -43,8 +43,7 @@
},
"fastp": {
"branch": "master",
"git_sha": "7e8ad566883449e7939062b5e2bcf53fc1e0002f",
"patch": "modules/nf-core/modules/fastp/fastp.diff"
"git_sha": "2c70c1c1951aaf884d2e8d8d9c871db79f7b35aa"
},
"fastqc": {
"branch": "master",

View file

@ -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}":
************************************************************

View file

@ -26,11 +26,11 @@ process FASTP {
script:
def args = task.ext.args ?: ''
// Added soft-links to original fastqs for consistent naming in MultiQC
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.
if (meta.single_end) {
def fail_fastq = save_trimmed_fail ? "--failed_out ${prefix}.fail.fastq.gz" : ''
if ( task.ext.args?.contains('--interleaved_in') ) {
"""
[ ! -f ${prefix}.fastq.gz ] && ln -sf $reads ${prefix}.fastq.gz
@ -45,13 +45,32 @@ process FASTP {
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")
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
"${task.process}":
fastp: \$(fastp --version 2>&1 | sed -e "s/fastp //g")
END_VERSIONS
"""
} 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" : ''
"""
[ ! -f ${prefix}_1.fastq.gz ] && ln -sf ${reads[0]} ${prefix}_1.fastq.gz
@ -70,7 +89,6 @@ process FASTP {
$args \\
2> ${prefix}.fastp.log
cat <<-END_VERSIONS > versions.yml
"${task.process}":
fastp: \$(fastp --version 2>&1 | sed -e "s/fastp //g")

View file

@ -21,7 +21,8 @@ input:
type: file
description: |
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:
type: boolean
description: Specify true to save files that failed to pass trimming thresholds ending in `*.fail.fastq.gz`