SCENIC icon indicating copy to clipboard operation
SCENIC copied to clipboard

✖ Column `features` doesn't exist.

Open beetlejuice007 opened this issue 1 year ago • 2 comments

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: ▆

  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)
  7. │ └─tidyselect::vars_pull(names(.data), !!enquo(var))
  8. │ └─tidyselect:::pull_as_location2(...)
  9. │ ├─tidyselect:::with_subscript_errors(...)
  10. │ │ └─rlang::try_fetch(...)
  11. │ │ └─base::withCallingHandlers(...)
  12. │ └─vctrs::vec_as_location2(...)
  13. │ ├─vctrs:::result_get(...)
  14. │ └─vctrs:::vec_as_location2_result(...)
  15. │ ├─base::tryCatch(...)
  16. │ │ └─base (local) tryCatchList(expr, classes, parentenv, handlers)
  17. │ │ └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]])
  18. │ │ └─base (local) doTryCatch(return(expr), name, parentenv, handler)
  19. │ └─vctrs::vec_as_location(i, n, names = names, arg = arg, call = call)
  20. └─vctrs (local) <fn>()
  21. └─vctrs:::stop_subscript_oob(...)
  22. └─vctrs:::stop_subscript(...)
    
  23.   └─rlang::abort(...)
    

beetlejuice007 avatar Apr 19 '23 18:04 beetlejuice007

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.

weishwu avatar Apr 26 '23 04:04 weishwu

Also having issues running this on R4.2 and above

jwg054000 avatar Oct 10 '23 22:10 jwg054000