saeyslab / multinichenetr

MultiNicheNet: a flexible framework for differential cell-cell communication analysis from multi-sample multi-condition single-cell transcriptomics data
GNU General Public License v3.0
107 stars 14 forks source link

Issue with abundance_expression_info, Error in `dplyr::pull()`: Caused by error: ! object 'ligand' not found #45

Closed 15013040212 closed 9 months ago

15013040212 commented 9 months ago

I ran get_abundance_expression_info() and encountered the debug below, I'm confused whether it's due to the dplyr package itself else. Thank you for your sincerely answer, I am looking forward to it urgently.

abundance_expression_info = get_abundance_expression_info(sce = sce, sample_id = sample_id, group_id = group_id, celltype_id = celltype_id, min_cells = min_cells, senders_oi = senders_oi, receivers_oi = receivers_oi, lr_network = lr_network, batches = batches) Error in dplyr::pull(): Caused by error: ! object 'ligand' not found Run rlang::last_trace() to see where the error occurred. There were 23 warnings (use warnings() to see them)

rlang::last_trace(drop = FALSE) <error/rlang_error> Error in dplyr::pull(): Caused by error: ! object 'ligand' not found

Backtrace: ▆

  1. ├─multinichenetr::get_abundance_expression_info(...)
  2. │ ├─base::suppressMessages(...)
  3. │ │ └─base::withCallingHandlers(...)
  4. │ └─multinichenetr::process_info_to_ic(...)
  5. │ └─lr_network %>% dplyr::pull(ligand) %>% unique()
  6. ├─base::unique(.)
  7. ├─dplyr::pull(., ligand)
  8. ├─dplyr:::pull.data.frame(., ligand)
  9. │ └─tidyselect::vars_pull(names(.data), !!enquo(var))
  10. │ ├─tidyselect:::with_chained_errors(...)
  11. │ │ └─rlang::try_fetch(...)
  12. │ │ ├─base::tryCatch(...)
  13. │ │ │ └─base (local) tryCatchList(expr, classes, parentenv, handlers)
  14. │ │ │ └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]])
  15. │ │ │ └─base (local) doTryCatch(return(expr), name, parentenv, handler)
  16. │ │ └─base::withCallingHandlers(...)
  17. │ └─rlang::eval_tidy(expr, set_names(seq_along(vars), vars))
  18. └─base::.handleSimpleError(...)
  19. └─rlang (local) h(simpleError(msg, call))
  20. └─handlers[1L]
  21. └─rlang::abort(msg, call = call, parent = cnd)
15013040212 commented 9 months ago

done. The ligand information is contained in lr_network, and I forgot to load it.