aln2dnastring: aln2dnastring

View source: R/aln2dnastring.R

aln2dnastringR Documentation

aln2dnastring

Description

This function converts a seqinr alignment into an DNAStringSet.

Usage

aln2dnastring(aln)

Arguments

aln

seqinr alignment [mandatory]

Value

An object of class DNAStringSet

Author(s)

Kristian K Ullrich

See Also

as.alignment DNAStringSet

Examples

## define two cds sequences
cds1 <- Biostrings::DNAString("ATGCAACATTGC")
cds2 <- Biostrings::DNAString("ATG---CATTGC")
cds1.cds2.aln <- c(Biostrings::DNAStringSet(cds1),
    Biostrings::DNAStringSet(cds2))
## convert into alignment
#dnastring2aln(cds1.cds2.aln)
cds1.cds2.aln |> dnastring2aln()
## convert back into DNAStringSet
#aln2dnastring(dnastring2aln(cds1.cds2.aln))
cds1.cds2.aln |> dnastring2aln() |> aln2dnastring()

kullrich/MSA2dist documentation built on Nov. 14, 2024, 5:39 p.m.