Skip to content

Commit

Permalink
Fix hafpipe merge samples script
Browse files Browse the repository at this point in the history
  • Loading branch information
lczech committed Dec 16, 2024
1 parent d520dbc commit a0ad0de
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions test/cases/hafpipe-2.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ founder-vcf: "" founder-vcf: "#BASEPATH#/test/reference/known-variants.vcf.gz"
snp-table-dir: "" snp-table-dir: "#BASEPATH#/test/snp-tables"
impmethod: "" impmethod: "simpute"
keep-intermediates: false keep-intermediates: true
make-merged-table: false make-merged-table: true
1 change: 1 addition & 0 deletions test/cases/hafpipe-4.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ snp-table-dir: "" snp-table-dir: "#BASEPATH#/test/snp-tables"
impmethod: "" impmethod: "my_method"
impute-script: "" impute-script: "../../packages/hafpipe-impute-example.sh"
keep-intermediates: false keep-intermediates: true
make-merged-table: false make-merged-table: true
4 changes: 2 additions & 2 deletions workflow/scripts/hafpipe-merge.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# sample or chromosome - except for the file name.
# Hence, our rules expect a certain fixed file naming scheme for these files, and this script
# here expects that same scheme.
# In particular, we expect "{sample}.merged.bam.{chrom}.afSite" for the samples,
# In particular, we expect "{sample}.bam.{chrom}.afSite" for the samples,
# and at least allow to set the base path, which for our case is "hafpipe/allele-frequencies".
# It is hence not terribily portable, but might still be useful for others as inspiration.
# There does not seem to be any other way, given that different use cases might want to handle
Expand Down Expand Up @@ -50,7 +50,7 @@ def get_afsite_path(sample, chrom):
raise Exception("Invalid sample " + sample)
if chrom not in snakemake.params.chroms:
raise Exception("Invalid chrom " + chrom)
return sample + ".merged.bam." + chrom + ".afSite"
return sample + ".bam." + chrom + ".afSite"


# -------------------------------------------------------------------------
Expand Down

0 comments on commit a0ad0de

Please sign in to comment.