seqaln() without external muscle
Lots of new users struggle with the muscle dependency for the seqaln() function. For these users in particular, how about adding something like this to the seqaln() function?
We could fall back to this if muscle is not available before the final fallback of the EBI web-services option.
# Within seqaln()
# Use bioconductor MSA package for alignment!
if (grepl("msa", tolower(exefile))) {
# Write a temporty FASTA file to disc
tf <- tempfile(pattern = "bio3d_aln",fileext = ".fasta")
write.fasta(aln, file=tf)
# Alignmnet and conversion for Bio3D
res <- msa::msaMuscle(Biostrings::readAAStringSet(tf), order="input", ...)#type="protein", order="input"
#res <- msa::msaMuscle(tf, type="protein",...)
return( msa::msaConvert(res, type="bio3d::fasta") )
}
This would require a dependency on the msa bioconductor package but CRAN has these so checking there should be ok...
Comments (4)
-
reporter -
This sounds very sensible. I suggest make the amendment and then upload a new patch to cran. Note that we have some bugfixes that haven't released yet and so probably the time to release a new patch version.
-
reporter Great!
We would need to add
msa
to the Imports list in our DESCRIPTION file (or maybe Suggests). Not sure about Biostrings. -
'msa' available in recent commits (See e.g., https://bitbucket.org/Grantlab/bio3d/commits/74f13aa65125b1aa3bdc6ccadf25d69218fdf99f).
Should work. Please test and let me know if you find any problems.
- Log in to comment
a quick test snippet function would look like this...
With code like: