Skip to content

Commit

Permalink
Only set fastp split_by_lines argument when needed
Browse files Browse the repository at this point in the history
  • Loading branch information
scwatts committed May 10, 2024
1 parent cae2c9e commit 95e4932
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion modules/local/fastp/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ process FASTP {
script:
def umi_extraction = umi_length > 0 ? '--umi --umi_loc per_read --umi_len ' + umi_length : ''

def split_by_lines_arg = max_fastq_records ? "--split_by_lines ${4 * max_fastq_records}" : ''

"""
# * do not apply trimming/clipping, already done in BCL convert
# * turn off all filtering
Expand All @@ -32,8 +34,8 @@ process FASTP {
--disable_length_filtering \\
--disable_adapter_trimming \\
--disable_trim_poly_g \\
--split_by_lines ${4 * max_fastq_records} \\
${umi_extraction} \\
${split_by_lines_arg} \\
--out1 ${meta.sample_id}_${meta.library_id}_${meta.lane}_R1.fastp.fastq.gz \\
--out2 ${meta.sample_id}_${meta.library_id}_${meta.lane}_R2.fastp.fastq.gz
Expand Down

0 comments on commit 95e4932

Please sign in to comment.