pilotpy.tl.genes_importance

pilotpy.tl.genes_importance(adata, name_cell, col='Time_score', genes_index=[], p_value=0.05, max_iter_huber=100, epsilon_huber=1.35, x_lim=4, width=20, height=30, store_data=True, genes_interesting=[], modify_r2=False, model_type='HuberRegressor', fontsize=8, alpha=0.5, cmap='viridis', color_back=None, save_as_pdf=False, plot_genes=True, colnames=[], sample_col='sampleID', col_cell='cell_types', normalize=True)

Order genes based on estimated time and visualize gene importance.

Parameters

adataAnnData

Annotated data matrix containing gene expression data.

name_cellstr

Name of the cell type for which to analyze gene importance.

colstr, optional

Name of the time column, by default ‘Time_score’.

genes_indexlist, optional

Indices of genes in the data file, by default an empty list (use all genes).

p_valuefloat, optional

P-value for filtering the fitting models, by default 0.05.

max_iter_huberint, optional

Number of iterations for Huber model, by default 100.

epsilon_huberfloat, optional

Epsilon parameter for Huber model, by default 1.35.

x_limint, optional

Limit for x-axis in the plot, by default 4.

widthint, optional

Width of the plot, by default 20.

heightint, optional

Height of the plot, by default 30.

store_databool, optional

Whether to save the data, by default True.

genes_interestinglist, optional

List of interesting gene names, by default an empty list.

modify_r2bool, optional

Use modified R squared, by default False.

model_typestr, optional

Model type (‘HuberRegressor’ or ‘LinearRegression’), by default ‘HuberRegressor’.

fontsizeint, optional

Font size for labels and annotations, by default 8.

alphafloat, optional

Transparency level for plotting, by default 0.5.

cmapstr, optional

Colormap for plotting, by default ‘viridis’.

color_backstr, optional

Background color of the plot, by default None.

save_as_pdfbool, optional

Whether to save the plot as PDF, by default False.

plot_genesbool, optional

Whether to plot the gene importance, by default True.

colnameslist, optional

List of column names (for pathmics data), by default an empty list.

sample_colstr, optional

Name of the sample ID column, by default ‘sampleID’.

col_cellstr, optional

Name of the cell type column, by default ‘cell_types’.

normalize: bool, optional

Whether to normalize gene exp, by default True.

Returns

None

Visualizes and saves gene importance plots.