In [1]:
using DataFrames,JWAS,JWAS.Datasets
In [2]:
phenofile = Datasets.dataset("testMME","simple.txt")
genofile = Datasets.dataset("testMME","genotype.txt")
pedfile = Datasets.dataset("testMME","pedigree.txt");
In [3]:
;cat $phenofile
In [4]:
;cat $genofile
In [5]:
;cat $pedfile
In [6]:
phenotype = readtable(phenofile,separator = ',',header=true);
In [7]:
pedigree = get_pedigree(pedfile);
In [8]:
residual_variance = 1.0
genetic_variance = 2.5
genetic_variance_by_marker = 1.5
genetic_variance_by_polygenic = 1.0;
In [9]:
model = build_model("y = intercept + Age + Animal",residual_variance)
set_covariate(model,"Age")
set_random(model,"Animal",pedigree,genetic_variance_by_polygenic)
In [10]:
add_markers(model,genofile,genetic_variance_by_marker,separator=',');
In [11]:
output=runMCMC(model,phenotype,chain_length=5000,
methods="BayesC",Pi=0.9,estimatePi=true,output_samples_frequency=100);
In [12]:
keys(output)
Out[12]:
In [13]:
output["Posterior mean of location parameters"]
Out[13]:
In [14]:
output["Posterior mean of marker effects"]
Out[14]:
In [16]:
using Plots
histogram(output["MCMC samples for: π"])
Out[16]:
In [ ]: