Cell type assignment in "coef"
Hello,
I have a very basic question!
After running the "init" and "optimize" steps, I obtain the coefficients with the deconvolve function:
ag.init(adata, celltype_key='Celltype')
ag.optimize(ngen=5000, nfeatures=400, seed=0, mode="fixed")
coef=ag.deconvolve(bulk_data, model="nnls")
coef doesn't contain headers or row names, and I was wondering how one can be sure which cell types and which samples correspond to which columns / rows?
I assume that, for the samples, the order will not change from the bulk's row names, but what about the different cell types? How can I assign names there?
Thank you!!
Hi Sarah, thanks for using our tool! Right, the order of the bulk samples don't change. The output of "ag.init" when you feed in anndata, contains the mean expressions of the cell type (centroids = ag.init(adata, celltype_key='Celltype')). The order of the cell types should be similar to that. Let me know if you have any more Qs.
Hi, Great, thank you very much for the prompt reply! No further question at the moment, thanks again.