pvdiv_gwas: Wrapper for bigsnpr for GWAS on Panicum virgatum.

Description Usage Arguments Value

View source: R/pvdiv_gwas.R

Description

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.

Usage

1
2
3
4
5
6
7
8
9
pvdiv_gwas(
  df,
  type = c("linear", "logistic"),
  snp,
  covar = NA,
  ncores = 1,
  npcs = 10,
  saveoutput = FALSE
)

Arguments

df

Dataframe of phenotypes where the first column is PLANT_ID.

type

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

snp

Genomic information to include for Panicum virgatum. SNP data is available at doi:10.18738/T8/ET9UAU#'

covar

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

ncores

Number of cores to use. Default is one.

npcs

Number of principle components to use. Default is 10.

saveoutput

Logical. Should output be saved as a rds to the working directory?

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/switchgrassGWAS documentation built on Jan. 23, 2022, 7:55 p.m.