ITADN

Count matrix: getting the celltypes

#191Openacycliq 创建于 2025-04-22
A
acycliqcommented
Hi! Thanks for developing this format. I am trying to get the expession matrix (rows the genes, columns the cell type) but havent figured out how to do this. ```python import loompy import numpy as np import pandas as pd filename = "l1_hippocampus.agg.loom" ds = loompy.connect(filename) ``` I can get the Genes from the row attributes: `ds.ra.Gene` however I am puzzled about the cell types. Is this meant to be under `ds.ca.AutoAnnotation`? I get a list of strings (length 74) like: `['@OL,COP', '@OL,OLIG', '@IEG,@OL,@VGLUT1,@XIN,DG-IGC,HC-CA1,HC-CA2,OLIG',....]`, some are duplicates. How can I get the cell tpes please? Thanks
0 条评论