tanaylab / metacells

Metacells - Single-cell RNA Sequencing Analysis
MIT License
86 stars 8 forks source link

actual cells behind a metacell #21

Closed chansigit closed 2 years ago

chansigit commented 2 years ago

dear authors, can you please show me how i can get the actual cell barcodes behind a metacell?

orenbenkiki commented 2 years ago

Per-cell data is stored in the cells AnnData object. The per-cell barcode is typically in the cells_adata.obs_names property or possibly as a per-observation property (cells_adata.obs["something"]).

There is also a per-observation property (cells_adata.obs["metacell"]) which specifies for each cell the 0-based index of the metacell the cell belongs to (-1 for cells which do not belong to any metacell).