Pegasus for Single Cell Analysis
Pegasus is a tool for analyzing transcriptomes of millions of single cells. It is a command line tool, a python package and a base for Cloud-based analysis workflows.
Release Highlights in Current Stable
1.10.1 February 10, 2025
1.10.0 June 12, 2024
New Features
Add
pegasus.pseudo.get_original_DE_resultfunction to return the DE result as a Pandas DataFrame.Implement a new version of Dendrogram (PR 295):
It now uses Connection Specific Index (CSI) for the distance calculation.
A new function
calc_dendrogramto calculate the linkage, and store it indata.unsfield.A new function
plot_dendrogramto plot the dendrogram based on the linkage calculated.
For
deseq2function (PR 300, 304):It now has 2 backends:
pydeseq2by default, which uses Python package PyDESeq2;deseq2for R package DESeq2. Specify it inbackendparameter.Add
compute_allparameter to decide if applying DE analysis to all count matrices of the input pseudobulk data object, or only for the default count matrix.Add
alphaparameter o allow user choose significance level for independent filtering to calculate adjusted p-values.For
pydeseq2backend, it accepts inference on multiple contrasts in the same model.
Reorganize GSEA functions (PR 305):
Rename
fgseafunction togsea. The newgseafunction accepts two methods:gseapyto use GSEAPy’s prerank function, which is the default;fgseato use R package fgsea.Use parameter
rank_keyto specify which attribute in the DE result to be used as gene ranks/signatures.The number of threads
n_jobsis4by default.Rename
write_fgsea_results_to_excelfunction towrite_gsea_results_to_excel.
Improvement
Add
label_fontsizeparameter toplot_gseafunction to allow change label font size in GSEA plots.Improve
scatterfunction:Add
aspectparameter. By default it’saspect=autoto enforce square plots; set toaspect=equalfor the actual y to x axis ratio.
Improve
spatialfunction (PR 294):Now accepts non-Visium data, which may not have spatial images stored in
data.imgfield.Add parameter
aspect. Default isaspect=equalto plot the actual y to x axis ratio; set toaspect=autoto enforce square plots.Add parameter
margin_percentto set the image margin to the 4 sides.Add parameters
restrictions,show_backgroundandpalettes, which have the same behaviors as inscatterfunction.Add parameter
y_flipwith defaultTrue. This is for the case where y coordinates start from top, which needs a flip. Set toFalseif the spatial y-coordinates start from bottom.When plotting Visium data with no image background: set
resolution=Noneandy_flip=True.
For
pseudobulkfunction (` <(PR 300)>`_): rename parametersampletogroupby,clustertocondition; it returns aMultimodalDataobject, and does not write to the input data object.For
pegasus.pseudo.volcanofunction, addrank_byparameter to rank genes by log2 fold change (log2fc) or -log10(p-value) (neglog10p). This would affect the top gene names shown in the plots.Bug fix in plotting functions to work with Matplotlib v3.9+.
Add bimodality index to doublet detection (PR 307).