Build Loci Object From Matrix of Alleles
This function transforms a matrix of alleles into an object of class
a matrix or a data frame where each column is an allele.
an integer specifying the level of ploidy.
an integer giving the column number to be used as rownames of the output.
an integer giving the column number to be as population (if any).
a logical specifying whether the genotypes should be output as phased. By default, they are unphased.
Genetic data matrices are often arranged with one allele
in each column of the matrix (particularly for micro-satellites), so
that the number of columns is equal to the number of loci times the
level of ploidy. This function transforms such matrices into a
If the rownames of the input matrix are already set, they are used in the output. Alternatively, it is possible to specify which column to use as rownames (this column will be deleted before creating the genotypes).
If the input matrix has colnames, then the names of the first column of each genotype is used as names of the output loci (see examples).
an object of class
The vignette “ReadingFiles” explains how to read such a data set from Dryad (http://datadryad.org).
1 2 3 4
Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.