as.alignment: Constructor for class alignment

Description Usage Arguments Value Author(s) References See Also Examples

View source: R/as.alignment.R

Description

Returns an object of (S3) class alignment.

Usage

1
as.alignment(nb = NULL, nam = NULL, seq = NULL, com = NULL)

Arguments

nb

integer. The number of sequences in the alignment.

nam

vector of nb character strings. The sequence names.

seq

vector of nb character strings. The aligned sequences.

com

vector of nb character strings. The comments about sequences.

Value

An object of class alignment which is a list with the following components:

nb

the number of aligned sequences

nam

a vector of strings containing the names of the aligned sequences

seq

a vector of strings containing the aligned sequences

com

a vector of strings containing the commentaries for each sequence or NA if there are no comments

Author(s)

D. Charif, J.R. Lobry

References

citation("seqinr")

See Also

read.alignment, as.matrix.alignment, read.fasta, write.fasta, reverse.align, dist.alignment.

Examples

1
2
as.alignment(nb = 2, nam = c("one", "two"), 
  seq = c("-ACGT", "GACG-"), com = c("un", "deux"))

Example output

$nb
[1] 2

$nam
[1] "one" "two"

$seq
[1] "-ACGT" "GACG-"

$com
[1] "un"   "deux"

attr(,"class")
[1] "alignment"

seqinr documentation built on June 9, 2021, 9:06 a.m.