Learn R Programming

ape (version 5.8-1)

latag2n: Leading and Trailing Alignment Gaps to N

Description

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

Usage

latag2n(x)

Value

an object of class "DNAbin".

Arguments

x

an object of class "DNAbin" with the aligned sequences.

Author

Emmanuel Paradis

Details

This function is called by others in ape and in pegas. It is documented here in case it needs to be called by other packages.

See Also

DNAbin

Examples

Run this code
x <- as.DNAbin(matrix(c("-", "A", "G", "-", "T", "C"), 2, 3))
y <- latag2n(x)
alview(x)
alview(y)

Run the code above in your browser using DataLab