scanpy.datasets.pbmc3k_processed#
- scanpy.datasets.pbmc3k_processed()[source]#
Processed 3k PBMCs from 10x Genomics.
Processed using the basic tutorial Preprocessing and clustering 3k PBMCs (legacy workflow).
For preprocessing, cells are filtered out that have few gene counts or too high a
percent_mito. The counts are logarithmized and only genes marked byhighly_variable_genes()are retained. Theobsvariablesn_countsandpercent_mitoare corrected for usingregress_out(), and values are scaled and clipped byscale(). Finally,pca()andneighbors()are calculated.As analysis steps, the embeddings
tsne()andumap()are performed. Communities are identified usinglouvain()and marker genes usingrank_genes_groups().With
ScanpyV2Preview:no
raw:Xhas all genes (logarithmized, not scaled),.var["highly_variable"]marks the ones used for PCAembedding keys as written by the preset: no
X_prefix forobsmkeys,.varm["pca"]instead of.varm["PCs"],graph_frinstead ofdraw_graph_fr/draw_graphcell types in
.obs["cell_type"]instead of.obs["louvain"]leiden()clusters in.obs["leiden"]
- Return type:
- Returns:
Annotated data matrix.
Examples
>>> import scanpy as sc >>> sc.datasets.pbmc3k_processed() AnnData object with n_obs × n_vars = 2638 × 1838 obs: 'n_genes', 'percent_mito', 'n_counts', 'louvain' var: 'n_cells' uns: 'neighbors', 'pca', 'rank_genes_groups', 'draw_graph', 'louvain_colors', 'louvain' obsm: 'X_pca', 'X_tsne', 'X_umap', 'X_draw_graph_fr' varm: 'PCs' obsp: 'connectivities', 'distances' layers: None (.X)