R: Alignment to FASTA object

as.fasta {bio3d} | R Documentation

## Alignment to FASTA object

### Description

Convert alignment/sequence in matrix/vector format to FASTA object.

### Usage

    as.fasta(x, id=NULL, ...)

### Arguments

`x` | a sequence character matrix/vector (e.g obtained from `get.seq` or `seqbind`).
`id` | a vector of sequence names to serve as sequence identifers. By default the function will use the row names of the alignment if they exists, otherwise ids will be generated.
`...` | arguments passed to and from functions.

### Details

This function provides basic functionality to convert a sequence character matrix/vector to a FASTA object.

### Value

Returns a list of class `"fasta"` with the following components:

`ali` | an alignment character matrix with a row per sequence and a column per equivalent aminoacid/nucleotide.
`id` | sequence names as identifers.
`call` | the matched call.

### Author(s)

Lars Skjaerven

### References

Grant, B.J. et al. (2006) Bioinformatics 22, 2695–2696.

### See Also

`get.seq`, `seqaln`, `seqbind`, `pdbaln`

### Examples

    as.fasta(c("A", "C", "D"))

[Package bio3d version 2.3-3 Index]