latag2n.phyDat: Replace leading and trailing alignment gaps with an ambiguous...

View source: R/ltg2amb.R

latag2n.phyDatR Documentation

Replace leading and trailing alignment gaps with an ambiguous state

Description

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

latag2n.phyDat(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.

...

Further arguments passed to or from other methods.

Value

returns an object of class phyDat.

See Also

latag2n, ancestral.pml, gap_as_state

Examples

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

KlausVigo/phangorn documentation built on Nov. 5, 2024, 11 a.m.