Skip to contents

Substitutes leading and trailing alignment gaps in aligned sequences into N (i.e., A, C, G, or T) or ?. The gaps in the middle of the sequences are left unchanged.

Usage

ltg2amb(x, amb = ifelse(attr(x, "type") == "DNA", "N", "?"), gap = "-")

Arguments

x

an object of class phyDat.

amb

character of the ambiguous state t replace the gaps.

gap

gap parameter to replace.

Value

returns an object of class phyDat.

See also

Examples

x <- phyDat(matrix(c("-", "A", "G", "-", "T", "C"), 2, 3))
y <- ltg2amb(x)
image(x)

image(y)