View source: R/aln2dnastring.R
aln2dnastring | R Documentation |
This function converts a seqinr
alignment
into
an DNAStringSet
.
aln2dnastring(aln)
aln |
|
An object of class DNAStringSet
Kristian K Ullrich
as.alignment
DNAStringSet
## 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()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.