API

API#

Import Scanpy as:

import scanpy as sc

Note

Additional functionality is available in the broader ecosystem, with some tools being wrapped in the scanpy.external module.

Array type support#

Function

ndarray

csr_array

csr_matrix

csc_array

csc_matrix

scanpy.experimental.pp.highly_variable_genes()

scanpy.get.aggregate()

✅⚡

✅⚡

✅⚡

✅⚡

✅⚡

scanpy.pp.calculate_qc_metrics()

✅⚡

✅⚡

✅⚡

✅⚡

✅⚡

scanpy.pp.combat()

scanpy.pp.downsample_counts()

scanpy.pp.filter_cells()

✅⚡

✅⚡

✅⚡

✅⚡

✅⚡

scanpy.pp.filter_genes()

✅⚡

✅⚡

✅⚡

✅⚡

✅⚡

scanpy.pp.highly_variable_genes()

✅⚡

✅⚡

✅⚡

scanpy.pp.log1p()

✅⚡

✅⚡

✅⚡

✅⚡

✅⚡

scanpy.pp.neighbors()

scanpy.pp.normalize_total()

✅⚡

✅⚡

✅⚡

scanpy.pp.pca()

✅⚡

✅⚡

✅⚡

scanpy.pp.regress_out()

scanpy.pp.sample()

✅⚡

✅⚡

✅⚡

✅⚡

✅⚡

scanpy.pp.scale()

✅⚡

✅⚡

✅⚡

✅⚡

✅⚡

scanpy.pp.scrublet()

scanpy.pp.scrublet_simulate_doublets()

scanpy.tl.dendrogram()

scanpy.tl.diffmap()

scanpy.tl.dpt()

scanpy.tl.draw_graph()

scanpy.tl.embedding_density()

scanpy.tl.ingest()

scanpy.tl.leiden()

scanpy.tl.louvain()

scanpy.tl.paga()

scanpy.tl.rank_genes_groups()

scanpy.tl.tsne()

scanpy.tl.umap()