cole-trapnell-lab / garnett

Automated cell type classification
MIT License
107 stars 26 forks source link

Problem Description:As of igraph version 2.1.0, the outnei() function has been officially removed and replaced with .outnei(). #70

Open doczhangt opened 1 week ago

doczhangt commented 1 week ago

The train_cell_classifier() and check_markers() functions in the garnett package currently rely on the deprecated outnei() function from the igraph package. As of igraph version 2.1.0, the outnei() function has been officially removed and replaced with .outnei(). This causes the following error when running these Garnett functions:

Error: ! outnei() was deprecated in igraph 2.1.0 and is now defunct. ℹ Please use .outnei() instead. Backtrace:

  1. garnett::train_cell_classifier(...)
  2. igraph (local) outnei(curr_node)
    1. lifecycle::deprecate_stop("2.1.0", "outnei()", ".outnei()")
    2. lifecycle:::deprecate_stop0(msg) Proposed Solution: To address this issue, the source code of the garnett package needs to be updated. Specifically:

Functions like train_cell_classifier() and check_markers() should replace calls to outnei() with .outnei().

The affected lines of code should be identified within the Garnett source files and modified accordingly.

Example Fix: In the train_cell_classifier() function, any occurrence of:

outnei(curr_node) should be replaced with:

.outnei(curr_node) This change will make the garnett package compatible with igraph version 2.1.0 and later.

Temporary Workarounds: If modifying the Garnett source code is not feasible, users can:

Downgrade the igraph package to version 2.0.8 or earlier, where outnei() is still functional:

remove.packages("igraph") devtools::install_version("igraph", version = "2.0.8", repos = "http://cran.us.r-project.org") Wait for an official update to the garnett package that addresses this issue.