Skip to content

Commit

Permalink
support fastp --dedup
Browse files Browse the repository at this point in the history
  • Loading branch information
alienzj committed Aug 19, 2022
1 parent 2e5bcec commit bf2e910
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 2 additions & 0 deletions metapi/config/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ params:
cut_right_mean_quality: 20
length_required: 51
n_base_limit: 5
dedup: False
dup_calc_accuracy: 3 # [1, 2, 3, 4, 5, 6] # only used when dedup: True

rmhost:
host_fasta: "/home/jiezhu/databases/genomics/human/CHM13/chm13v2.0_plusY/chm13v2.0.fa"
Expand Down
8 changes: 7 additions & 1 deletion metapi/rules/trimming.smk
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,9 @@ if config["params"]["trimming"]["fastp"]["do"]:
length_required = config["params"]["trimming"]["fastp"]["length_required"],
n_base_limit = config["params"]["trimming"]["fastp"]["n_base_limit"],
use_slide_window = "yes" if config["params"]["trimming"]["fastp"]["use_slide_window"] else "no",
pe = "pe" if IS_PE else "se"
pe = "pe" if IS_PE else "se",
dedup = f'''--dedup --dup_calc_accuracy {config["params"]["trimming"]["fastp"]["dup_calc_accuracy"]}''' \
if config["params"]["trimming"]["fastp"]["dedup"] else ""
log:
os.path.join(config["output"]["trimming"], "logs/{sample}.fastp.log")
benchmark:
Expand All @@ -141,6 +143,7 @@ if config["params"]["trimming"]["fastp"]["do"]:
--out2 {output.reads[1]} \
--compression {params.compression} \
{ADAPTER_OPERATION} \
{params.dedup} \
--cut_front \
--cut_right \
--cut_front_window_size {params.cut_front_window_size} \
Expand All @@ -160,6 +163,7 @@ if config["params"]["trimming"]["fastp"]["do"]:
--out2 {output.reads[1]} \
--compression {params.compression} \
{ADAPTER_OPERATION} \
{params.dedup} \
--cut_front \
--cut_tail \
--cut_front_window_size {params.cut_front_window_size} \
Expand All @@ -180,6 +184,7 @@ if config["params"]["trimming"]["fastp"]["do"]:
--out1 {output.reads[0]} \
--compression {params.compression} \
{ADAPTER_OPERATION} \
{params.dedup} \
--cut_front \
--cut_right \
--cut_front_window_size {params.cut_front_window_size} \
Expand All @@ -197,6 +202,7 @@ if config["params"]["trimming"]["fastp"]["do"]:
--out1 {output.reads[0]} \
--compression {params.compression} \
{ADAPTER_OPERATION} \
{params.dedup} \
--cut_front \
--cut_tail \
--cut_front_window_size {params.cut_front_window_size} \
Expand Down

0 comments on commit bf2e910

Please sign in to comment.