stereo.core.StPipeline¶
- class stereo.core.StPipeline(data)[source]¶
- __init__(data)[source]¶
A analysis tool sets for StereoExpData. include preprocess, filter, cluster, plot and so on.
- Parameters:
data (
Union[StereoExpData,AnnBasedStereoExpData]) – StereoExpData object.
Methods
__init__(data)A analysis tool sets for StereoExpData.
adjusted_rand_score(cluster_res_key_a, ...)Calculate Adjusted Rand index between two cluster results.
annotation(annotation_information[, ...])Set annotation to clusters.
batches_integrate([pca_res_key, res_key])integrate different experiments base on the pca result
cal_qc()Calculate the key indicators of quality control.
disksmooth_zscore([r, inplace, res_key])for each position, given a radius, calculate the z-score within this circle as final normalized value.
filter_by_clusters([cluster_res_key, ...])Filter cells based on clustering result.
filter_by_hvgs([hvg_res_key, filter_raw, ...])Filter genes based on the result of highly_variable_genes function.
filter_cells([min_gene, max_gene, ...])Filter cells based on counts or the numbers of genes expressed.
filter_coordinates([min_x, max_x, min_y, ...])Filter cells based on coordinate information.
filter_genes([min_cell, max_cell, ...])Filter genes based on the numbers of cells or counts.
filter_marker_genes([marker_genes_res_key, ...])Filters out genes based on log fold change and fraction of genes expressing the gene within and outside each group.
find_marker_genes(cluster_res_key[, method, ...])A tool to find maker genes.
gaussian_smooth([n_neighbors, ...])Smooth the express matrix by the algorithm of Gaussian smoothing [Shen22].
get_neighbors_res(neighbors_res_key)get the neighbor result by the key.
highly_variable_genes([groups, method, ...])Annotate highly variable genes, refering to Scanpy.
leiden([neighbors_res_key, res_key, ...])Cluster cells into subgroups by Leiden algorithm [Traag18].
log1p([inplace, res_key])Transform the express matrix logarithmically.
louvain([neighbors_res_key, res_key, ...])Cluster cells into subgroups by Louvain algorithm [Blondel08].
lr_score(lr_pairs[, distance, spot_comp, ...])calculate cci score for each LR pair and do permutation test
neighbors([pca_res_key, method, metric, ...])Compute a spatial neighborhood graph over all cells.
normalize_total([target_sum, inplace, res_key])Normalize total counts over all genes per cell such that each cell has the same total count after normalization.
pca([use_highly_genes, n_pcs, svd_solver, ...])Principal component analysis.
phenograph([phenograph_k, pca_res_key, ...])Cluster cells into subgroups by Phenograph.
quantile([inplace, res_key])Normalize the columns of X to each have the same distribution.
Save current data to
self.raw.reset_raw_data()Reset
self.datato the raw data saved inself.rawwhen you want data get raw expression matrix.scale([zero_center, max_value, inplace, res_key])Scale express matrix to unit variance and zero mean.
sctransform([n_cells, n_genes, filter_hvgs, ...])Normalization of scTransform, refering to Seurat [Hafemeister19].
silhouette_score(cluster_res_key[, metric, ...])Calculate the mean Silhouette Coefficient for a cluster result.
spatial_hotspot([use_highly_genes, ...])Identify informative genes or gene modules.
spatial_neighbors([neighbors_res_key, ...])Create a graph from spatial coordinates using Squidpy.
spatial_pattern_score([use_raw, res_key])calculate the spatial pattern score.
subset_by_hvg(hvg_res_key[, use_raw, inplace])get the subset by the result of highly variable genes.
umap([pca_res_key, neighbors_res_key, ...])Embed the neighborhood graph using UMAP [McInnes18].
Attributes
rawget the StereoExpData whose exp_matrix is raw count.