SMURFΒΆ

Import SMURF as:

import smurf as su

calculate_weight_to_celltype

Calculates the weight matrix mapping cell types to gene expression profiles.

expanding_cells

Expands cell regions by iteratively adding neighboring spots based on a scoring criterion.

get_finaldata

Combines cell and spot data after optimization to generate the final single-cell dataset.

get_finaldata_fast

Quickly generates the final single-cell dataset by combining cell and spot data without using GPU resources.

itering_arragement

Performs iterative cell arrangement for spatial transcriptomics analysis.

make_pixels_cells

Assigns cells to pixels in the spatial data based on spot compositions.

make_preparation

Prepares data for optimization by organizing cells and spots, calculating weights, and grouping cells for computational efficiency.

nuclei_rna

Creates an AnnData object for nuclei by aggregating spot-level gene expression data.

plot_cellcluster_position

Plots the spatial distribution of cell clusters and individual cell types.

plot_results

Plots the original tissue image with cell type assignments overlayed.

prepare_dataframe_image

Prepares the spatial data object by mapping tissue image data to spot positions.

return_celltype_plot

Generates a cell type assignment array based on clustering results for visualization.

singlecellanalysis

Performs standard single-cell RNA-seq analysis, including preprocessing, dimensionality reduction, clustering, and visualization.

start_optimization

Starts the optimization process to estimate cell-type proportions in each spot using PyTorch.