Description Usage Arguments Value Author(s) See Also Examples
The functions multidna2genind
and multiphyDat2genind
concatenates separate DNA alignments, and then extracts SNPs of the resulting alignment into a genind object.
1 2 3 | multidna2genind(x, genes = TRUE, mlst = FALSE, gapIsNA = FALSE)
multiphyDat2genind(x, genes = TRUE, mlst = FALSE, gapIsNA = FALSE)
|
x |
a multidna or multiphyDat object. |
genes |
an optional vector indicating the genes to retain for the concatenation; any way to subset the list in x@dna or x@seq is acceptable; by default, all genes are used. |
mlst |
if |
gapIsNA |
if |
a genind object
Thibaut Jombart t.jombart@imperial.ac.uk, Zhian N. Kamvar, Klaus Schliep
concatenate
DNAbin2genind
to convert single DNAbin objects.
1 2 3 4 5 6 7 8 9 10 11 | ## simple conversion with nicely ordered output
data(woodmouse)
genes <- list(gene1=woodmouse[,1:500], gene2=woodmouse[,501:965])
x <- new("multidna", genes)
x
y <- multidna2multiphyDat(x)
y
z1 <- multidna2genind(x)
z1
z2 <- multiphyDat2genind(y)
all.equal(z1, z2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.