API

Import CellNeighborEX:

import CellNeighborEX

Immediate neighbor detection

neighbors.create_dataframe(adata, coord_key, ...)

Create a DataFrame from the provided AnnData object.

neighbors.detect_neighbors(adata, coord_key, ...)

Detect the spatial neighbors using squidpy and retrieve the spatial connectivity matrix.

neighbors.calculate_closest_distance(df, save)

Calculate the closest distance between cells in the DataFrame.

neighbors.get_neighbors(matrix)

Calculate the number of neighbors for each cell.

neighbors.process_dataframe(df, matrix, ...)

Process the dataframe by adding additional columns based on the neighbor matrix and neighbor counts.

Cell type categorization

categorization.generate_input_files(...[, ...])

Generate input files for DEG analysis based on the given data.

Neighbor-dependent gene expression analysis

DEanalysis.two_sample_f_test(data1, data2)

Calculate the F-statistic and p-value for a two-sample F-test.

DEanalysis.create_nullmodel(seedNumber, ...)

Generate artificial heterotypic spots and computes normalized properties.

DEanalysis.find_nullDEGs(center_celltype, ...)

Find Null Differentially Expressed Genes (DEGs) based on the provided parameters.

DEanalysis.find_contactDEGs(data_type, ...)

Find differentially expressed genes (DEGs) related to cell-cell contacts.

DEanalysis.get_heatmap(data_type, ...)

Plot heatmaps for the given data.

DEanalysis.get_volcano_plot(df, data_type, ...)

Generate a volcano plot based on the input DataFrame.

DEanalysis.delete_files_with_keyword(...)

Delete files in the specified directory that contain the given keyword in their filenames.

DEanalysis.analyze_data(df_cell_id, ...[, root])

Function to perform neighbor-dependent gene expression analysis.

Spatial visualization

visualization.import_expdata(path)

Import expression data from CSV files in the specified directory.

visualization.set_parameters(df_processed, ...)

Set parameters for the processed DataFrame based on the expression data.

visualization.get_spatialPlot(df_bg, df_red, ...)

Generate a spatial plot using the provided DataFrames and parameters.