From e039cfbece24067318c38259c100ed9d3e19de77 Mon Sep 17 00:00:00 2001 From: Matthew Scott Tan Date: Fri, 29 Sep 2023 16:09:42 -0400 Subject: [PATCH 1/2] Work in Progress --- demos/cosmx_io/Snakefile | 0 demos/cosmx_io/config.yml | 2 ++ demos/mcmicro_io/Snakefile | 0 demos/merfish/Snakefile | 0 demos/mibitof/Snakefile | 0 demos/steinbock_io/Snakefile | 0 demos/toy/Snakefile | 34 +++++++++++++++++++++ demos/toy/config.yml | 2 ++ demos/visium/Snakefile | 0 demos/visium_associated_xenium_io/Snakefile | 34 +++++++++++++++++++++ demos/visium_io/Snakefile | 34 +++++++++++++++++++++ demos/xenium_rep1_io/Snakefile | 0 demos/xenium_rep2_io/Snakefile | 0 13 files changed, 106 insertions(+) create mode 100644 demos/cosmx_io/Snakefile create mode 100644 demos/cosmx_io/config.yml create mode 100644 demos/mcmicro_io/Snakefile create mode 100644 demos/merfish/Snakefile create mode 100644 demos/mibitof/Snakefile create mode 100644 demos/steinbock_io/Snakefile create mode 100644 demos/toy/Snakefile create mode 100644 demos/toy/config.yml create mode 100644 demos/visium/Snakefile create mode 100644 demos/visium_associated_xenium_io/Snakefile create mode 100644 demos/visium_io/Snakefile create mode 100644 demos/xenium_rep1_io/Snakefile create mode 100644 demos/xenium_rep2_io/Snakefile diff --git a/demos/cosmx_io/Snakefile b/demos/cosmx_io/Snakefile new file mode 100644 index 00000000..e69de29b diff --git a/demos/cosmx_io/config.yml b/demos/cosmx_io/config.yml new file mode 100644 index 00000000..750ff227 --- /dev/null +++ b/demos/cosmx_io/config.yml @@ -0,0 +1,2 @@ +output: +- combat_2022_cell.h5ad.zarr \ No newline at end of file diff --git a/demos/mcmicro_io/Snakefile b/demos/mcmicro_io/Snakefile new file mode 100644 index 00000000..e69de29b diff --git a/demos/merfish/Snakefile b/demos/merfish/Snakefile new file mode 100644 index 00000000..e69de29b diff --git a/demos/mibitof/Snakefile b/demos/mibitof/Snakefile new file mode 100644 index 00000000..e69de29b diff --git a/demos/steinbock_io/Snakefile b/demos/steinbock_io/Snakefile new file mode 100644 index 00000000..e69de29b diff --git a/demos/toy/Snakefile b/demos/toy/Snakefile new file mode 100644 index 00000000..f3b6dfcb --- /dev/null +++ b/demos/toy/Snakefile @@ -0,0 +1,34 @@ +include: "../common.smk" +configfile: "config.yml" + +# TODO: start from the real raw files +BASE_URL = "https://s3.embl.de/spatialdata/spatialdata-sandbox/toy.zip" + + +rule all: + input: + [ (PROCESSED_DIR / f) for f in config['output'] ] + + +# Unzip the downloaded zip files +rule unzip_file: + input: + (RAW_DIR / "toy.zip") + output: + directory(PROCESSED_DIR / "data.zarr") + shell: + """ + mkdir -p {output}\ + unzip {input} -d {output}\ + """ + +# Download visium .zip file containing single-cell data. +rule download_data: + output: + (RAW_DIR / "toy.zip") + params: + file_url=BASE_URL + shell: + ''' + curl -L -o {output} {params.file_url} + ''' diff --git a/demos/toy/config.yml b/demos/toy/config.yml new file mode 100644 index 00000000..bb7c92ad --- /dev/null +++ b/demos/toy/config.yml @@ -0,0 +1,2 @@ +output: +- data.zarr diff --git a/demos/visium/Snakefile b/demos/visium/Snakefile new file mode 100644 index 00000000..e69de29b diff --git a/demos/visium_associated_xenium_io/Snakefile b/demos/visium_associated_xenium_io/Snakefile new file mode 100644 index 00000000..89b1cb66 --- /dev/null +++ b/demos/visium_associated_xenium_io/Snakefile @@ -0,0 +1,34 @@ +include: "../common.smk" +configfile: "config.yml" + +# TODO: start from the real raw files +BASE_URL = "https://s3.embl.de/spatialdata/spatialdata-sandbox/visium_associated_xenium_io.zip" + + +rule all: + input: + [ (PROCESSED_DIR / f) for f in config['output'] ] + + +# Unzip the downloaded zip files +rule unzip_file: + input: + os.path.join("data", file_name) + output: + os.path.join("data", "visium_associated_xenium_io.zip") + shell: + """ + mkdir -p {output}\ + unzip {input} -d {output}\ + """ + +# Download visium .zip file containing single-cell data. +rule download_data: + output: + (RAW_DIR / "visium_associated_xenium_io.zip") + params: + file_url=H5AD_URL + shell: + ''' + curl -L -o {output} {params.file_url} + ''' diff --git a/demos/visium_io/Snakefile b/demos/visium_io/Snakefile new file mode 100644 index 00000000..a4d12ea4 --- /dev/null +++ b/demos/visium_io/Snakefile @@ -0,0 +1,34 @@ +include: "../common.smk" +configfile: "config.yml" + +# TODO: start from the real raw files +BASE_URL = "https://s3.embl.de/spatialdata/spatialdata-sandbox/visium_io.zip" + + +rule all: + input: + [ (PROCESSED_DIR / f) for f in config['output'] ] + + +# Unzip the downloaded zip files +rule unzip_file: + input: + os.path.join("data", file_name) + output: + os.path.join("data", "visium_io.zip") + shell: + """ + mkdir -p {output}\ + unzip {input} -d {output}\ + """ + +# Download visium .zip file containing single-cell data. +rule download_data: + output: + (RAW_DIR / "visium_io.zip") + params: + file_url=H5AD_URL + shell: + ''' + curl -L -o {output} {params.file_url} + ''' diff --git a/demos/xenium_rep1_io/Snakefile b/demos/xenium_rep1_io/Snakefile new file mode 100644 index 00000000..e69de29b diff --git a/demos/xenium_rep2_io/Snakefile b/demos/xenium_rep2_io/Snakefile new file mode 100644 index 00000000..e69de29b From f6e7ad539eaae2ee80b294d54ec1e2d7d9e9cd66 Mon Sep 17 00:00:00 2001 From: Matthew Scott Tan Date: Fri, 29 Sep 2023 16:37:16 -0400 Subject: [PATCH 2/2] Work in Progress --- demos/toy/Snakefile | 12 ++++++------ demos/toy/config.yml | 4 +++- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/demos/toy/Snakefile b/demos/toy/Snakefile index f3b6dfcb..7c70549d 100644 --- a/demos/toy/Snakefile +++ b/demos/toy/Snakefile @@ -2,7 +2,7 @@ include: "../common.smk" configfile: "config.yml" # TODO: start from the real raw files -BASE_URL = "https://s3.embl.de/spatialdata/spatialdata-sandbox/toy.zip" +BASE_URL = "https://s3.embl.de/spatialdata/spatialdata-sandbox/{dataset}.zip" rule all: @@ -13,19 +13,19 @@ rule all: # Unzip the downloaded zip files rule unzip_file: input: - (RAW_DIR / "toy.zip") + (RAW_DIR / "{dataset}.zip") output: - directory(PROCESSED_DIR / "data.zarr") + directory(PROCESSED_DIR / "{dataset}.zarr") shell: """ - mkdir -p {output}\ - unzip {input} -d {output}\ + unzip {input} -d data/processed &&\ + mv data/processed/data.zarr data/processed/{wildcards.dataset}.zarr """ # Download visium .zip file containing single-cell data. rule download_data: output: - (RAW_DIR / "toy.zip") + (RAW_DIR / "{dataset}.zip") params: file_url=BASE_URL shell: diff --git a/demos/toy/config.yml b/demos/toy/config.yml index bb7c92ad..02761117 100644 --- a/demos/toy/config.yml +++ b/demos/toy/config.yml @@ -1,2 +1,4 @@ output: -- data.zarr +- toy.zarr +- cosmx_io.zarr +- mcmicro_io.zarr