I am trying to get an alignment in ape from R with this code:
library(muscle)
#https://bioconductor.org/packages/release/bioc/html/muscle.html
muscle(x, exec = "muscle", MoreArgs = "", quiet = TRUE)
but the console says:
Error in muscle(x, exec = "muscle", MoreArgs = "", : input must be an object of class XStringSet: DNAStringSet, RNAStringSet, or AAStringSet
You can convert any DNAbin to DNAStringSet by
library(magrittr)
yourDNAbin %>% as.character %>% lapply(.,paste0,collapse="") %>% unlist %>% DNAStringSet
if your DNAbin is: xxx DNA sequences in binary format stored in a list. If it is stored in a matrix as.list it first.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With