Skip to content

Commit

Permalink
Skip redundant combine and deduplicate script
Browse files Browse the repository at this point in the history
Now that the sequence sanitizer script has to handle duplicates anyway,
we no longer need to pipe its output to a separate script that does the
same thing. This commit also pipes output from the sanitizer script to
xz to speed up compression.
  • Loading branch information
huddlej committed May 27, 2021
1 parent 8970046 commit b387c79
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 82 deletions.
76 changes: 0 additions & 76 deletions scripts/combine-and-dedup-fastas.py

This file was deleted.

9 changes: 3 additions & 6 deletions workflow/snakemake_rules/main_workflow.smk
Original file line number Diff line number Diff line change
Expand Up @@ -349,19 +349,16 @@ rule combine_sequences_for_subsampling:
"benchmarks/combine_sequences_for_subsampling.txt"
conda: config["conda_environment"]
params:
warn_about_duplicates="--warn-about-duplicates" if config.get("combine_sequences_for_subsampling", {}).get("warn_about_duplicates") else "",
error_on_duplicate_strains="--error-on-duplicate-strains" if not config.get("combine_sequences_for_subsampling", {}).get("warn_about_duplicates") else "",
strain_prefixes=config["strip_strain_prefixes"],
shell:
"""
python3 scripts/sanitize_sequences.py \
--sequences {input} \
--strip-prefixes {params.strain_prefixes:q} \
{params.error_on_duplicate_strains} \
--output /dev/stdout \
| python3 scripts/combine-and-dedup-fastas.py \
--input /dev/stdin \
{params.warn_about_duplicates} \
--output /dev/stdout \
| xz -2 > {output}
| xz -c -2 > {output}
"""

rule index_sequences:
Expand Down

0 comments on commit b387c79

Please sign in to comment.