dnastring2aln: dnastring2aln

Description Usage Arguments Value Author(s) See Also Examples

View source: R/dnastring2aln.R

Description

This function converts a DNAStringSet into an seqinr alignment.

Usage

1

Arguments

dna

DNAStringSet [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

Author(s)

Kristian K Ullrich

See Also

as.alignment

Examples

1
2
3
4
5
6
7
8
## 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()

kullrich/distSTRING documentation built on Dec. 21, 2021, 8:42 a.m.