export.fasta {bios2mds}R Documentation

Writes a MSA file in FASTA format


Writes a multiple sequence alignment (MSA) file in FASTA format.


export.fasta(x, outfile = "alignment.fa", ncol = 60, open = "w")



an object of class 'align', obtained from import.fasta or import.msf, or an element list from the extract.cluster function return.


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.


an integer value indicating the number of characters per line for the sequences in outfile.Default is 60.


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".


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:

For multiple alignments, the FASTA formatted sequences are concatenated to create a multiple FASTA format.


Produces a FASTA file for an 'align' object or a FASTA file for each cluster in list.


For further information about FASTA format, see: http://www.ncbi.nlm.nih.gov/BLAST/fasta.shtml


Jean-Michel Becu

See Also

write.fasta function from seqinr package.


# 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"))

[Package bios2mds version 1.2.3 Index]