API

Import pilotpy as:

import pilotpy

tools: tl

Trajectory & Clusters Analysis

tl.wasserstein_distance(adata[, emb_matrix, ...])

Calculate the Wasserstein (W) distance among samples using PCA representation and clustering information.

tl.cell_importance(adata[, width, height, ...])

Order cells based on estimated time and visualize cell type importance.

tl.genes_importance(adata, name_cell[, col, ...])

Order genes based on estimated time and visualize gene importance.

tl.gene_cluster_differentiation(adata[, ...])

Perform gene cluster differentiation analysis.

tl.results_gene_cluster_differentiation([...])

Retrieve and sort gene cluster statistics based on specified criteria.

tl.compute_diff_expressions(adata[, ...])

Using limma R package, lmFit fits a linear model using weighted least squares for each gene.

plot: pl

plots

pl.heatmaps(adata[, figsize, col_cluster, ...])

Plot heatmaps of cost matrix and Wasserstein distances.

pl.trajectory(adata[, n_evecs, epsilon, ...])

Find trajectories using Diffusion Maps and visualize the trajectory plot.

pl.fit_pricipla_graph(adata[, NumNodes, ...])

Fit an Elastic Principal Graph to the data and extract pseudotime information.

pl.go_enrichment(df[, num_gos, source, ...])

Perform Gene Ontology (GO) enrichment analysis and create a scatterplot of enriched terms.

pl.exploring_specific_genes([cluster_name, ...])

Explore specific genes within a cluster to analyze their patterns in comparison to other cell types.

pl.genes_selection_heatmap(adata, cell_type)

Parameters adata ad.AnnData DESCRIPTION. cell_type str DESCRIPTION. filter_table_feature str, optional DESCRIPTION. The default is 'R-squared'. filter_table_feature_pval str, optional DESCRIPTION. The default is 'adjusted P-value'. table_filter_thr float, optional DESCRIPTION. The default is 0.05. table_filter_pval_thr float, optional DESCRIPTION. The default is 0.05. cluster_method str, optional DESCRIPTION. The default is 'complete'. cluster_metric str, optional DESCRIPTION. The default is 'correlation'. scaler_value float, optional DESCRIPTION. The default is 0.4. cmap_color str, optional DESCRIPTION. The default is 'RdBu_r'. figsize tuple, optional DESCRIPTION. The default is (7, 9). fontsize int, optional DESCRIPTION. The default is 14. path_to_results str, optional DESCRIPTION. The default is 'Results_PILOT/'.

pl.plot_hallmark_genes_clusters(adata, cell_type)

Parameters adata ad.AnnData DESCRIPTION. cell_type str DESCRIPTION. gene_set_library str, optional DESCRIPTION. The default is 'MSigDB_Hallmark_2020'. cmap str, optional DESCRIPTION. The default is 'coolwarm'. font_size int, optional DESCRIPTION. The default is 14.

pl.plot_gene_list_pattern(gene_list, cell_type)

Parameters gene_list list DESCRIPTION. cell_type str DESCRIPTION. sample_col str, optional DESCRIPTION. The default is 'sampleID'. time_col str, optional DESCRIPTION. The default is 'Time_score'. path_to_results str, optional DESCRIPTION. The default is 'Results_PILOT/'. plot_color str, optional DESCRIPTION. The default is 'tab:orange'. points_color str, optional DESCRIPTION. The default is 'viridis'. fontsize TYPE, optional DESCRIPTION. The default is 14.