pvdiv_autoSVD.Rd
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, ...)
A "bigSNP" object; load with bigsnpr::snp_attach().
Integer. The number of principal components to find. Default is 10.
Integer. Number of cores to use. Default is one.
Logical. Should the output be saved to the working directory?
Other arguments to snp_autoSVD
.
A big_SVD object.
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.