Also see the release notes of
PCA plots can now annotate axes with variance explained PR 1470 bfurtwa
External tools (new)
External tools (changes)
Consistent fold-change, fractions calculation for filter_rank_genes_groups PR 1391 S Rybakov
Fixed bug where
score_geneswould error if one gene was passed PR 1398 I Virshup
log1pinplace on integer dense arrays PR 1400 I Virshup
PendingDeprecationWarning`s from use of `np.matrixPR 1424 P Weiler
Fixed indexing byg in
~scanpy.pp.highly_variable_genesPR 1456 V Bergen
Fix default number of genes for marker_genes_overlap PR 1464 MD Luecken
Fixed download path of
pbmc3k_processedPR 1472 D Strobl
Better error message when computing DE with a group of size 1 PR 1490 J Manning
Update cugraph API usage for v0.16 PR 1494 R Ilango
marker_gene_overlapdefault value for
top_n_markersPR 1464 MD Luecken
random_stateto RAPIDs UMAP PR 1474 C Nolet
Fixed the width of the progress bar when downloading data PR 1507 M Klein
Updated link for
moignard15dataset PR 1542 I Virshup
Fixed bug where calling
set_figure_paramscould block if IPython was installed, but not used. PR 1547 I Virshup
An overhauled tutorial → tutorial: plotting/core.
New plotting classes can be accessed directly (e.g.,
DotPlot) or using the
It is possible to plot log fold change and p-values in the
rank_genes_groups_dotplot()family of functions.
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
Legends can be removed.
groupbyparam can take a list of categories, e.g.,
groupby=[‘tissue’, ‘cell type’].
Added padding parameter to
stacked_violin. PR 1270
Added title for colorbar and positioned as in dotplot for
Improved the colorbar and size legend for dotplots. Now the colorbar and size have titles, which can be modified using the
size_titleparams. 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 modified, a grid can be added, and other modifications are enabled.
A 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.
The linewidth of the violin plots is thinner.
Removed the tics for the y-axis as they tend to overlap with each other. Using the style method they can be displayed if needed.
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
dendrogramfor scipy 1.5 PR 1290 S Rybakov
.rawto translate gene symbols if applicable PR 1278 E Rice
diffmap(issue 1262) G Eraslan
spring_projectissue 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