Also see the release notes of
This release includes several new visualization options and improvements after an
overhaul of the
stacked_violin functions (see PR 1210 F Ramirez).
In addition, the internals for the differential expression code were overhauled (
rank_genes_groups(), PR 1156 S Rybakov).
Plots are now a wrapper to classes that allow fine-tuning of the images by allowing more options. The classes can be accessed directly (eg.
DotPlot) or using the new
axparameter which allows embedding the plot in other images
Added option to include a bar plot instead of the dendrogram containing the cell/observation totals per category.
Return a dictionary of axes for further manipulation. This includes the main plot, legend and dendrogram to totals
Set a title to the image.
Legend can be removed
groupbycan be a list of categories. E.g.
groupby=[‘tissue’, ‘cell type’]
Added padding parameter to dotplot and stacked_violin to address PR 1270
Updated documentation and tutorial
Improved the colorbar and size legend for dotplots. Now the colorbar and size have titles, which can be modified using the colorbar_title and size_title arguments. They also align at the bottom of the image and do not shrink if the dotplot image is smaller.
Allow plotting genes in rows and categories in columns (
dot_edge_colorand line width can be set up, a grid added as well as several other features
New style was added in which the dots are replaced by an empty circle and the square behind the circle is colored (like in matrixplots).
violin colors can be colored based on average gene expression as in dotplots
made the linewidth of the violin plots smaller.
removed the tics for the y axis as they tend to overlap with each other. Using the style method they can be visualized if needed.
Other visualization changes
Added title for colorbar and positioned as in dotplot for
interpolationcan be passed as parameter for
Added highly variable gene selection strategy from Seurat v3 PR 1204 A Gayoso
Restrict sphinx version to < 3.1, > 3.0 PR 1297 I Virshup
Clean up _ranks and fix dendrogram for scipy 1.5 PR 1290 S Rybakov
Use raw to translate gene symbols if applicable PR 1278 E Rice
Fix diffmap (issue 1262) G Eraslan
Fix neighbors in spring_project issue 1260 S Rybakov
Bumped version requirement of
LinearOperatorissue 1246 I Virshup
1.5.0 release adds a lot of new functionality, much of which takes advantage of
0.7.0 - 0.7.2. Highlights of this release include support for spatial data, dedicated handling of graphs in AnnData, sparse PCA, an interface with scvi, and others.
Spatial data support
scanpy==1.4.5.post3 instead of
facecolor='white', useful for working in dark mode A Wolf
run neighbors on a GPU using rapids PR 850 T White
param docs from typed params P Angerer
Stopped deprecations warnings from AnnData
fractionis renamed to
max_fractionwith better docs A Wolf
params, which was temporarily broken in
Scanpy has a command line interface again. Invoking it with
scanpy somecommand [args]calls
scanpy-somecommand [args], except for builtin commands (currently
scanpy settings) PR 604 P Angerer
ebi_expression_atlas()allows convenient download of EBI expression atlas I Virshup
marker_gene_overlap()computes overlaps of marker genes M Luecken
filter_rank_genes_groups()filters out genes based on fold change and fraction of cells expressing genes F Ramirez
.layerssupport of scatter plots F Ramirez
fix double-logarithmization in compute of log fold change in
fix return sections of docs P Angerer
import scanpy as scinstead of
import scanpy.api as sc, see
a new plotting gallery for <no title> F Ramirez
Interactive exploration of analysis results through manifold viewers
CZI’s cellxgene directly reads
.h5adfiles the cellxgene developers
a fully distributed preprocessing backend T White and the Laserson Lab
RNA velocity in single cells [Manno18]
Scanpy and AnnData support loom’s layers so that computations for single-cell RNA velocity [Manno18] become feasible S Rybakov and V Bergen
scvelo harmonizes with Scanpy and is able to process loom files with splicing information produced by Velocyto [Manno18], it runs a lot faster than the count matrix analysis of Velocyto and provides several conceptual developments
There now is a section on imputation in external:
Plotting of Generic marker genes and quality control.
set_figure_params()by default passes
vector_friendly=Trueand allows you to produce reasonablly sized pdfs by rasterizing large scatter plots A Wolf
scatter()also plots along variables axis MD Luecken
regress_out()is back to multiprocessing F Ramirez
read()reads compressed text files G Eraslan
mitochondrial_genes()for querying mito genes FG Brundu
Upgrading to 1.0 isn’t fully backwards compatible in the following changes
the graph-based tools
paga()require prior computation of the graph:
sc.pp.neighbors(adata, n_neighbors=5); sc.tl.louvain(adata)instead of previously
conda install numba, which replaces cython
the default connectivity measure (dpt will look different using default settings) changed. setting
sc.pp.neighborsuses gauss kernel connectivities and reproduces the previous behavior, see, for instance in the example paul15.
namings of returned annotation have changed for less bloated AnnData objects, which means that some of the unstructured annotation of old AnnData files is not recognized anymore
replace occurances of
it is worth checking out the notebook examples to see changes, e.g. the seurat example.
upgrading scikit-learn from 0.18 to 0.19 changed the implementation of PCA, some results might therefore look slightly different
UMAP [McInnes18] can serve as a first visualization of the data just as tSNE, in contrast to tSNE, UMAP directly embeds the single-cell graph and is faster; UMAP is also used for measuring connectivities and computing neighbors, see
graph abstraction: AGA is renamed to PAGA:
paga(); now, it only measures connectivities between partitions of the single-cell graph, pseudotime and clustering need to be computed separately via
dpt(), the connectivity measure has been improved A Wolf
logistic regression for finding marker genes
louvain()provides a better implementation for reclustering via
scanpy no longer modifies rcParams upon import, call
settings.set_figure_paramsto set the ‘scanpy style’ A Wolf
default cache directory is
settings.cachedirto change this; nested directories in this are avoided A Wolf
downsample_counts()for downsampling counts MD Luecken
'X_diffmap'contains the zero component, plotting remains unchanged A Wolf
Initial release of the new trajectory inference method PAGA