| gl2gi | R Documentation |
Converts a genlight object containing SNP data into a genind object (package adegenet), retaining individual names, populations and locus metadata.
gl2gi(x, probar = FALSE, verbose = NULL)
x |
A genlight object [required]. |
probar |
If TRUE, a progress bar is displayed for long loops [default FALSE]. Retained for backward compatibility; the vectorised conversion completes without one. |
verbose |
Verbosity: 0, silent or fatal errors; 1, begin and end; 2, progress log; 3, progress and results summary; 5, full report [default NULL, adopting the global verbosity set by gl.set.verbosity(), or 2 if no global is set]. |
This function uses a faster version of df2genind (from the adegenet package).
Loci scored as missing (NA) across all individuals are removed before
conversion, with a warning at verbose >= 1 – df2genind would remove
them silently, leaving the locus metadata out of register with the
genotypes. When the genlight object carries no allele definitions
(loc.all is NULL), placeholder alleles are fabricated (A/T for
each locus, C/G for the first) and a warning is issued at
verbose >= 1; the fabricated labels are placeholders, not sequence
data.
A genind object, with all slots filled.
Author(s): Bernd Gruber. Custodian: Bernd Gruber – Post to https://groups.google.com/d/forum/dartr
Other linker:
gi2gl(),
gl2bayesAss(),
gl2bayescan(),
gl2bpp(),
gl2demerelate(),
gl2eigenstrat(),
gl2faststructure(),
gl2gapit(),
gl2gds(),
gl2genalex(),
gl2genepop(),
gl2geno(),
gl2hapmap(),
gl2hiphop(),
gl2related(),
gl2snapper(),
gl2structure(),
gl2treemix(),
gl2vcf()
if (isTRUE(getOption("dartR_fbm"))) possums.gl <- gl.gen2fbm(possums.gl)
gl2gi(possums.gl[1:10,1:20])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.