Closed geekbio closed 3 years ago
Hi @geekbio
If you update nichenetr now, you will be able to solve your issue. You can 1) define the name of your metadata column of interest instead of "celltype' as value of the new celltype_col
argument.
celltype_col = "new.ident" DE_table_all = Idents(ALL.integrated) %>% levels() %>% intersect(sender_celltypes) %>% lapply(get_lfc_celltype, seurat_obj = ALL.integrated, condition_colname = "type", condition_oi = condition_oi, condition_reference = condition_reference, celltype_col = celltype_col , expression_pct = 0.10) %>% reduce(full_join)
or 2) if your celltype identifiers are the identities of your seurat object, you can put that argument to NULL
DE_table_all = Idents(ALL.integrated) %>% levels() %>% intersect(sender_celltypes) %>% lapply(get_lfc_celltype, seurat_obj = ALL.integrated, condition_colname = "type", condition_oi = condition_oi, condition_reference = condition_reference, celltype_col = NULL, expression_pct = 0.10) %>% reduce(full_join)
Hi Developer,
DE_table_all = Idents(ALL.integrated) %>% levels() %>% intersect(sender_celltypes) %>% lapply(get_lfc_celltype, seurat_obj = ALL.integrated, condition_colname = "type", condition_oi = condition_oi, condition_reference = condition_reference, expression_pct = 0.10) %>% reduce(full_join) DE_table_all[is.na(DE_table_all)] = 0
Error: Cannot find 'celltype' in this Seurat object
In my seurat object no celltype column instead of the name is new.ident, so how can I specify in the script to look for new.ident rather than celltype. Please let me know. Thanks for your help.