Outputting a multiple alignment to file error: could not find function write.XStringSet
1
0
Entering edit mode
cmdcolin ▴ 10
@cmdcolin-12337
Last seen 7.8 years ago

```

    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 • 1.6k views
ADD COMMENT
2
Entering edit mode
UBod ▴ 300
@ubodenhofer-5425
Last seen 7 months ago
University of Applied Sciences Upper Au…

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.

ADD COMMENT

Login before adding your answer.

Traffic: 499 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6