It seems like the gsub breaks the file path and plot_scatter() can no longer find the original site_info file. This only occurs when running run_HMM() due to the gsub.
It first didn't work when calling a symlink for site_info, but managed to reproduce this error without symlinks when site_info is a .sitelh file.
[1] "# Loading input files"
[1] "# Initialising HMM"
[1] "Model 4 - 3 additional emission for constant site, non-informative sites and same parsimony"
[1] "The probability of these addtional emissions is equal for all classes"
[1] "Sites emitted from each class"
seq
E1 E2 E3 E4
550 1187 2944 319
[1] "# Training HMM"
[1] "# Running viterbi algorithm"
[1] "# Making alignment plot"
Error in if (file.info(input_filepath)$size > 1e+05) { :
missing value where TRUE/FALSE needed
It seems like the
gsub
breaks the file path andplot_scatter()
can no longer find the originalsite_info
file. This only occurs when runningrun_HMM()
due to thegsub
.It first didn't work when calling a symlink for
site_info
, but managed to reproduce this error without symlinks when site_info is a.sitelh
file.https://github.com/roblanf/MixtureModelHMM/blob/98f7ff69b1ddb9757b038fa2d1a4d019a307f9cc/R/BW-models.R#L148
Command: (All files and R script in the same directory)
Error message:
Minimum reproducible (hopefully) example attached