Open tpellard opened 1 year ago
Trying to convert a phyDat object with User-type sequences from phangorn to phylip format with as.phylip.data produces an error: Error in if (N > printlen) cat(paste("Labels:", paste(rownames(x)[1:min(printlen, : argument is of length zero
phyDat
User
phangorn
as.phylip.data
Error in if (N > printlen) cat(paste("Labels:", paste(rownames(x)[1:min(printlen, : argument is of length zero
Minimal example:
library(Rphylip) library(phangorn) download.file("https://github.com/KlausVigo/phangorn/raw/master/data/mites.RData", destfile = "mites.RData") load("mites.RData") as.phylip.data(mites)
It seems that this is due to X <- toupper(X) within the as.phylip.data function https://github.com/liamrevell/Rphylip/blob/eee8c6eff145aee4030fb6eb9279e204ddcab5de/Rphylip/R/Rphylip.R#L1164
X <- toupper(X)
Running the code without that line solves the problem.
Trying to convert a
phyDat
object withUser
-type sequences fromphangorn
to phylip format withas.phylip.data
produces an error:Error in if (N > printlen) cat(paste("Labels:", paste(rownames(x)[1:min(printlen, : argument is of length zero
Minimal example:
It seems that this is due to
X <- toupper(X)
within theas.phylip.data
function https://github.com/liamrevell/Rphylip/blob/eee8c6eff145aee4030fb6eb9279e204ddcab5de/Rphylip/R/Rphylip.R#L1164Running the code without that line solves the problem.