This function converts a seqinr alignment into an AAStringSet.

aln2aastring(aln)

Arguments

aln

seqinr alignment [mandatory]

Value

An object of class AAStringSet

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() |> aln2aastring()
#> AAStringSet object of length 2:
#>     width seq
#> [1]     4 MQHC
#> [2]     4 MXHC