diff --git a/workflows/reference_files/2.4/reference_files_header.smk b/workflows/reference_files/2.4/reference_files_header.smk index 20479bd6..d2326396 100644 --- a/workflows/reference_files/2.4/reference_files_header.smk +++ b/workflows/reference_files/2.4/reference_files_header.smk @@ -173,16 +173,22 @@ for chrom_map_file in CHROM_MAPPINGS_FILES: rule download_genome_fasta: - output: + output: fasta = "downloads/genome_fasta/{genome_build}.fa" - log: + log: "downloads/genome_fasta/{genome_build}.fa.log" wildcard_constraints: genome_build = ".+(? {output.fasta} 2> {log}" + op.as_one_line(""" + if [ -e {params.path} ]; then + cat {params.path} > {output.fasta} 2> {log}; + else + curl -L {params.path} > {output.fasta} 2> {log}; + fi + """) rule download_masked_genome_fasta: output: