Skip to content

Commit

Permalink
🚧 output group size table when using weighted sampling
Browse files Browse the repository at this point in the history
This makes it easier to inspect the effect of a prefilter rule.
  • Loading branch information
victorlin committed Nov 16, 2024
1 parent 90874b3 commit ce86db2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions workflow/snakemake_rules/main_workflow.smk
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,8 @@ rule subsample:
params:
group_by = _get_specific_subsampling_setting("group_by", optional=True),
group_by_weights = _get_specific_subsampling_setting("group_by_weights", optional=True),
# only set this if using group_by_weights
output_group_by_weights = lambda wildcards: f"--output-group-by-sizes results/{wildcards.build_name}/sizes-{wildcards.subsample}.tsv" if _get_subsampling_settings(wildcards).get("group_by_weights", False) else "",
sequences_per_group = _get_specific_subsampling_setting("seq_per_group", optional=True),
subsample_max_sequences = _get_specific_subsampling_setting("max_sequences", optional=True),
sampling_scheme = _get_specific_subsampling_setting("sampling_scheme", optional=True),
Expand Down Expand Up @@ -330,6 +332,7 @@ rule subsample:
{params.sequences_per_group} \
{params.subsample_max_sequences} \
{params.sampling_scheme} \
{params.output_group_by_weights} \
--output-strains {output.strains} 2>&1 | tee {log}
"""

Expand Down

0 comments on commit ce86db2

Please sign in to comment.