[go: up one dir, main page]

Skip to content

Python package for interactive visualization of imaging-based spatial transcriptomics

License

Notifications You must be signed in to change notification settings

pkosurilab/BellaVista

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bella Vista

Bella Vista workflow

Bella Vista enables visualization of imaging-based spatial transcriptomics data. It is an open-source Python package currently supporting 10x Genomics Xenium, Vizgen MERSCOPE, and custom (home-built) MERFISH datasets, utilizing napari for interactive data exploration. We developed Bella Vista to help the spatial transcriptomics community explore their data and create reproducible paper-ready figures. For more information, see our documentation website.

Installation

The following instructions require that you have Anaconda installed.

  • In MacOS, run the following commands from the Terminal.
  • In Windows, run the following commands from the Anaconda Prompt.
  • Bella Vista requires Python 3.9 or above and is dependent on GPU for rendering.

Create and activate a new virtual environment:

conda create -n bellavista_env python
conda activate bellavista_env

Installation via pip:

pip install bellavista

Alternatively, you can install from GitHub:

conda install git
git clone https://github.com/pkosurilab/BellaVista
pip install -e BellaVista

Quickstart (with sample data)

Below is a short tutorial for loading Bella Vista with sample Xenium data.

  1. Download sample data: Xenium mouse brain dataset (Replicate 3)

    • To download the dataset, 10x Genomics may ask you to fill out a questionnaire.
    • Unzip the downloaded zip file. This will create a folder named "Xenium_V1_FF_Mouse_Brain_MultiSection_3_outs".
    • Take note of your local path to this folder, as you will need this path when running Bella Vista.

Xenium sample data website location

  1. Run Bella Vista from the command line with the Xenium sample data:

    • Note: Before running this command, replace "/path/to/" with the actual path to the Xenium sample data folder.
bellavista --xenium-sample /path/to/Xenium_V1_FF_Mouse_Brain_MultiSection_3_outs

Note

It will take a few minutes to create the required data files.


Once successfully loaded, you should see the message `Data Loaded!` in the terminal.

A napari window should appear displaying the data similar to the image below:

Initial napari load page


Tip

This is a large dataset, so if the program encounters a memory-related error, try visualizing a smaller subset of the data:

bellavista --xenium-sample-lite /path/to/Xenium_V1_FF_Mouse_Brain_MultiSection_3_outs

Now, you can interactively move around the napari canvas to explore the data!
Try zooming in & out, toggling layers on & off to see different spatial patterns:

zoom out screenshot zoom in screenshot zoom in cellbounds screenshot


Tip

To visualize a single layer, and hide all other layers, Option/Alt-click on the visibility button (the eye, to the left of the layer name).

Check out our FAQ on the documentation website for more tips!

Note

Gene colors are assigned randomly every time Bella Vista is launched. So, the gene colors displayed in your window will be different from the image above. Refer to our FAQ on the documentation website for information on how to configure gene colors and other customizable visualization options.

To reproduce the same colors every time you launch Bella Vista, refer to the figure guide on the documentation website.


For an exact reproduction of the screenshots above, please refer to the figure guide: Reproducing sample figures (Xenium) on the documentation website.

To run Bella Vista with your own data, refer to the tutorials on the documentation website.