Open koushik1989 opened 8 months ago
Hi koushik1989,
Thank you for your question. I think the error occurs because your cells are already grouped and thus the function group_cell returns NULL (i.e., data_MYDATA=NULL). In this case, you can skip group_cell and just run
nebula(count=exampledata$count,id=exampledata$id,pred=df_MYDATA[,c("Intercept)","Normal_0","Homozygous_0")],offset=exampledata$offset)
Best regards, Liang
On Sat, Mar 16, 2024 at 4:10 PM koushik1989 @.***> wrote:
Hi, I am trying to use nebula for a pairwise differential expression analysis between 2 cell types (lets say beta cells from "normal" and "homozygous" conditions. I have 9 samples in the seurat object and labels are stored in "Sample" column, cell types are kept as "seurat_clusters" and a column with celltype and zygosity kept in "cell.zygosity". I need to compare "Normal_0","Homozygous_0" for determining DE between these two cell types. Hence I ran the below codes.
exampledata <- scToNeb(obj = clones_9_merged_integrated_DE_PREP, assay = "RNA", id = "Sample", pred = c("cell.zygosity"), offset="nCount_RNA")
df_MYDATA = model.matrix(~cell.zygosity, data=exampledata$pred) data_MYDATA = group_cell(count=exampledata$count,id=exampledata$id,pred=df_MYDATA[,c("Intercept)","Normal_0","Homozygous_0")],offset=exampledata$offset)
RESULTS_MYDATA = nebula(data_MYDATA$count,data_MYDATA$id,pred=data_MYDATA$pred,offset=data_MYDATA$offset)
I get the following warning when I run group_cell and the file is empty.
"The cells are already grouped."
The final error I receive when running nebula is
"Error in as(count, "dgCMatrix") : no method or default for coercing “NULL” to “dgCMatrix”"
Please guide me through this workflow. Thank you
— Reply to this email directly, view it on GitHub https://github.com/lhe17/nebula/issues/45, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGDISUVLPL6OWW5GABAGHYLYYSRLXAVCNFSM6AAAAABEZSEYUCVHI2DSMVQWIX3LMV43ASLTON2WKOZSGE4TAMRSHA2TANY . You are receiving this because you are subscribed to this thread.Message ID: @.***>
Hi, I am trying to use nebula for a pairwise differential expression analysis between 2 cell types (lets say beta cells from "normal" and "homozygous" conditions. I have 9 samples in the seurat object and labels are stored in "Sample" column, cell types are kept as "seurat_clusters" and a column with celltype and zygosity kept in "cell.zygosity". I need to compare "Normal_0","Homozygous_0" for determining DE between these two cell types. Hence I ran the below codes.
exampledata <- scToNeb(obj = clones_9_merged_integrated_DE_PREP, assay = "RNA", id = "Sample", pred = c("cell.zygosity"), offset="nCount_RNA")
df_MYDATA = model.matrix(~cell.zygosity, data=exampledata$pred) data_MYDATA = group_cell(count=exampledata$count,id=exampledata$id,pred=df_MYDATA[,c("Intercept)","Normal_0","Homozygous_0")],offset=exampledata$offset)
RESULTS_MYDATA = nebula(data_MYDATA$count,data_MYDATA$id,pred=data_MYDATA$pred,offset=data_MYDATA$offset)
I get the following warning when I run group_cell and the file is empty.
"The cells are already grouped."
The final error I receive when running nebula is
"Error in as(count, "dgCMatrix") : no method or default for coercing “NULL” to “dgCMatrix”"
Please guide me through this workflow. Thank you