Generate a SNP matrix from a genlight {adegenet} object for subsequent use in R package stockR.
The script extracts the SNP data from the gl object as a matrix and transposes it to comply with the format expected by stockR.
gl.stockR(x, verbose = 2)
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] |
The script returns the transposed SNP matrix
A matrix with the SNP scores in the form expected by stockR
Arthur Georges (Post to https://groups.google.com/d/forum/dartr)
gl <- gl.stockR(testset.gl)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.