Skip to content

Single Trait Analysis

Hao Cheng edited this page Feb 15, 2021 · 12 revisions

Sinlge-trait analysis

Univariate Linear Additive Genetic Model

using JWAS, DataFrames, CSV

phenotypes   = CSV.read("phenotype.csv",delim = ',',header=true,missingstrings=["NA"]);
geno         = get_genotypes("genotypes.txt");#df=4,G_is_marker_variance=false 

model_equations = "y1 = intercept + geno
                   y2 = intercept + geno";
model           = build_model(model_equations);


@time out=runMCMC(model,data,chain_length=50_000);

##save variables
using JLD
save("results.jld", "out", out)

Univariate Linear Mixed Model (Genomic data)

tic()
out=runMCMC(model,data,Pi2);
toc()
Clone this wiki locally