Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
nextflow
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LBMC
nextflow
Commits
2924d6ef
Verified
Commit
2924d6ef
authored
4 years ago
by
Laurent Modolo
Browse files
Options
Downloads
Patches
Plain Diff
fastp: update fastp to match CONTRIBUTING.md
parent
be4657c7
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/nf_modules/fastp/main.nf
+91
-137
91 additions, 137 deletions
src/nf_modules/fastp/main.nf
with
91 additions
and
137 deletions
src/nf_modules/fastp/main.nf
+
91
−
137
View file @
2924d6ef
...
...
@@ -2,10 +2,9 @@ version = "0.20.1"
container_url
=
"lbmc/fastp:${version}"
params
.
fastp_protocol
=
""
params
.
fastp
=
""
params
.
fastp_pairedend
=
""
params
.
fastp_singleend
=
""
params
.
fastp
=
""
params
.
fastp_out
=
""
workflow
fastp
{
take:
fastq
...
...
@@ -31,165 +30,120 @@ workflow fastp {
process
fastp_default
{
container
=
"${container_url}"
label
"big_mem_multi_cpus"
tag
"$pair_id"
publishDir
"results/QC/fastp/"
,
mode:
'copy'
,
pattern:
"*.html"
input:
tuple
val
(
pair_id
),
path
(
reads
)
output:
tuple
val
(
pair_id
),
path
(
"*.fastq.gz"
),
emit:
fastq
tuple
val
(
pair_id
),
path
(
"*.html"
),
emit:
html
tuple
val
(
pair_id
),
path
(
"*.json"
),
emit:
report
script:
if
(
reads
instanceof
List
)
"""
fastp --thread ${task.cpus} \
--qualified_quality_phred 20 \
--disable_length_filtering \
--detect_adapter_for_pe \
${params.fastp} \
--in1 ${reads[0]} \
--in2 ${reads[1]} \
--out1 ${pair_id}_R1_trim.fastq.gz \
--out2 ${pair_id}_R2_trim.fastq.gz \
--html ${pair_id}.html \
--json ${pair_id}_fastp.json \
--report_title ${pair_id}
"""
else
"""
fastp --thread ${task.cpus} \
--qualified_quality_phred 20 \
--disable_length_filtering \
--detect_adapter_for_pe \
${params.fastp} \
--in1 ${reads} \
--out1 ${pair_id}_trim.fastq.gz \
--html ${pair_id}.html \
--json ${pair_id}_fastp.json \
--report_title ${pair_id}
"""
}
process
fastp_accel_1splus
{
container
=
"${container_url}"
label
"big_mem_multi_cpus"
tag
"$pair_id"
publishDir
"results/QC/fastp/"
,
mode:
'copy'
,
pattern:
"*.html"
tag
"$file_prefix"
if
(
params
.
fastp_out
!=
""
)
{
publishDir
"results/${params.fastp_out}"
,
mode:
'copy'
}
input:
tuple
val
(
pair
_id
),
path
(
reads
)
tuple
val
(
file
_id
),
path
(
reads
)
output:
tuple
val
(
pair
_id
),
path
(
"*.fastq.gz"
),
emit:
fastq
tuple
val
(
pair
_id
),
path
(
"*.html"
),
emit:
html
tuple
val
(
pair
_id
),
path
(
"*.json"
),
emit:
report
tuple
val
(
file
_id
),
path
(
"*.fastq.gz"
),
emit:
fastq
tuple
val
(
file
_id
),
path
(
"*.html"
),
emit:
html
tuple
val
(
file
_id
),
path
(
"*.json"
),
emit:
report
script:
if
(
reads
instanceof
List
)
"""
fastp --thread ${task.cpus} \
--disable_quality_filtering \
--disable_length_filtering \
--disable_trim_poly_g \
--stdout \
--in1 ${reads[0]} \
--in2 ${reads[1]} \
--out1 ${pair_id}_R1_trim.fastq.gz \
--out2 ${pair_id}_R2_trim.fastq.gz | \
if
(
file_id
instanceof
List
){
file_prefix
=
file_id
[
0
]
}
else
{
file_prefix
=
file_id
}
if
(
reads
.
size
()
==
2
)
"""
fastp --thread ${task.cpus} \
--stdin \
--interleaved_in \
--trim_front1=10 \
--trim_front2=10 \
--qualified_quality_phred 20 \
--disable_length_filtering \
--detect_adapter_for_pe \
${params.fastp} \
--html ${pair_id}.html \
--json ${pair_id}_fastp.json \
--report_title ${pair_id}
"""
else
"""
fastp --thread ${task.cpus} \
--disable_quality_filtering \
--disable_length_filtering \
--disable_trim_poly_g \
--stdout \
--in1 ${reads[0]} \
--out1 ${pair_id}_R1_trim.fastq.gz \
--in1 ${reads[0]} \
--in2 ${reads[1]} \
--out1 ${file_prefix}_R1_trim.fastq.gz \
--out2 ${file_prefix}_R2_trim.fastq.gz \
--html ${file_prefix}.html \
--json ${file_prefix}_fastp.json \
--report_title ${file_prefix}
"""
else
if
(
reads
.
size
()
==
1
)
"""
fastp --thread ${task.cpus} \
--stdin \
--trim_front1=10 \
--qualified_quality_phred 20 \
--disable_length_filtering \
--detect_adapter_for_pe \
${params.fastp} \
--html ${pair_id}.html \
--json ${pair_id}_fastp.json \
--report_title ${pair_id}
"""
--in1 ${reads[0]} \
--out1 ${file_prefix}_trim.fastq.gz \
--html ${file_prefix}.html \
--json ${file_prefix}_fastp.json \
--report_title ${file_prefix}
"""
}
process
fastp_
pairedend
{
process
fastp_
accel_1splus
{
container
=
"${container_url}"
label
"big_mem_multi_cpus"
tag
"$pair_id"
publishDir
"results/QC/fastp/"
,
mode:
'copy'
,
pattern:
"*.html"
tag
"$file_prefix"
if
(
params
.
fastp_out
!=
""
)
{
publishDir
"results/${params.fastp_out}"
,
mode:
'copy'
}
input:
tuple
val
(
pair_id
),
path
(
reads
)
tuple
val
(
file_prefix
),
path
(
reads
)
output:
tuple
val
(
pair_id
),
path
(
"*.fastq.gz"
),
emit:
fastq
tuple
val
(
pair_id
),
path
(
"*.html"
),
emit:
html
tuple
val
(
pair_id
),
path
(
"*.json"
),
emit:
report
tuple
val
(
file_prefix
),
path
(
"*.fastq.gz"
),
emit:
fastq
tuple
val
(
file_prefix
),
path
(
"*.html"
),
emit:
html
tuple
val
(
file_prefix
),
path
(
"*.json"
),
emit:
report
script:
"""
fastp --thread ${task.cpus} \
--qualified_quality_phred 20 \
--disable_length_filtering \
--detect_adapter_for_pe \
${params.fastp_pairedend} \
--in1 ${reads[0]} \
--in2 ${reads[1]} \
--out1 ${pair_id}_R1_trim.fastq.gz \
--out2 ${pair_id}_R2_trim.fastq.gz \
--html ${pair_id}.html \
--json ${pair_id}_fastp.json \
--report_title ${pair_id}
"""
}
process
fastp_singleend
{
container
=
"${container_url}"
label
"big_mem_multi_cpus"
tag
"$pair_id"
publishDir
"results/QC/fastp/"
,
mode:
'copy'
,
pattern:
"*.html"
input:
tuple
val
(
pair_id
),
path
(
reads
)
output:
tuple
val
(
pair_id
),
path
(
"*.fastq.gz"
),
emit:
fastq
tuple
val
(
pair_id
),
path
(
"*.html"
),
emit:
html
tuple
val
(
pair_id
),
path
(
"*.json"
),
emit:
report
if
(
file_id
instanceof
List
){
file_prefix
=
file_id
[
0
]
}
else
{
file_prefix
=
file_id
}
script:
"""
fastp --thread ${task.cpus} \
--qualified_quality_phred 20 \
--disable_length_filtering \
--detect_adapter_for_pe \
${params.fastp_singleend} \
--in1 ${reads} \
--out1 ${pair_id}_trim.fastq.gz \
--html ${pair_id}.html \
--json ${pair_id}_fastp.json \
--report_title ${pair_id}
"""
if
(
reads
.
size
()
==
2
)
"""
fastp --thread ${task.cpus} \
--disable_quality_filtering \
--disable_length_filtering \
--disable_trim_poly_g \
--stdout \
--in1 ${reads[0]} \
--in2 ${reads[1]} \
--out1 ${file_prefix}_R1_trim.fastq.gz \
--out2 ${file_prefix}_R2_trim.fastq.gz | \
fastp --thread ${task.cpus} \
--stdin \
--interleaved_in \
--trim_front1=10 \
--trim_front2=10 \
--qualified_quality_phred 20 \
--disable_length_filtering \
--detect_adapter_for_pe \
${params.fastp} \
--html ${file_prefix}.html \
--json ${file_prefix}_fastp.json \
--report_title ${file_prefix}
"""
else
if
(
reads
.
size
()
==
1
)
"""
fastp --thread ${task.cpus} \
--disable_quality_filtering \
--disable_length_filtering \
--disable_trim_poly_g \
--stdout \
--in1 ${reads[0]} \
--out1 ${file_prefix}_R1_trim.fastq.gz \
fastp --thread ${task.cpus} \
--stdin \
--trim_front1=10 \
--qualified_quality_phred 20 \
--disable_length_filtering \
--detect_adapter_for_pe \
${params.fastp} \
--html ${file_prefix}.html \
--json ${file_prefix}_fastp.json \
--report_title ${file_prefix}
"""
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment