-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathSnakefile
More file actions
35 lines (28 loc) · 855 Bytes
/
Snakefile
File metadata and controls
35 lines (28 loc) · 855 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
include: "../common.smk"
configfile: "config.yml"
BASE_URL = "https://s3.embl.de/spatialdata/spatialdata-sandbox/{dataset}.zip"
rule all:
input:
[ (PROCESSED_DIR / f) for f in config['output'] ]
# Unzip the downloaded zip files
rule unzip_file:
input:
(RAW_DIR / "{dataset}.zip")
output:
directory(PROCESSED_DIR / "{dataset}.zarr")
shell:
"""
mkdir -p {RAW_DIR}/{wildcards.dataset} &&\
unzip {input} -d {RAW_DIR}/{wildcards.dataset} &&\
mv {RAW_DIR}/{wildcards.dataset}/data.zarr {PROCESSED_DIR}/{wildcards.dataset}.zarr
"""
# Download visium .zip file containing single-cell data.
rule download_data:
output:
(RAW_DIR / "{dataset}.zip")
params:
file_url=BASE_URL
shell:
'''
curl -L -o {output} {params.file_url}
'''