unalign: Deconstruct an alignment.

Description Usage Arguments Details Value Author(s) See Also Examples

Description

unalign deconstructs an alignment to a list of sequences.

Usage

1
unalign(x, gap = "-")

Arguments

x

a matrix of aligned sequences. Accepted modes are "character" and "raw" (for "DNAbin" and "AAbin" objects).

gap

the character used to represent gaps in the alignment matrix. Ignored for "DNAbin" or "AAbin" objects. Defaults to "-" otherwise.

Details

unalign works in the opposite way to align, reducing a matrix of aligned sequences to a list of sequences without gaps. "DNAbin" and "AAbin" matrix objects are supported (and recommended for biological sequence data)

Value

a list of sequences of the same mode and class as the input alignment (ie "DNAbin", "AAbin", or plain ASCII characters).

Author(s)

Shaun Wilkinson

See Also

align.

Examples

1
2
3
4
5
## Convert the woodmouse alignment in the ape package to a list of
## unaligned sequences
library(ape)
data(woodmouse)
x <- unalign(woodmouse)

aphid documentation built on May 8, 2019, 9:03 a.m.