API#
Importing InSituPy#
import insitupy as isp
Individual submodules can then be imported like this:
isp.dataclasses
isp.io
isp.plotting
Core Data Objects#
Individual datasets#
|
InSituData class for managing and analyzing spatially resolved transcriptomics data. |
Read a saved InSituData object with:
|
Read an InSituData object from a specified folder. |
Handle multiple datasets#
A class to manage and analyze multiple spatially resolved single-cell transcriptomics experiments. |
Read a saved InSituExperiment project with:
|
Read an InSituExperiment object from a specified folder. |
To generate a new InSituExperiment object, either from a configurations file or from histological regions, following functions are available:
|
Create an InSituExperiment object from a configuration file. |
|
Creates an |
To concatenate multiple InSituExperiment objects:
|
Concatenate multiple InSituExperiment objects. |
Import data objects#
Import the data objects like this:
from insitupy import InSituData, InSituExperiment
Core Data Classes#
Data classes are used to store the different modalities.
Cellular data#
|
Data object containing an AnnData object and a boundary object which are kept in sync. |
Data object containing multiple CellData objects. |
|
|
Object to read and load boundaries of cells and nuclei. |
Image data#
|
Object to read and load images. |
Geometric data#
|
Object to store annotations. |
|
|
|
The different data classes can be read using following functions:
|
|
|
Read external data#
Following functions allow reading data from external sources, e.g. from an Xenium In Situ experiment or from QuPath. To read an individual dataset on can use following functions:
|
Load and process QuPath-exported spatial data into an |
|
Reads Xenium In Situ data from the specified directory. |
To read multiple datasets exported from QuPath into an InSituExperiment object, following functions can be used:
|
Load and process a full QuPath project directory into an |
Plotting#
Import the plotting submodule either as isp.plotting or isp.pl.
|
Plot spatial omics data with optional images, annotations, and regions. |
|
Plots the composition of cell types for specified regions or annotations. |
|
Plot cell abundance along a specified axis. |
|
Plot gene expression along a specified axis for selected cell types. |
|
Generate multi-panel volcano plots for differential expression results. |
|
|
|
Plots an overview table with metadata and quality control metrics. |