Files
snpdiver/man/div_gwas.Rd

35 lines
1.2 KiB
R

% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/wrapper.R
\name{div_gwas}
\alias{div_gwas}
\title{Wrapper for bigsnpr for GWAS}
\usage{
div_gwas(df, snp, type, svd, npcs)
}
\arguments{
\item{df}{Dataframe of phenotypes where the first column is sample.ID}
\item{snp}{Genomic information to include for wheat.}
\item{type}{Character string. Type of univarate regression to run for GWAS.
Options are "linear" or "logistic".}
\item{svd}{Optional covariance matrix to include in the regression. You
can generate these using \code{bigsnpr::snp_autoSVD()}.}
\item{npcs}{Integer. Number of PCs to use for population structure correction.}
}
\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.
}
\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.
}