Question: Outputting a multiple alignment to file error: could not find function write.XStringSet
0
2.5 years ago by
cmdcolin10
cmdcolin10 wrote:



library(msa)
library(Biostrings)

x="ATGC"
y="ATGA"
z=msa(c(x,y), type="dna")
write.XStringSet(z)



Error: could not find function "write.XStringSet"

msa • 485 views
modified 2.5 years ago by UBodenhofer250 • written 2.5 years ago by cmdcolin10
Answer: Outputting a multiple alignment to file error: could not find function write.XSt
2
2.5 years ago by
UBodenhofer250
Johannes Kepler University, Linz, Austria
UBodenhofer250 wrote:

The correct name of the function is 'writeXStringSet' (without period). I don't recall precisely when the function name was changed, but I think it was several Bioconductor releases ago. The correct usage is the following:

writeXStringSet(unmasked(z), file="test.fasta")

The function 'unmasked' makes the conversion to an 'XStringSet' object; moreover, the file argument was missing in your example.