Error if no VirSorter results in AMR_MGE.R
If VirSorter
does not have any results then the script AMR_MGE.R
fails with an error:
Error: `f` must be a factor (or character vector or numeric vector).
This happens here:
Phage_prediction$VirSorter_prediction <- fct_explicit_na(Phage_prediction$VirSorter_prediction, na_level = "-")
Reason: Phage_prediction$VirSorter_prediction
contains only NA
s.