diff --git a/workflow/rules/fastp.smk b/workflow/rules/fastp.smk index 6f7706f..58348a2 100644 --- a/workflow/rules/fastp.smk +++ b/workflow/rules/fastp.smk @@ -12,6 +12,10 @@ rule fastp: reverse_out="results/fastp/hic_trim_2.fastq.gz", json="results/fastp/hic_report_fastp.HiC.json", html="results/fastp/hic_report_fastp.HiC.html", + params: + optional_params=" ".join( + f"{k} {v}" for k, v in config["fastp"]["optional_params"].items() if v + ), threads: config["medium"]["t"] log: "logs/fastp.log", @@ -21,5 +25,5 @@ rule fastp: "../envs/fastp.yaml" shell: """ - fastp -p -i {input.forward_in} -I {input.reverse_in} -o {output.forward_out} -O {output.reverse_out} --cut_front --cut_front_window_size 5 --detect_adapter_for_pe --json {output.json} --html {output.html} --thread {threads} >> {log} 2>&1 + fastp -p -i {input.forward_in} -I {input.reverse_in} -o {output.forward_out} -O {output.reverse_out} --detect_adapter_for_pe --json {output.json} --html {output.html} --thread {threads} {params.optional_params} >> {log} 2>&1 """