saeyslab / nichenetr

NicheNet: predict active ligand-target links between interacting cells
469 stars 117 forks source link

Error in DE analysis of each sender cell type #183

Closed sidrahmaryam-cyber closed 1 year ago

sidrahmaryam-cyber commented 1 year ago

Hello, When I am trying to run this chunk of code:

lapply(get_lfc_celltype, seurat_obj = mh, condition_colname = "lineage", condition_oi = condition_oi, condition_reference = condition_reference, expression_pct = 0.10, celltype_col = NULL) %>% reduce(full_join)

I am facing this error. Error in (function (classes, fdef, mtable) : unable to find an inherited method for function ‘reduce’ for signature ‘"list"’

I looked upon the solution and reason but could not find one. However, previously the whole code was working perfect. Can you please guide onto the issue and probable solution.

Thanks in advance.

P-G-Park commented 1 year ago

Please try

Idents(Seurat_obj) %>% levels() %>% intersect(sender_celltypes) %>% 
lapply(get_lfc_celltype, seurat_obj = mh, condition_colname = "lineage", condition_oi = condition_oi, condition_reference = condition_reference, expression_pct = 0.10, celltype_col = NULL) %>% reduce(full_join) 
csangara commented 1 year ago

Thank you @P-G-Park for the reply.

Did the fix work? If yes, I will close the issue.