Skip to content

Commit

Permalink
Allow params to be passed to fastp separately for merged or paired pr…
Browse files Browse the repository at this point in the history
…ocessing
  • Loading branch information
zjnolen committed Feb 16, 2025
1 parent e41118e commit 6605810
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .test/config/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,8 @@ params:
clipoverlap:
clip_user_provided_bams: true
fastp:
extra: "-p -g" # don't put --merge or --overlap_len_require here, they're implicit
merged_extra: "-p -g" # don't put --merge or --overlap_len_require here, they're implicit
paired_extra: "-p -g"
min_overlap_hist: 20
bwa_aln:
extra: "-l 16500 -n 0.01 -o 2"
Expand Down
3 changes: 2 additions & 1 deletion config/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,8 @@ params:
clipoverlap:
clip_user_provided_bams: false
fastp:
extra: "-p -g" # don't put --merge or --overlap_len_require here, they're implicit
merged_extra: "-p -g" # don't put --merge or --overlap_len_require here, they're implicit
paired_extra: "-p -g"
min_overlap_hist: 30
bwa_aln:
extra: "-l 16500 -n 0.01 -o 2"
Expand Down
4 changes: 2 additions & 2 deletions workflow/rules/1.0_preprocessing.smk
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ rule fastp_mergedout:
benchmark:
"benchmarks/preprocessing/fastp/{sample}_{unit}_{lib}.merged.log"
params:
extra=lambda w: config["params"]["fastp"]["extra"]
extra=lambda w: config["params"]["fastp"]["merged_extra"]
+ f" --merge --overlap_len_require {config['params']['fastp']['min_overlap_hist']}",
threads: lambda wildcards, attempt: attempt * 2
resources:
Expand Down Expand Up @@ -87,7 +87,7 @@ rule fastp_pairedout:
benchmark:
"benchmarks/preprocessing/fastp/{sample}_{unit}_{lib}.paired.log"
params:
extra=lambda w: config["params"]["fastp"]["extra"],
extra=lambda w: config["params"]["fastp"]["paired_extra"],
threads: lambda wildcards, attempt: attempt * 2
resources:
runtime=lambda wildcards, attempt: attempt * 480,
Expand Down

0 comments on commit 6605810

Please sign in to comment.