aertslab / SCENIC

SCENIC is an R package to infer Gene Regulatory Networks and cell types from single-cell RNA-seq data.
http://scenic.aertslab.org
GNU General Public License v3.0
394 stars 94 forks source link

✖ Column `features` doesn't exist. #394

Open hemantgujar opened 1 year ago

hemantgujar commented 1 year ago

Please explain what the bug is, and if possible, the steps to reproduce it. Error in dplyr::pull(): ! Can't extract columns that don't exist. ✖ Column features doesn't exist.

Providing a minimal example or a mini-dataset to reproduce the error will help a lot!

library(SCENIC)
data(list="motifAnnotations_mgi_v9", package="RcisTarget")
motifAnnotations_mgi <- motifAnnotations_mgi_v9
scenicOptions <- initializeScenic(org = "mgi", dbDir="mm9_databases")

Motif databases selected: mm9-500bp-upstream-7species.mc9nr.feather mm9-tss-centered-10kb-7species.mc9nr.feather [1] "The index column 'features' is not available in the file." [1] "The index column 'features' is not available in the file." Using the column 'motifs' as feature index for the ranking database. Error in dplyr::pull(): ! Can't extract columns that don't exist. ✖ Column features doesn't exist. Run rlang::last_trace() to see where the error occurred. Warning messages: 1: In initializeScenic(org = "mgi", dbDir = "mm9_databases") : It was not possible to load the following databses; check whether they are downloaded correctly: mm9-500bp-upstream-7species.mc9nr.feather mm9-tss-centered-10kb-7species.mc9nr.feather 2: In RcisTarget::importRankings(dbFile, columns = rnktype) : The following columns are missing from the database: features

rlang::last_trace() <error/vctrs_error_subscript_oob> Error in dplyr::pull(): ! Can't extract columns that don't exist. ✖ Column features doesn't exist.

Backtrace: ▆

  1. └─SCENIC::initializeScenic(org = "mgi", dbDir = "mm9_databases")
  2. └─SCENIC::checkAnnots(object, motifAnnot)
  3. └─base::lapply(...)
  4. └─SCENIC (local) FUN(X[[i]], ...)
  5. ├─dplyr::pull(nRnks, rnktype)
  6. └─dplyr:::pull.data.frame(nRnks, rnktype) Run rlang::last_trace(drop = FALSE) to see 17 hidden frames. rlang::last_trace(drop = FALSE) <error/vctrs_error_subscript_oob> Error in dplyr::pull(): ! Can't extract columns that don't exist. ✖ Column features doesn't exist.

    Backtrace: ▆

  7. ├─SCENIC::initializeScenic(org = "mgi", dbDir = "mm9_databases")
  8. │ └─SCENIC::checkAnnots(object, motifAnnot)
  9. │ └─base::lapply(...)
  10. │ └─SCENIC (local) FUN(X[[i]], ...)
  11. │ ├─dplyr::pull(nRnks, rnktype)
  12. │ └─dplyr:::pull.data.frame(nRnks, rnktype)
  13. │ └─tidyselect::vars_pull(names(.data), !!enquo(var))
  14. │ └─tidyselect:::pull_as_location2(...)
  15. │ ├─tidyselect:::with_subscript_errors(...)
  16. │ │ └─rlang::try_fetch(...)
  17. │ │ └─base::withCallingHandlers(...)
  18. │ └─vctrs::vec_as_location2(...)
  19. │ ├─vctrs:::result_get(...)
  20. │ └─vctrs:::vec_as_location2_result(...)
  21. │ ├─base::tryCatch(...)
  22. │ │ └─base (local) tryCatchList(expr, classes, parentenv, handlers)
  23. │ │ └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]])
  24. │ │ └─base (local) doTryCatch(return(expr), name, parentenv, handler)
  25. │ └─vctrs::vec_as_location(i, n, names = names, arg = arg, call = call)
  26. └─vctrs (local) <fn>()
  27. └─vctrs:::stop_subscript_oob(...)
  28. └─vctrs:::stop_subscript(...)
  29. └─rlang::abort(...)
weishwu commented 1 year ago

I have the same problem here. And many other people have reported this bug. One solution is to use the old version of the cistarget files: https://github.com/aertslab/SCENIC/issues/379

Rolling back to the 3.x version of R may also work, but then we will also have to use an older version of SCENIC. I really hope there can be a proper solution.

jwg054000 commented 8 months ago

Also having issues running this on R4.2 and above