I noticed that the following code will probably fail on windows when mafft.path is given a path that ends in "mafft.bat". It will probably enter the third "if" statement and add on another "mafft.bat".
I dont know why it looks like I replaced the whole file. Maybe windows line endings? Anyway all I added was:
# Get name of mafft executable
if (Sys.info()[['sysname']] == "Windows") {
mafft_file <- "mafft.bat"
} else {
mafft_file <- "mafft"
}
# Set defualt path
if (is.null(mafft.path)) {
path <- unname(Sys.which("mafft"))
} else if (endsWith(mafft.path, mafft_file)) { # if mafft executable is in the path...
path <- mafft.path
} else {
# add on executable to path if not already present
path <- file.path(mafft.path, mafft_file)
}
I noticed that the following code will probably fail on windows when mafft.path is given a path that ends in "mafft.bat". It will probably enter the third "if" statement and add on another "mafft.bat".
https://github.com/grunwaldlab/effectR/blob/d72fae3e6a37a93a6ed42d4dceff3d47b616f12a/R/internal.R#L13-L25
I dont know why it looks like I replaced the whole file. Maybe windows line endings? Anyway all I added was: