How to fetch an expression matrix with cell types from SingleCellExperiment to get a signature matrix for deconvolution
0
0
Entering edit mode
2.5 years ago
BlueSky ▴ 10

Hi! I'm using the "healthy.h5ad" file from the article: "Developmental cell programs are co-opted in inflammatory skin disease" found at https://zenodo.org/record/4569496. When I read the file into R with readH5AD(), I get a SingleCellExperiment object. From this object I want to retrieve a matrix consisting of genes as rows and cell types as columns, how do I do that from SingleCellExperiment objects in R? My goal is to use this as a signature matrix in CIBERSORT to do deconvolution of a bulk RNAseq dataset. The SingleCellExperiment data consists of 2219 genes and 195739 samples, the 195739 samples can be assigned into 34 different cell types. What I want is to first retrieve a matrix of the 2219 genes as rows and 195739 samples as column names with the expression values filled in the matrix, and then replace the 195739 sample names with the corresponding 34 cell type names, and then take the mean to only get 34 columns in order to have a signature matrix of 2219 genes and 34 cell types. Does anyone have suggestions for how to do that, or a suggestion for a better approach to reach my goal?

SingleCellExperiment signature-matrix deconvolution • 892 views
ADD COMMENT

Login before adding your answer.

Traffic: 2497 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6