rki-mf1 / viruswarn-sc2

VirusWarn-SC2 is a simple Variants of concern aLert system script for Sars-CoV2. Doc https://rki-mf1.github.io/vocal-doc/
MIT License
5 stars 1 forks source link

R Error for only grey sequences #12

Closed chkirschbaum closed 1 month ago

chkirschbaum commented 1 month ago

If I run test with the 2022 dataset and only get grey sequences, the report can't be generated due to the following error:

Error in chr_as_locations(): ! Can't rename columns that don't exist. ✖ Column cluster_ID doesn't exist. Backtrace: ▆

  1. ├─... %>% rename(cluster_ID_in_alert_level = cluster_ID)
  2. ├─dplyr::rename(., cluster_ID_in_alert_level = cluster_ID)
  3. └─dplyr:::rename.data.frame(., cluster_ID_in_alert_level = cluster_ID)
  4. └─tidyselect::eval_rename(expr(c(...)), .data)
  5. └─tidyselect:::rename_impl(...)
  6. └─tidyselect:::eval_select_impl(...)
  7. ├─tidyselect:::with_subscript_errors(...)
  8. │ ├─base::tryCatch(...)
  9. │ │ └─base (local) tryCatchList(expr, classes, parentenv, handlers)
    1. │ │ └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]])
    2. │ │ └─base (local) doTryCatch(return(expr), name, parentenv, handler)
    3. │ └─tidyselect:::with_entraced_errors(expr)
    4. │ └─rlang::try_fetch(...)
    5. │ └─base::withCallingHandlers(...)
    6. └─tidyselect:::vars_select_eval(...)
    7. └─tidyselect:::walk_data_tree(expr, data_mask, context_mask, error_call)
    8. └─tidyselect:::eval_c(expr, data_mask, context_mask)
    9. └─tidyselect:::reduce_sels(node, data_mask, context_mask, init = init)
    10. └─tidyselect:::walk_data_tree(new, data_mask, context_mask)
    11. └─tidyselect:::as_indices_sel_impl(...)
    12. └─tidyselect:::as_indices_impl(x, vars, call = call, strict = strict)
    13. └─tidyselect:::chr_as_locations(x, vars, call = call)
    14. └─vctrs::vec_as_location(x, n = length(vars), names = vars)
    15. └─vctrs (local) <fn>()
    16. └─vctrs:::stop_subscript_oob(...)
    17. └─vctrs:::stop_subscript(...)
    18. └─rlang::abort(...) Ausführung angehalten
chkirschbaum commented 1 month ago

To clarify about data: This error occurs on the data from the folder test. If you run it with --year 2022, this error occurs. (all sequences are grey) If you run it with --year 2021, there is no error. (1 red sequence)

silenus092 commented 1 month ago

Thanks for the info. I will have a look

chkirschbaum commented 1 month ago

Works now fine for me, just merged branches! Thanks a lot