Skip to content

Commit

Permalink
updating heart and adipose workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
Gesmira committed Aug 26, 2022
1 parent e7901aa commit b0306a9
Show file tree
Hide file tree
Showing 6 changed files with 656,564 additions and 40 deletions.
2 changes: 2 additions & 0 deletions human_adipose/scripts/build_demo.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/usr/bin/env Rscript

# Script to build human adipose demo

library(Seurat)

args = commandArgs(trailingOnly=TRUE)
Expand Down
4 changes: 3 additions & 1 deletion human_adipose/scripts/build_reference.R
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
#!/usr/bin/env Rscript

# Script to build human adipose reference 1.0.0

library(Seurat)
library(SeuratDisk)
library(yaml)
library(tidyverse)
library(stringr)
library(Azimuth)
library(DoubletFinder)

args = commandArgs(trailingOnly=TRUE)
rna.path <- args[1]
Expand Down
31 changes: 25 additions & 6 deletions human_heart/Snakefile
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,12 @@ rule build_reference:
nature_cardio = "data/GSE183852_DCM_Integrated.Robj",
annotations = "data/celltype_annotations.csv"
output:
ref = "reference/ref.Rds",
idx = "reference/idx.annoy",
#ref = "reference/ref.Rds",
#idx = "reference/idx.annoy",
obj = "full_reference.Rds"
shell:
"""
Rscript {input.script} {input.science} {input.nature} {input.nature_cardio} {input.annotations} {output.ref} {output.idx} {output.obj}
Rscript {input.script} {input.science} {input.nature} {input.nature_cardio} {input.annotations} {output.obj}
"""
############################## Demo ######################################
rule download_demo:
Expand All @@ -70,13 +70,32 @@ rule download_demo:
rule build_demo:
input:
script = "scripts/build_demo.R",
demo = "data/demo/"
demo = "data/demo/healthy_human_4chamber_map_unnormalized_V4.h5ad"
output:
obj = "reference/demo.Rds"
shell:
"""
Rscript {input.script} {input.demo} {output.obj}
"""

############################## Explorer ########################################
rule export_zarr:
input:
ref = "reference/ref.Rds",
fullref = "full_reference.Rds",
script1 = "scripts/convert_to_h5ad.R",
script2 = "scripts/convert_to_zarr.py"
output:
h5Seurat = "vitessce/vitessce_ref.h5Seurat",
h5ad = "vitessce/vitessce_ref.h5ad",
zarr = directory("vitessce/vitessce_ref.zarr")
container:
"docker://satijalab/azimuth-references:vitessce"
shell:
"""
mkdir -p vitessce
Rscript {input.script1} {input.ref} {input.fullref} {output.h5Seurat}
python3 {input.script2} {output.h5ad} {output.zarr}
"""




Loading

0 comments on commit b0306a9

Please sign in to comment.