Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ https://doi.org/10.5281/zenodo.11120922
To download:

```
cd ~/xenium_benchmark
cd ~/benchmark-spatial-transcriptomics
bash download_data.sh
```

Expand All @@ -26,7 +26,7 @@ This will place the data at `data/example_spinal_chord_inactive/`. If that folde
If automatic download fails, download `example_spinal_chord_inactive.zip` manually from the link above and extract it into `data/`.

## Setup
Clone this repository along with the origianl Xenium benchmarking pipeline:
Clone this repository along with the original Xenium benchmarking pipeline:

```
git clone --recurse-submodules https://github.com/CBDatCMU/benchmark-spatial-transcriptomics.git
Expand All @@ -36,6 +36,11 @@ cd benchmark-spatial-transcriptomics
Install the conda environment:

```
# Make sure that the current shell session is able to use conda
# This must be run once per login session.
source ~/miniconda3/etc/profile.d/conda.sh

# create and activate the conda environment
conda env create --file Xenium_benchmarking/xenium_benchmarking.yml --prefix ./envs/xb
conda activate ./envs/xb
pip install -e Xenium_benchmarking/
Expand All @@ -48,7 +53,7 @@ pip install -e Xenium_benchmarking/
sbatch submit_xenium.sh

# Run directly
cd ~/xenium_benchmark
cd ~/benchmark-spatial-transcriptomics
conda activate ~/xenium_benchmark/envs/xb
python run_xenium_benchmark.py
```
Expand Down
11 changes: 6 additions & 5 deletions run_xenium_benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

import os
import sys

# ── Banksy submodule path ──────────────────────────────────────────────────────
_repo = os.path.dirname(os.path.abspath(__file__))
sys.path.insert(0, os.path.join(_repo, 'Xenium_benchmarking'))
sys.path.insert(0, os.path.join(_repo, 'Xenium_benchmarking', 'Banksy_py'))

import time
import logging
import numpy as np
Expand All @@ -13,11 +19,6 @@
import matplotlib.pyplot as plt
import squidpy as sq

# ── Banksy submodule path ──────────────────────────────────────────────────────
banksy_path = os.path.join(os.path.expanduser('~'), 'xenium_benchmark', 'Xenium_benchmarking', 'Banksy_py')
if banksy_path not in sys.path:
sys.path.insert(0, banksy_path)

# ── xb package imports ─────────────────────────────────────────────────────────
from xb.formatting import *
from xb.plotting import *
Expand Down