Skip to content

Commit

Permalink
update prediction equation
Browse files Browse the repository at this point in the history
  • Loading branch information
reworkhow committed Jul 22, 2021
1 parent 474f7db commit ecb02aa
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/1.JWAS/src/JWAS.jl
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,8 @@ export dataset
* If `causal_structure` is provided, e.g., causal_structure = [0.0 0.0 0.0;1.0 0.0 0.0;1.0 0.0 0.0] for
trait 2 -> trait 1 and trait 3 -> trait 1 (row index affacts column index), phenotypic causal networks will be incorporated using structure equation models.
* Genomic Prediction
* Predicted values for individuals of interest can be obtained based on an user-defined prediction equation `prediction_equation`, e.g., "y1:animal + y1:age".
For now, genomic data is always included. Genetic values including effects defined with genotype and pedigre information are returned if `prediction_equation`= false, defaulting to `false`.
* Predicted values for individuals of interest can be obtained based on a user-defined prediction equation `prediction_equation`, e.g., "y1:animal + y1:age".
For now, genomic data is always included. Genetic values including effects defined with genotype and pedigree information are returned if `prediction_equation`= false, defaulting to `false`.
* Individual estimted genetic values and prediction error variances (PEVs) are returned if `outputEBV`=true, defaulting to `true`. Heritability and genetic
variances are returned if `output_heritability`=`true`, defaulting to `true`. Note that estimation of heritability is computaionally intensive.
* Miscellaneous Options
Expand Down
1 change: 1 addition & 0 deletions src/1.JWAS/src/build_MME.jl
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ function build_model(model_equations::AbstractString, R = false; df = 4.0,

#create mme with genotypes
filter!(x->x.random_type != "genotypes",modelTerms)
filter!(x->x[2].random_type != "genotypes",dict)
mme = MME(nModels,modelVec,modelTerms,dict,lhsVec,R == false ? R : Float32.(R),Float32(df))
if length(genotypes) != 0
mme.M = genotypes
Expand Down
1 change: 1 addition & 0 deletions src/1.JWAS/src/output.jl
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ function prediction_setup(model)
println("Default or user-defined prediction equation are not available.")
model.MCMCinfo.outputEBV = false
end
filter!(e->(e in keys(model.modelTermDict)),prediction_equation) #remove "genotypes" for now
model.MCMCinfo.prediction_equation = prediction_equation
end

Expand Down

0 comments on commit ecb02aa

Please sign in to comment.