Closed vishnums007 closed 6 months ago
So we don't keep the metadata from the anndata besides those columns, since it might not be common, but you can add it back to the final object since the cells from each species are maintained in the same order as the anndata they come from, so you can safely match them to that metadata from the original object.
Okay, thank you for the swift response!
Hi, I would like to conserve few more information from the metadata of individual anndatas to the final AnnData after integration of both species. For e.g. Before integration Anndata obs had the following information
After loading the anndata zebrafish View of AnnData object with n_obs × n_vars = 81893 × 22744 obs: 'orig.ident', 'nCount_RNA', 'nFeature_RNA', 'percent.mt', 'nCount_SCT', 'nFeature_SCT', 'Timepoint', 'integrated_snn_res.0.4', 'seurat_clusters', 'pANN_0.25_0.29_4310', 'DF.classifications_0.25_0.29_4310', 'Coarse.Cluster.ID', 'Fine.Cluster.ID', 'Fine.Cluster.ID.Timepoint', 'Coarse.Cluster.ID.Timepoint', 'cell_type', 'species', 'species_type_label', 'truth_labels', 'ref_labels' var: 'features' After loading the anndata mouse View of AnnData object with n_obs × n_vars = 66428 × 17097 obs: 'orig.ident', 'nCount_RNA', 'nFeature_RNA', 'percent.mt', 'nCount_SCT', 'nFeature_SCT', 'Timepoint', 'integrated_snn_res.0.1', 'seurat_clusters', 'cell_type', 'merge.ident', 'species', 'species_type_label', 'truth_labels', 'ref_labels'
However, in the final anndata after saturn training, I have only the following information:
AnnData object with n_obs × n_vars = 148321 × 256 obs: 'labels', 'labels2', 'ref_labels', 'species' obsm: 'macrogenes'
I wanted to atleast include the Timepoint information in the final anndata. Is it possible?
My whole analysis code is given here
Thanks in advance, Vishnu