BayesCpi: 'BayesCpi model for GS and GWAS'

Description Usage Arguments Value

Description

R codes based on Rohan Fernando and Dorian Garrick, Bayesian Methods Applied to GWAS. All rights and credits go to Rohan Fernando and Dorian Garrick. The code is not efficient for large scale genomic data.

Usage

1
2
3
4
5
6
7
8
9
BayesCpi(genofile = "data/bayes_geno.txt",
  train_pheno = "data/bayes_train_pheno.txt", test_pheno = NULL,
  mergeby = "uid", trait = "TA", seed = 12347, chainLength = 1000,
  probFixed = 0.999, estimatePi = "yes", dfEffectVar = 4, nuRes = 4,
  varGenotypic = 1, varResidual = 1, windowSize = 10,
  outputFrequency = 100)

read_geno_pheno(genofile = "data/bayes_geno.txt",
  train_pheno = "data/bayes_train_pheno.txt", test_pheno = NULL, mergeby)

Arguments

genofile

A data.frame contains snpid information, must contain col: mergeby. [data.frame, ["uid", ...]].

train_pheno

A training data.frame contains columns of phenotypic traits and fixed effects. Can be used for GWAS. [data.frame, ["uid", "pheno", ...]].

test_pheno

A testing data.frame contains columns of phenotypic traits and fixed effects. For GS. [data.frame, ["uid", "pheno", ...], =NULL].

mergeby

The column id to merge the pheno and geno data. [chr, ="uid"]

seed

Seed for the random number generator. [integer, =12347].

chainLength

Number of iterations for the MCMC chain. [interger, =11000].

probFixed

Parameter "pi" the probability SNP effect is zero [num, =.99].

estimatePi

Wether to estimate pi or not. [chr, ="yes"].

dfEffectVar

Hyper parameter (degrees of freedom) for locus effect variance. [integer, =4].

nuRes

Hyper parameter (degrees of freedom) for residual variance. [integer, =4].

varGenotypic

Used to derive hyper parameter (scale) for locus effect variance. [num, =1].

varResidual

Used to derive hyper parameter (scale) for residual variance. [num, =1].

windowSize

Number of consecutive markers in a genomic window. [integer, =10].

outputFrequency

Frequency for reporting performance and for computing genetic variances. [integer, =100]

Value

return GWAS results.


jyanglab/g3tools documentation built on May 20, 2019, 6:27 a.m.