xuranw / MuSiC

Multi-subject Single Cell Deconvolution
https://github.com/xuranw/MuSiC
GNU General Public License v3.0
220 stars 83 forks source link

creating expression sets from bulk and single cell RNA seq #60

Open KBoostan opened 3 years ago

KBoostan commented 3 years ago

I am trying to use GSE124872 to annotate bulk RNA seq data but I'm having trouble creating an expression set from both of them. For GSE124872, there is no actually cell type in the metadata that is covered, so I used a program called SingleR to manually give the different counts cell types. I'm very confused about how to make an expressionset of this scRNA seq data so that it includes the SingleR.label data. I looked at the code that discussed this before, specifically metadata <- data.frame(labelDescription= c("Sample ID", "Subject Name", "Cell Type ID", "Cell Type Name"), row.names=c("sampleID", "SubjectName", "cellTypeID", "cellType")) SC.eset = ExpressionSet(assayData = data.matrix(gene_exprs.matrix), phenoData = new("AnnotatedDataFrame", data = pheno.matrix, varMetadata = metadata) ). But I'm a little confused about all of these terms. Are the row.names supposed to be the column names in the metadata? Where do I get the phenodata from the data?Is the data.matrix just the raw counts from the Seurat data? Thanks!

KBoostan commented 3 years ago

Sorry I meant GSE122960!

complexgenome commented 3 years ago

@KBoostan - were you able to sort this?

nroak commented 2 years ago

I have the same issue. I can't use the methods described above to convert my Seurat object to the ExpressionSet object. It's unclear what the pheno.matrix and metadata matrices should be. I figured this out by using Seurat functions:

SeuratObject.es = ExpressionSet(assayData = as.matrix(GetAssayData(SeuratObject)), phenoData = new("AnnotatedDataFrame",SeuratObject@meta.data))