Title: | Performs Bayesian GWAS analysis for non-Gaussian data using BG2 |
---|---|
Description: | This package is built to perform GWAS analysis for non-Gaussian data using BG2. The BG2 method uses penalized quasi-likelihood along with nonlocal priors in a two step manner to identify SNPs in GWAS analysis. The research related to this package was supported in part by National Science Foundation awards DMS 1853549 and DMS 2054173. |
Authors: | Jacob Williams [aut, cre] , Shuangshuang Xu [aut], Marco Ferreira [aut] |
Maintainer: | Jacob Williams <[email protected]> |
License: | GPL-3 + file LICENSE |
Version: | 1.7.0 |
Built: | 2024-11-05 06:17:19 UTC |
Source: | https://github.com/bioc/BG2 |
Performs BG2 as described in the manuscript ...
BG2( Y, SNPs, FDR_Nominal = 0.05, Fixed = NULL, family = c("poisson", "bernoulli"), Covariance, Z = NULL, replicates = NULL, Tau = "uniform", maxiterations = 4000, runs_til_stop = 400 )
BG2( Y, SNPs, FDR_Nominal = 0.05, Fixed = NULL, family = c("poisson", "bernoulli"), Covariance, Z = NULL, replicates = NULL, Tau = "uniform", maxiterations = 4000, runs_til_stop = 400 )
Y |
The observed phenotypes, count or binary. |
SNPs |
The SNP matrix, where each column represents a single SNP encoded as the numeric coding 0, 1, 2. This is entered as a matrix object. |
FDR_Nominal |
The nominal false discovery rate for which SNPs are selected from in the screening step. |
Fixed |
A matrix of fixed covariates to control for. Do not include the intercept. The value is defaulted at NULL implying no fixed covariates. |
family |
Specify if the response is count ("poisson") or binary ("bernoulli"). |
Covariance |
A list of covariance matrices that are the covariance matrices of the random effects. This matches the list of design matrices in Z. |
Z |
A list of matrices specifying the design matrix of each random effect of interest. |
replicates |
If family = "poisson", the replicates of each ecotype, can be a vector or a number if the number of replicates is the same for each ecotype. If family = "binomial", replicates = NULL. |
Tau |
Specifying either a fixed value for the dispersion parameter of the nonlocal prior (0.022 and 0.348 are used in the paper). Or specify a prior for tau, either uniform or Inverse Gamma centered at ... |
maxiterations |
The maximum iterations the genetic algorithm in the model selection step iterates for. Defaulted at 400 which is the value used in the BG2 paper simulation studies. |
runs_til_stop |
The number of iterations at the same best model before the genetic algorithm in the model selection step converges. Defaulted at 40 which is the value used in the BG2 paper simulation studies. |
The column indices of SNPs that were in the best model identified by BG2.
library(BG2) data("Y_poisson");data("SNPs");data("kinship") n <- length(Y_poisson) covariance <- list() covariance[[1]] <- kinship covariance[[2]] <- diag(1, nrow = n, ncol = n) set.seed(1330) output_poisson <- BG2(Y=Y_poisson, SNPs=SNPs, Fixed = NULL, Covariance=covariance, Z=NULL, family="poisson", replicates=4, Tau="uniform",FDR_Nominal = 0.05, maxiterations = 4000, runs_til_stop = 400)
library(BG2) data("Y_poisson");data("SNPs");data("kinship") n <- length(Y_poisson) covariance <- list() covariance[[1]] <- kinship covariance[[2]] <- diag(1, nrow = n, ncol = n) set.seed(1330) output_poisson <- BG2(Y=Y_poisson, SNPs=SNPs, Fixed = NULL, Covariance=covariance, Z=NULL, family="poisson", replicates=4, Tau="uniform",FDR_Nominal = 0.05, maxiterations = 4000, runs_til_stop = 400)
This is a kinship matrix from the TAIR9 genotype information for 328 A. Thaliana Ecotypes from the paper Components of Root Architecture Remodeling in Response to Salt Stress (Julkowska et al. Genetic Components of Root Architecture Remodeling in Response to Salt Stress, The Plant Cell, Volume 29, Issue 12, December 2017, Pages 3198–3213). The kinship matrix was computed using all SNPs with minor allele frequency greater than 0.01.
data(kinship)
data(kinship)
## 'kinship' A matrix with 328 rows and 328 columns corresponding to the 328 ecotypes.
This is a matrix with 328 observations and 9,000 SNPs. Each row is contains 9,000 SNPs from a single A. Thaliana ecotype in the paper Components of Root Architecture Remodeling in Response to Salt Stress (Julkowska et al. Genetic Components of Root Architecture Remodeling in Response to Salt Stress, The Plant Cell, Volume 29, Issue 12, December 2017, Pages 3198–3213).
data(SNPs)
data(SNPs)
## 'SNPs' A matrix with 328 observations and 9,000 SNPs.
This is a phenotype matrix simulated from 9,000 SNPs. SNPs at positions 450, 1350, 2250, 3150, 4050, 4950, 5850, 6750, 7650, and 8550 have nonzero coefficients. Further, the data was simulated under a binary mixed effects model with only a kinship random effect. The data was simulated using the kinship random effect provided in the package.
data(Y_binary)
data(Y_binary)
## 'Y_binary' A vector with 328 observations corresponding to the 328 ecotypes.
This is a phenotype matrix simulated from 9,000 SNPs. SNPs at positions 450, 1350, 2250, 3150, 4050, 4950, 5850, 6750, 7650, and 8550 have nonzero coefficients. Further, the data was simulated under a poisson mixed effects model with both a kinship random effect and an overdispersion random effect. The data was simulated using the kinship random effect provided in the package.
data(Y_poisson)
data(Y_poisson)
## 'Y_poisson' A vector with 328 observations corresponding to the 328 ecotypes.