Skip to content

Commit

Permalink
update interface
Browse files Browse the repository at this point in the history
  • Loading branch information
reworkhow committed Nov 6, 2021
1 parent 0dc08a1 commit 2cb6da5
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
15 changes: 13 additions & 2 deletions src/1.JWAS/src/JWAS.jl
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,6 @@ function runMCMC(mme::MME,df;
Pi = 0.0,
estimatePi = false,
estimateScale = false)


#Neural Network
is_nnbayes_partial = (mme.nonlinear_function != false && mme.is_fully_connected==false)
if mme.nonlinear_function != false #modify data to add phenotypes for hidden nodes
Expand Down Expand Up @@ -259,6 +257,19 @@ function runMCMC(mme::MME,df;
set_marker_hyperparameters_variances_and_pi(mme)
end
############################################################################
#fast blocks #now only work for one geno
############################################################################
if fast_blocks != false
if fast_blocks == true
block_size = Int(floor(sqrt(mme.M[1].nObs)))
elseif typeof(fast_blocks) <: Number
block_size = Int(floor(fast_blocks))
end
mme.MCMCinfo.fast_blocks = collect(range(1, step=block_size, stop=mme.M[1].nMarkers))
mme.MCMCinfo.chain_length = Int(floor(chain_length/(fast_blocks[2]-fast_blocks[1])))
end
println("BLOCK SIZE: $block_size")
############################################################################
# Adhoc functions
############################################################################
#save MCMC samples for all parameters (?seperate function user call)
Expand Down
3 changes: 0 additions & 3 deletions src/1.JWAS/src/MCMC/MCMC_BayesianAlphabet.jl
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@ function MCMC_BayesianAlphabet(mme,df)
is_activation_fcn = mme.is_activation_fcn
nonlinear_function = mme.nonlinear_function
fast_blocks = mme.MCMCinfo.fast_blocks
if fast_blocks != false
chain_length = Int(floor(chain_length/(fast_blocks[2]-fast_blocks[1])))#not flexible
end
############################################################################
# Categorical Traits (starting values for maker effects defaulting to 0s)
############################################################################
Expand Down

0 comments on commit 2cb6da5

Please sign in to comment.