This function converts a AAStringSet into an seqinr alignment.

aastring2aln(aa)

Arguments

aa

AAStringSet [mandatory]

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

See also

Author

Kristian K Ullrich

Examples

## define two cds sequences
cds1 <- Biostrings::DNAString("ATGCAACATTGC")
cds2 <- Biostrings::DNAString("ATG---CATTGC")
cds1.cds2.aln <- c(Biostrings::DNAStringSet(cds1),
    Biostrings::DNAStringSet(cds2))
#aastring2aln(cds2aa(cds1.cds2.aln))
cds1.cds2.aln |> cds2aa() |> aastring2aln()
#> $nb
#> [1] 2
#> 
#> $nam
#> NULL
#> 
#> $seq
#> [1] "mqhc" "mxhc"
#> 
#> $com
#> [1] NA
#> 
#> attr(,"class")
#> [1] "alignment"