From ce86db21c908ef33f0b22bd61b1c8944e3ab61f9 Mon Sep 17 00:00:00 2001 From: Victor Lin <13424970+victorlin@users.noreply.github.com> Date: Fri, 15 Nov 2024 18:04:28 -0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=A7=20output=20group=20size=20table=20?= =?UTF-8?q?when=20using=20weighted=20sampling?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This makes it easier to inspect the effect of a prefilter rule. --- workflow/snakemake_rules/main_workflow.smk | 3 +++ 1 file changed, 3 insertions(+) diff --git a/workflow/snakemake_rules/main_workflow.smk b/workflow/snakemake_rules/main_workflow.smk index 4b3f92f12..ddafd8652 100644 --- a/workflow/snakemake_rules/main_workflow.smk +++ b/workflow/snakemake_rules/main_workflow.smk @@ -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), @@ -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} """