This is a wrapper to determine population structure for GWAS for a SNP file with the switchgrass chromosomes, which are not numeric. Arguments that are recognized by bigsnpr::snp_autoSVD can also be specified in this function.

pvdiv_autoSVD(snp, k = 10, ncores = 1, saveoutput = FALSE, ...)

Arguments

snp

A "bigSNP" object; load with bigsnpr::snp_attach().

k

Integer. The number of principal components to find. Default is 10.

ncores

Integer. Number of cores to use. Default is one.

saveoutput

Logical. Should the output be saved to the working directory?

...

Other arguments to snp_autoSVD.

Value

A big_SVD object.

Examples

snpfile <- system.file("extdata", "example_bigsnp.rds", package = "switchgrassGWAS")
library(bigsnpr)
#> Loading required package: bigstatsr
snp <- snp_attach(snpfile)
svd5 <- pvdiv_autoSVD(snp = snp, k = 5, saveoutput = FALSE)
#> 'saveoutput' is FALSE, so the svd will not be saved to the working directory.