rnabioco / djvdj

An R package to analyze single-cell V(D)J data
https://rnabioco.github.io/djvdj
Other
23 stars 4 forks source link

warnings after new tidyselect #121

Closed jayhesselberth closed 1 year ago

jayhesselberth commented 1 year ago

There are lots of these warnings in the tests after new tidyselect:

Warning (test-filter-vdj.R:104): filter_vdj all cells filtered
Use of .data in tidyselect expressions was deprecated in tidyselect 1.2.0.
i Please use `".KEEP"` instead of `.data$.KEEP`
Backtrace:
  1. vdj_so %>% filter_vdj(chains == "BAD")
       at test-filter-vdj.R:104:2
  2. djvdj::filter_vdj(., chains == "BAD")
  4. dplyr:::select.data.frame(vdj, -.data$.KEEP)
  7. tidyselect::eval_select(expr(c(...)), .data)
  8. tidyselect:::eval_select_impl(...)
 12. tidyselect:::vars_select_eval(...)
 13. tidyselect:::walk_data_tree(expr, data_mask, context_mask)
 14. tidyselect:::eval_c(expr, data_mask, context_mask)
 15. tidyselect:::reduce_sels(node, data_mask, context_mask, init = init)
 16. tidyselect:::walk_data_tree(new, data_mask, context_mask)
 17. tidyselect:::expr_kind(expr, context_mask, error_call)
 18. tidyselect:::call_kind(expr, context_mask, error_call)
jayhesselberth commented 1 year ago

Removal of all .data$ use makes these warnings go away but creates a lot of new ones:

  .calc_freq: no visible binding for global variable ‘.freq’
    (/home/runner/work/djvdj/djvdj/check/djvdj.Rcheck/00_pkg_src/djvdj/R/calc-abundance.R:130-134)
  .calc_freq: no visible binding for global variable ‘.n_cells’
    (/home/runner/work/djvdj/djvdj/check/djvdj.Rcheck/00_pkg_src/djvdj/R/calc-abundance.R:130-134)
jayhesselberth commented 1 year ago

This is one strategy to eliminate the tidyselect warnings.

jayhesselberth commented 1 year ago

I see now that I misread the warning. Need to quote the data-variable ".KEEP".

i Please use `".KEEP"` instead of `.data$.KEEP`
sheridar commented 1 year ago

see #126 and #127