Skip to content

Commit

Permalink
Provide the list of samples to weighted distances script
Browse files Browse the repository at this point in the history
  • Loading branch information
SeviJordi committed Sep 13, 2023
1 parent f8d28e7 commit c3e91f7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions workflow/rules/distances.smk
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ rule weighted_distances:
threads: 4
conda: "../envs/biopython.yaml"
params:
samples = expand("{sample}", sample = iter_samples()),
mask_class = ["mask"],
tsv_reference = OUTDIR/f"{OUTPUT_NAME}.ancestor.fasta",
reference = OUTDIR/"reference.fasta"
Expand Down
3 changes: 2 additions & 1 deletion workflow/scripts/weighted_distances.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,8 @@ def main():

logging.info("Reading input tables")
df = read_and_concatenate_tsvs(snakemake.input.tsv, reference, outgroup, outgroup_name)
cov_list = df["REGION"].unique().tolist()
cov_list = snakemake.params.samples
cov_list.append(outgroup_name)

logging.info(f"Parallelizing the calculation with {snakemake.threads} jobs")
freq = create_freq_dict(snakemake.input.tsv)
Expand Down

0 comments on commit c3e91f7

Please sign in to comment.