div_gwas: Wrapper for bigsnpr for GWAS

Description Usage Arguments Value

View source: R/wrapper.R

Description

Given a dataframe of phenotypes associated with sample.IDs, this function is a wrapper around bigsnpr functions to conduct linear or logistic regression on wheat. The main advantages of this function over just using the bigsnpr functions is that it automatically removes individual genotypes with missing phenotypic data and that it can run GWAS on multiple phenotypes sequentially.

Usage

1
div_gwas(df, snp, type, svd, npcs, ncores)

Arguments

df

Dataframe of phenotypes where the first column is sample.ID

snp

Genomic information to include for wheat.

type

Character string. Type of univarate regression to run for GWAS. Options are "linear" or "logistic".

svd

Optional covariance matrix to include in the regression. You can generate these using bigsnpr::snp_autoSVD().

npcs

Integer. Number of PCs to use for population structure correction.

ncores

Integer. Number of cores to use for parallelization.

Value

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.


Alice-MacQueen/snpdiver documentation built on Dec. 17, 2021, 8:41 a.m.