Skip to content

Commit

Permalink
fix: cache ref data (#348)
Browse files Browse the repository at this point in the history
* fix: cache ref data

* Update ref.smk
  • Loading branch information
FelixMoelder authored Jan 8, 2025
1 parent 3495239 commit 0cf0fa8
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions workflow/rules/ref.smk
Original file line number Diff line number Diff line change
Expand Up @@ -150,11 +150,12 @@ rule get_vep_plugins:

rule get_pangenome_haplotypes:
output:
temp(f"{pangenome_prefix}.vcf.gz"),
f"{pangenome_prefix}.vcf.gz",
params:
url=config["ref"]["pangenome"]["vcf"],
log:
"logs/pangenome/haplotypes.log",
cache: "omit-software"
shell:
"curl -o {output} {params.url} 2> {log}"

Expand All @@ -163,11 +164,12 @@ rule rename_haplotype_contigs:
input:
f"{pangenome_prefix}.vcf.gz",
output:
temp("resources/haplotype_contigs_renamed.tsv"),
"resources/haplotype_contigs_renamed.tsv",
params:
expressions=config["ref"]["pangenome"].get("rename_expressions", []),
log:
"logs/pangenome/chrom_replacement.log",
cache: "omit-software"
conda:
"../envs/pysam.yaml"
script:
Expand All @@ -179,9 +181,10 @@ rule rename_haplotype_chroms:
vcf="resources/{pangenome}.vcf.gz",
tsv="resources/haplotype_contigs_renamed.tsv",
output:
temp("resources/{pangenome}.renamed.vcf.gz"),
"resources/{pangenome}.renamed.vcf.gz",
log:
"logs/pangenome/{pangenome}_renamed.log",
cache: "omit-software"
conda:
"../envs/bcftools.yaml"
shell:
Expand Down

0 comments on commit 0cf0fa8

Please sign in to comment.