Error: Can't subset columns that don't exist. x Column `PEP` doesn't exist.
0
0
Entering edit mode
3.4 years ago
yueli7 ▴ 250

Hello,

I worked on R environment of parsemsf package. I have no idea of this error.

Thank you in advance for your great help!

Best,

Yue

>library(parsemsf)

>area_table <- make_area_table("LD-CS-150113_OstromR_OR_AC2_enriched.msf")
Error: Can't subset columns that don't exist.

x Column `PEP` doesn't exist.

Run `rlang::last_error()` to see where the error occurred.
In addition: Warning messages:
1: `chr_along()` is deprecated as of rlang 0.2.0.
This warning is displayed once per session. 
2: `new_overscope()` is deprecated as of rlang 0.2.0.
Please use `new_data_mask()` instead.
This warning is displayed once per session. 
3: `overscope_eval_next()` is deprecated as of rlang 0.2.0.
Please use `eval_tidy()` with a data mask instead.
This warning is displayed once per session. 
4: `overscope_clean()` is deprecated as of rlang 0.2.0.
This warning is displayed once per session. 


> rlang::last_error()
<error/vctrs_error_subscript_oob>
Can't subset columns that don't exist.
x Column `PEP` doesn't exist.
Backtrace:
1. parsemsf::quantitate(...)
4. parsemsf::make_area_table(reps[[i]])
5. parsemsf::make_pep_table(msf_file, min_conf, prot_regex, collapse)
7. dplyr:::select_.grouped_df(...)
8. dplyr:::select.grouped_df(.data, !!!dots)
9. dplyr:::.select_grouped_df(.data, !!!enquos(...), notify = TRUE)
10. tidyselect::vars_select(tbl_vars(.data), !!!enquos(...))
11. tidyselect:::eval_select_impl(...)
19. tidyselect:::vars_select_eval(...)
20. tidyselect:::walk_data_tree(expr, data_mask, context_mask)
21. tidyselect:::eval_c(expr, data_mask, context_mask)
22. tidyselect:::reduce_sels(node, data_mask, context_mask, init = init)
23. tidyselect:::walk_data_tree(new, data_mask, context_mask)
24. tidyselect:::as_indices_sel_impl(...)
25. tidyselect:::as_indices_impl(x, vars, strict = strict)
26. tidyselect:::chr_as_locations(x, vars)
27. vctrs::vec_as_location(x, n = length(vars), names = vars)
29. vctrs:::stop_subscript_oob(...)
30. vctrs:::stop_subscript(...)
Run `rlang::last_trace()` to see the full context.


> rlang::last_trace()
<error/vctrs_error_subscript_oob>
Can't subset columns that don't exist.
x Column `PEP` doesn't exist.
Backtrace:
     █
  1. ├─parsemsf::quantitate(...)
  2. │ ├─`%>%`(...)
  3. │ └─parsemsf::make_area_table(reps[[i]])
  4. │   └─parsemsf::make_pep_table(msf_file, min_conf, prot_regex, collapse)
  5. │     ├─dplyr::select_(pep_table, .dots = setNames(old_names, new_names))
  6. │     └─dplyr:::select_.grouped_df(...)
  7. │       └─dplyr:::select.grouped_df(.data, !!!dots)
  8. │         └─dplyr:::.select_grouped_df(.data, !!!enquos(...), notify = TRUE)
  9. │           └─tidyselect::vars_select(tbl_vars(.data), !!!enquos(...))
 10. │             └─tidyselect:::eval_select_impl(...)
 11. │               ├─tidyselect:::with_subscript_errors(...)
 12. │               │ ├─base::tryCatch(...)
 13. │               │ │ └─base:::tryCatchList(expr, classes, parentenv, handlers)
 14. │               │ │   └─base:::tryCatchOne(expr, names, parentenv, handlers[[1L]])
 15. │               │ │     └─base:::doTryCatch(return(expr), name, parentenv, handler)
 16. │               │ └─tidyselect:::instrument_base_errors(expr)
 17. │               │   └─base::withCallingHandlers(...)
 18. │               └─tidyselect:::vars_select_eval(...)
 19. │                 └─tidyselect:::walk_data_tree(expr, data_mask, context_mask)
 20. │                   └─tidyselect:::eval_c(expr, data_mask, context_mask)
 21. │                     └─tidyselect:::reduce_sels(node, data_mask, context_mask, init = init)
 22. │                       └─tidyselect:::walk_data_tree(new, data_mask, context_mask)
 23. │                         └─tidyselect:::as_indices_sel_impl(...)
 24. │                           └─tidyselect:::as_indices_impl(x, vars, strict = strict)
 25. │                             └─tidyselect:::chr_as_locations(x, vars)
 26. │                               └─vctrs::vec_as_location(x, n = length(vars), names = vars)
 27. │                                 └─(function () ...
 28. │                                   └─vctrs:::stop_subscript_oob(...)
 29. │                                     └─vctrs:::stop_subscript(...)
 30. └─dplyr::mutate_(., .dots = setNames(list(i), c("tech_rep")))
software error • 5.4k views
ADD COMMENT
2
Entering edit mode

Please, avoid posting it on two different sites. Either choose the most appropriate, here or stackoverflow.

Also, what have you already tried? Can you show some data? The error is pretty clear!

ADD REPLY
0
Entering edit mode

@brunobsouzaa

Hello brunobsouzaa,

Thank you so much for your comments!

I think the error is the x Column PEP doesn't exist. Is that correct?

It is very strange to me that it works well on demo data, but not work well on my own data.

Thank you in advance for your great help!

Best,

Yue

ADD REPLY
1
Entering edit mode

That's correct. It's pointing to a column that doesn't exists in your file!

ADD REPLY
0
Entering edit mode

yueli7 : Please do not accept comments/answers that do not address your problem as posted in the original solution.

ADD REPLY

Login before adding your answer.

Traffic: 2845 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6