Question: How to get msa output in fasta format
0
gravatar for cav3gh
15 months ago by
cav3gh0
cav3gh0 wrote:

My current code is :

mySequences <- readAAStringSet("batch_1.fa")

myFirstAlignment <- msaClustalOmega(mySequences)

msaPrettyPrint(myFirstAlignment, output=c("pdf", "tex", "dvi", "asis"))

msaPrettyPrint says that its first writes to a fasta file but does not include that as an output option, is there anyway to get that fasta file?  I am trying to use phangorn to create phylogenetic trees in downstream analysis.

 

 

 

 

msa msaprettyprint() • 340 views
ADD COMMENTlink modified 15 months ago by UBodenhofer250 • written 15 months ago by cav3gh0
Answer: How to get msa output in fasta format
2
gravatar for Mike Smith
15 months ago by
Mike Smith3.8k
EMBL Heidelberg / de.NBI
Mike Smith3.8k wrote:

You can use the argument alFile = /path/to/a/file.fasta to specify the location of the generated alignment file e.g.

msaPrettyPrint(myFirstAlignment, output=c("pdf", "tex", "dvi", "asis"), alFile = "/tmp/alignment.fasta")

Note that it has to have the file extension .fasta otherwise it throws an error.

ADD COMMENTlink written 15 months ago by Mike Smith3.8k
Answer: How to get msa output in fasta format
0
gravatar for UBodenhofer
15 months ago by
UBodenhofer250
Johannes Kepler University, Linz, Austria
UBodenhofer250 wrote:

If you do not want to make the extra way via the msaPrettyPrint() function, you can also directly write to a FASTA file in the following way (which is actually what msaPrettyPrint() does internally; suppose 'aln' is an object containing a multiple alignment):

writeXStringSet(as(unmasked(aln), "XStringSet"), file="aln.fasta")
ADD COMMENTlink written 15 months ago by UBodenhofer250
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 280 users visited in the last hour