ape (version 5.4)

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)

Arguments

x

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

Value

an object of class "DNAbin".

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
# NOT RUN {
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 DataCamp Workspace