pvdiv_gwas.Rd
Given a dataframe of phenotypes associated with PLANT_IDs, this function is a wrapper around bigsnpr functions to conduct linear or logistic regression on Panicum virgatum. The main advantages of this function over just using the bigsnpr functions is that it automatically removes individual genotypes with missing phenotypic data, that it converts switchgrass chromosome names to the format bigsnpr requires, and that it can run GWAS on multiple phenotypes sequentially.
pvdiv_gwas(
df,
type = c("linear", "logistic"),
snp,
covar = NA,
ncores = 1,
npcs = 10,
saveoutput = FALSE
)
Dataframe of phenotypes where the first column is PLANT_ID.
Character string. Type of univarate regression to run for GWAS. Options are "linear" or "logistic".
Genomic information to include for Panicum virgatum. SNP data is available at doi:10.18738/T8/ET9UAU#'
Optional covariance matrix to include in the regression. You
can generate these using bigsnpr::snp_autoSVD()
.
Number of cores to use. Default is one.
Number of principle components to use. Default is 10.
Logical. Should output be saved as a rds to the working directory?
The gwas results for the last phenotype in the dataframe. That phenotype, as well as the remaining phenotypes, are saved as RDS objects in the working directory.