export.fasta {bios2mds} | R Documentation |
Writes a MSA file in FASTA format
Description
Writes a multiple sequence alignment (MSA) file in FASTA format.
Usage
export.fasta(x, outfile = "alignment.fa", ncol = 60, open = "w")
Arguments
x |
an object of class 'align', obtained from |
outfile |
a string of characters or string vector to indicate the name of the MSA file(s) to be written. If x is an object of class 'align', default is "alignment.fa". If x is an element list, for each element in x, default is the element name, followed by the ".alignement.fa" extension. |
ncol |
an integer value indicating the number of characters per line for the sequences in outfile.Default is 60. |
open |
a character value indicating the opening mode for outfile. This should be either of "w" to write into a new file, or "a" to append at the end of an already existing file. Default is "w". |
Details
Initially, FASTA (for FAST-ALL) was the input format of the FASTA program, used for protein comparison and searching in databases. Presently, FASTA format is a standard format for biological sequences.
The FASTA formatted file of a single sequence displays:
a single-line description beginning with a greater-than (>) symbol. The following word is the identifier.
followed by any number of lines, representing biological sequence.
For multiple alignments, the FASTA formatted sequences are concatenated to create a multiple FASTA format.
Value
Produces a FASTA file for an 'align' object or a FASTA file for each cluster in list.
Note
For further information about FASTA format, see: http://www.ncbi.nlm.nih.gov/BLAST/fasta.shtml
Author(s)
Jean-Michel Becu
See Also
write.fasta
function from seqinr
package.
Examples
# reading of the multiple sequence alignment of human GPCRS in FASTA format:
wd <- tempdir()
#wd <- getwd()
file1 <- file.path(wd,"alignment.fa")
aln <- import.fasta(system.file("msa/human_gpcr.fa", package = "bios2mds"))
export.fasta(aln,file1)