Top-level package for stLearn.
API¶
Import stLearn as:
import stlearn as st
Wrapper functions: wrapper¶
|
Read data from 10X. |
|
Read Old Spatial Transcriptomics data |
|
Read Slide-seq data |
|
Read MERFISH data |
|
Read SeqFish data |
|
Read Xenium data |
|
Create AnnData object for stLearn |
|
Add: add¶
|
Adding image data to the Anndata object |
|
Adding spatial information into the Anndata object |
|
Parsing the old spaital transcriptomics data |
|
Add significant Ligand-Receptor pairs into AnnData object |
|
Add label transfer results into AnnData object |
|
Adding annotation for cluster |
|
Adding label transfered from Seurat |
|
Adding binary mask image to the Anndata object |
|
Parsing the old spaital transcriptomics data |
|
Adding label transfered from Seurat |
Preprocessing: pp¶
|
Wrap function scanpy.pp.filter_genes |
|
Wrap function of scanpy.pp.log1p Copyright (c) 2017 F. |
|
Wrap function from scanpy.pp.log1p - normalize counts per cell. |
|
Wrap function of scanpy.pp.scale |
|
Compute a neighborhood graph of observations [McInnes18]. |
|
Tiling H&E images to small tiles based on spot spatial location. |
|
Extract latent morphological features from H&E images using pre-trained convolutional neural network base |
Embedding: em¶
|
Wrap function scanpy.pp.pca |
|
Wrap function scanpy.pp.umap |
|
FastICA: a fast algorithm for Independent Component Analysis. |
|
Factor Analysis (FA) A simple linear generative model with Gaussian latent variables. |
|
Diffusion Maps [Coifman05] [Haghverdi15] [Wolf18]. |
Spatial: spatial¶
|
Perform local cluster by using DBSCAN. |
|
Perform pseudotime analysis. |
Perform pseudo-time-space analysis with global level. |
|
Perform pseudo-time-space analysis with local level. |
|
Compare transition markers between two clades |
|
Transition markers detection of a clade. |
|
Transition markers detection of a branch. |
|
|
Automatically set the root index for trajectory analysis. |
|
SME normalisation: Using spot location information and tissue morphological features to correct spot gene expression |
|
Fill missing/zero expression values using spatial, morphological, and expression (SME) information when you what to correct for technical noise (dropouts) without altering existing biological signals. |
|
Improve spatial resolution by imputing (creating) new spots from existing ones using spatial, morphological, and expression (SME) information. |
|
Reduce technical noise by spatially smoothing all expression values using |
Tools: tl¶
|
Perform kmeans cluster for spatial transcriptomics data |
|
Wrap function scanpy.tl.leiden |
|
Loads inputted LR database, & concatenates into consistent database set of pairs without duplicates. |
|
Creates a new anndata representing a gridded version of the data; can be |
|
Performs stLearn LR analysis. |
|
Performs p-value adjustment and determination of significant spots. |
|
Runs a basic GO analysis on the genes in the top ranked LR pairs. |
|
Calls significant celltype-celltype interactions based on cell-type data randomisation. |
Plot: pl¶
|
QC plot for sptial transcriptomics data. |
|
Allows the visualization of a single gene or multiple genes as the values of dot points or contour in the Spatial transcriptomics array. |
|
|
|
Allows the visualization of a cluster results as the discretes values of dot points in the Spatial transcriptomics array. |
|
|
|
Allows the visualization of a subclustering results as the discretes values of dot points in the Spatial transcriptomics array. |
|
A wrap function to plot all the non-spatial plot from scanpy. |
|
Clustering plot for sptial transcriptomics data. |
|
mask plot for sptial transcriptomics data. |
|
Plotting the top LRs ranked by number of significant spots. |
|
Diagnostic plot looking at relationship between technical features of lrs and lr rank. |
|
Bar plot showing for each LR no. |
|
Plots the results from the LR GO analysis. |
|
Plots the per spot statistics for given LR. |
|
Creates different kinds of spatial visualisations for the LR analysis results. |
|
Checks relationship between no. |
|
Circular celltype-celltype interaction network based on LR-CCI analysis. |
|
Chord diagram of interactions between cell types. |
|
Heatmap of interaction counts. |
|
Heatmap visualising sender->receivers of cell type interactions. |
|
Plots the LR scores for significant spots interatively using Bokeh. |
Plots the significant CCI in the spatial context interactively using Bokeh. |
|
Global trajectory inference plot (Only DPT). |
|
Local spatial trajectory inference plot. |
|
Hierarchical tree plot represent for the global spatial trajectory inference. |
|
Plot transition marker. |
|
Differential expression between transition markers. |
Datasets: datasets¶
|
Processed Visium Spatial Gene Expression data from 10x Genomics’ database. |
|
Download and extract Xenium SGE data files. |