as.fasta.Rd
Convert alignment/sequence in matrix/vector format to FASTA object.
as.fasta(x, id=NULL, ...)
x | a sequence character matrix/vector (e.g obtained from
|
---|---|
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. |
This function provides basic functionality to convert a sequence character matrix/vector to a FASTA object.
Returns a list of class "fasta"
with the following components:
an alignment character matrix with a row per sequence and a column per equivalent aminoacid/nucleotide.
sequence names as identifers.
the matched call.
Grant, B.J. et al. (2006) Bioinformatics 22, 2695--2696.
Lars Skjaerven
get.seq
, seqaln
,
seqbind
, pdbaln
#> 1 3 #> seq1 ACD #> 1 3 #> #> Call: #> as.fasta(x = c("A", "C", "D")) #> #> Class: #> fasta #> #> Alignment dimensions: #> 1 sequence rows; 3 position columns (3 non-gap, 0 gap) #> #> + attr: id, ali, call