# list sample names & download URLs.
sample_links = {"ERR458493": "https://osf.io/5daup/download",
"ERR458494":"https://osf.io/8rvh5/download",
"ERR458495":"https://osf.io/2wvn3/download",
"ERR458500":"https://osf.io/xju4a/download",
"ERR458501": "https://osf.io/nmqe6/download",
"ERR458502": "https://osf.io/qfsze/download"}
# the sample names are dictionary keys in sample_links. extract them to a list we can use below
SAMPLES=sample_links.keys()
# download yeast rna-seq data from Schurch et al, 2016 study
rule download_all:
input:
expand("rnaseq/raw_data/{sample}.fq.gz", sample=SAMPLES)
# rule to download each individual file specified in sample_links
rule download_reads:
output: "rnaseq/raw_data/{sample}.fq.gz"
params:
# dynamically generate the download link directly from the dictionary
download_link = lambda wildcards: sample_links[wildcards.sample]
shell: """
curl -L {params.download_link} -o {output}
"""