Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

gl.stockR

Generate a SNP matrix from a genlight {adegenet} object for subsequent use in R package stockR.


Description

The script extracts the SNP data from the gl object as a matrix and transposes it to comply with the format expected by stockR.

Usage

gl.stockR(x, verbose = 2)

Arguments

x

– name of the genlight object containing SNP genotypes [required]

verbose

– verbosity: 0, silent or fatal errors; 1, begin and end; 2, progress log ; 3, progress and results summary; 5, full report [default 2]

Details

The script returns the transposed SNP matrix

Value

A matrix with the SNP scores in the form expected by stockR

Author(s)

Arthur Georges (Post to https://groups.google.com/d/forum/dartr)

Examples

gl <- gl.stockR(testset.gl)

dartR

Importing and Analysing SNP and Silicodart Data Generated by Genome-Wide Restriction Fragment Analysis

v1.9.6
GPL-2
Authors
Bernd Gruber [aut, cre], Arthur Georges [aut], Jose L. Mijangos [aut], Peter J. Unmack [ctb], Oliver Berry [ctb], Lindsay V. Clark [ctb], Floriaan Devloo-Delva [ctb]
Initial release
2021-04-29

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.