Description Usage Arguments Value Author(s) See Also Examples
This function can be used to fill both ends of a DNA aligment of class DNAbin
with a character specified in sym
.
1 | fillEndsWithN(x, sym = "n")
|
x |
object of class |
sym |
character string giving the symbol with which to fill the missing nucleotides |
object of class DNAbin
Christoph Heibl
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, ])
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.