gstud_to_genind {graph4lg} | R Documentation |
Convert a file from gstudio or popgraph into a genind object
Description
The function converts a file formatted to use gstudio or popgraph package into a genind object (adegenet package)
Usage
gstud_to_genind(x, pop_col, ind_col = NULL)
Arguments
x |
An object of class |
pop_col |
A character string indicating the name of the column with
populations' names in |
ind_col |
(optional) A character string indicating the name of the
column with individuals' ID in |
Details
This function uses functions from pegas package. It can handle genetic data where alleles codings do not have same length, (99:101, for example). If the names of the loci include '.' characters, they will be replaced by '_'.
Value
An object of class genind
.
Author(s)
P. Savary
Examples
data("data_ex_gstud")
x <- data_ex_gstud
pop_col <- "POP"
ind_col <- "ID"
data_genind <- gstud_to_genind(x, pop_col, ind_col)
[Package graph4lg version 1.8.0 Index]