This repository hosts the code to reproduce the analysis steps for all technologies across all indications, including the visualization code for creating Figure and Supplementary Figures in our manuscript, titled
Transcriptome Analysis of Archived Tumor Tissues by Visium, GeoMx DSP, and Chromium Methods Reveals Inter- and Intra-Patient Heterogeneity.
To start with replicating our result, clone the repository to your working directory.
git clone https://github.com/bdsc-tds/mosaic_pilot_study.git
The computational environment can be recreated by installing the singularity container from the .def file. The R version we use for this workflow is 4.3.2, Bioconductor version 3.18, and renv is used to track specific versions of packages. Please find files related to renv in /reproducibility/r/metadata
, and use r.def
in /reproducibility/r
to build the corresponding container:
# Note: the current working directory is the root of this repo
cd reproducibility/r
singularity build --fakeroot --force /path/to/the/built/container r.def
The install time for this container on a regular computer or a computing cluster is approximately 2 hours with 8GB memory size. Launch the container from your terminal.
singularity shell --bind /scratch,/users,/work /path/to/container/environment.sif
For Visium deconvolution with cell2location, a separate conda environment was used and can be installed with:
conda env create -f /Owkin/C2L_code/env.yml
Activate the deconvolution environment:
conda activate cell2loc
The folder structure of this repository is detailed as follow
CHUV
├── Chromium
├── Visium
├── GeoMx
└── Manuscript_Figure
├── Figure 1 - 6
└── SuppFig
The analysis for each technology should be run in sequential order based on the naming of files. For bash files, only scripts titled main_.sh should be submitted as jobs to high computing clusters. Note that path to container should be modified in _.sh files. The computing time of each analysis step follows its method. For instance, as detailed in cell2location deconvolution, "a Visium sample with 4039 locations and 10241 genes should take about 17-40 minutes, depending on the computer's GPU hardware".
For visualization, the following code links are mapped to the creation of each figure/supplement figure.
Script | Figures |
---|---|
Data Characteristics (Code) | Fig. 1 |
Visium GeoMx Deconvolution Specificity (Code) | Fig. 2 |
Visium GeoMx Registration (Code) | Fig. 3 |
Visium Annotation Gallery (Code; Revision) | Fig. 4 a,b, g-i |
GeoMx Annotation Gallery (Code) | Fig. 4 c,d, g-i |
Visium GeoMx Pathology Deconvolution Heatmap (Code) | Fig. 4 e,f |
TLS in L1 Visium (Code) | Fig. 5 a |
TLS in L1 GeoMx (Code) | Fig. 5 a |
Intra-patient Heterogeneity in B3 Visium (Code; Revision) | Fig. 5 b,d |
Intra-patient Heterogeneity in B3 GeoMx (Code; Revision) | Fig. 5 c,e |
UpSet Plot (Code) | Fig. 5 f |
Inter-patient heterogeneity across all technologies (Code) | Fig. 6 |
Script | Supplementary Figures |
---|---|
Data Characteristics (Code) | Fig. S1 |
DV200 Blockage (Code) | Fig. S1 b-e |
Disease Biology Frequency (Code) | Fig. S2 |
Chromium UMAP (Code) | Fig. S3 |
Chromium Cell Type Frequency (Code) | Fig. S4 |
Chromium Dotplot (Code) | Fig. S4 dotplot |
GeoMx Descriptive (Code)) | Fig. S5 |
Visium Sample Gallery (Code) | Fig. S6 b,c; Fig. S7 a,b |
Visium GeoMx Immune Abundance (Code) | Fig. S7 c,d |
Visium Pathology Deconvolution Agreement (Code) | Fig. S8 a |
GeoMx Pathology Deconvolution Agreement (Code) | Fig. S8 b |
L1 GeoMx (Code) | Figs. S9 a |
L4 GeoMx (Code) | Figs. S9 b-c |
Visium Chromium Intra-patient heterogeneity (Code) | Figs. S9 d-f |
Visium UMAP by Sample (Code) | Figs. S10 |
Visium UMAP by Biology (Code) | Figs. S11 |
GeoMx TSNE Batch Effect (Code) | Figs. S12 |
Visium Integrated Annotation (Code) | Fig. S13 |
Ranked Gene Selection (Code) | Fig. S14 |
Visium Ridge Plot (Code) | Fig. S15 a,b |
GeoMx Ridge Plot (Code) | Fig. S15 c,d |
Decon Assisted Inter-patient heterogeneity across all technologies (Revision) | Fig. S15 e |