about summary refs log tree commit diff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/bulklmm_scan.jl7
1 files changed, 6 insertions, 1 deletions
diff --git a/scripts/bulklmm_scan.jl b/scripts/bulklmm_scan.jl
index 0710f1b..ab0f1ca 100755
--- a/scripts/bulklmm_scan.jl
+++ b/scripts/bulklmm_scan.jl
@@ -243,12 +243,17 @@ if nperms > 0 && all(r -> hasproperty(r, :L_perms), results)
                     (vec(maximum(r.L_perms; dims = 1)) for r in results))
     result = merge(result, (L_perms = reshape(maxima, 1, :),))
 end
+h2 = hasproperty(result, :h2_null) ? result.h2_null : NaN
+sigma2_e = hasproperty(result, :sigma2_e) ? result.sigma2_e : NaN
 scan_seconds = time() - raised
+# The variance components, so a caller can see whether the kinship term did
+# anything: h2 estimate = sigma2_g / (sigma2_g + sigma2_e) under the null model.
+println(stderr, "bulklmm: variance components under the null: h2 ", round(h2, digits = 6),
+        ", sigma2_e ", round(sigma2_e, digits = 6), ", n ", length(y))
 println(stderr, "bulklmm: julia threads ", Threads.nthreads(), ", blocks ", length(blocks),
         ", BLAS threads ", BLAS.get_num_threads(), " | read ", round(read_seconds, digits = 1),
         " s, scan ", round(scan_seconds, digits = 1), " s")
 
-h2 = hasproperty(result, :h2_null) ? result.h2_null : NaN
 beta = hasproperty(result, :b) ? result.b : fill(NaN, length(marker_names))
 se = hasproperty(result, :SE) ? result.SE : nothing
 open(out_file, "w") do handle