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.5.0 March 9, 2022¶
New Features
Spatial data analysis:
Enable
pegasus.read_inputfunction to load 10x Visium data: setfile_type="visium"option.Add
pegasus.spatialfunction to generate spatial plot for 10x Visium data.Add Spatial Analysis Tutorial in Tutorials.
Pseudobulk analysis: see summary
Add
pegasus.pseudobulkfunction to generate pseudobulk matrix.Add
pegasus.deseq2function to perform pseudobulk differential expression (DE) analysis, which is a Python wrapper of DESeq2.Requires rpy2 and the original DESeq2 R package installed.
Add
pegasus.pseudo.markers,pegasus.pseudo.write_results_to_excelandpegasus.pseudo.volcanofunctions for processing pseudobulk DE results.Add Pseudobulk Analysis Tutorial in Tutorials.
Add
pegasus.fgseafunction to perform Gene Set Enrichment Analysis (GSEA) on DE results and plotting, which is a Python wrapper of fgsea.Requires rpy2 and the original fgsea R package installed.
API Changes
Function
correct_batch, which implements the L/S adjustment batch correction method, is obsolete. We recommend usingrun_harmonyinstead, which is also the default of--correct-batch-effectoption inpegasus clustercommand.pegasus.highly_variable_featuresallows specify custom attribute key for batches (batchoption), and thus removeconsider_batchoption. To select HVGs without considering batch effects, simply use the default, or equivalently usebatch=Noneoption.Add
distoption topegasus.neighborsfunction to allow use distance other than L2. (Contribution by hoondy in PR 233)Available options:
l2for L2 (default),ipfor inner product, andcosinefor cosine similarity.
The kNN graph returned by
pegasus.neighborsfunction is now stored inobsmfield of the data object, no longer inunsfield. Moreover, the kNN affinity matrix is stored inobspfield.
Improvements
Adjust
pegasus.write_outputfunction to work with Zarr v2.11.0+.