reworkhow / JWAS.jl

Julia for Whole-genome Analysis Software
http://QTL.rocks
GNU General Public License v2.0
96 stars 44 forks source link

fix estimate_scale #147

Closed zhaotianjing closed 9 months ago

zhaotianjing commented 9 months ago
  1. remove estimate_variance = true and estimate_scale = false in documentation of runMCMC().

  2. in runMCMC() arguments: move arguments estimate_scale = false, and estimate_variance = true into the arguments section "#for deprecated JWAS", because these two arguments should be set in other functions. Error message is added if the user tries to set up in runMCMC():

        if estimate_scale != false #user set estimate_variance=true in runMCMC()
            error("The argument 'estimate_scale' for marker effect variance has been moved to get_genotypes().")
        end
        if estimate_variance != true #user set estimate_variance=false in runMCMC()
            error("The argument 'estimate_variance' for non-marker variance components has been moved to build_MME() for residual variance,
                   and set_random() for random terms.")
        end

    correspondingly, changed unitest.jl code.

  3. remove estimate_variance in mme.MCMCinfo

  4. fix estimate_scale for new variance module: change Mi.estimate_scale to Mi.G.estimate_scale

  5. fix estimate_variance for new variance module: change Mi.estimate_variance to Mi.G.estimate_variance

  6. in runMCMC(), section "3. Non-marker Variance Components", sample residual variance based on if mme.R.estimate_variance == true; sample Variance of Non-marker Random Effects based on if mme.rndTrmVec[1].Gi.estimate_variance == true

  7. add argument estimate_variance=true in documentation of build_model(), and add explanation

  8. in build_model() and set_random(), error message if estimate_scale != false. because estimating scale for those variance is not supported now.

  9. add argument estimate_variance=true in documentation of get_genotypes()

  10. in mutable struct Genotypes, remove estimate_variance and estimate_scale because they are in variance module (Genotypes.G)

  11. add error message when sample scale of marker effect variance in multi-trait model