fillEndsWithN: Fill alignment ends with N

Description Usage Arguments Value Author(s) See Also Examples

Description

This function can be used to fill both ends of a DNA aligment of class DNAbin with a character specified in sym.

Usage

1
fillEndsWithN(x, sym = "n")

Arguments

x

object of class DNAbin

sym

character string giving the symbol with which to fill the missing nucleotides

Value

object of class DNAbin

Author(s)

Christoph Heibl

See Also

delete.empty.cells

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
# simple example alignment:
# -------------------------
x <- structure(list(nb = 3, 
	seq = c("aaaaaaaaaa", "--aa--aa--", "tttttttttt"), 
	nam = c("A", "B", "C")), .Names = c("nb", "seq", "nam"), 
	class = "alignment")

# convert to DNAbin:
# ------------------
x <- as.DNAbin(x)

# fill missing nucleotides:
# -------------------------
x <- fillEndsWithN(x)

# show results:
# -------------
as.character(x[2, ])

fmichonneau/phyloch documentation built on May 16, 2019, 1:45 p.m.