diff --git a/BGMG_cpp_qq_plot.m b/BGMG_cpp_qq_plot.m index 597f278..b8ede03 100644 --- a/BGMG_cpp_qq_plot.m +++ b/BGMG_cpp_qq_plot.m @@ -83,6 +83,7 @@ qq_options.lamGC_data = BGMG_util.lamGCfromQQ(data_logpvec, hv_logp); qq_options.lamGC_model = BGMG_util.lamGCfromQQ(model_logpvec, hv_logp); qq_options.n_snps = sum(options.mask); + qq_options.sum_data_weights = sum(weights_bgmg(options.mask)) qq_options.qqlimy = hv_logp(find(isfinite(data_logpvec), 1, 'last' ))*1.05; plot_data.qq_options = qq_options; diff --git a/BGMG_cpp_stratified_qq_plot.m b/BGMG_cpp_stratified_qq_plot.m index 5a4bd7f..b1172d6 100644 --- a/BGMG_cpp_stratified_qq_plot.m +++ b/BGMG_cpp_stratified_qq_plot.m @@ -78,6 +78,9 @@ plot_data{conditional_trait, zthresh_index}.model_logpvec = model_logpvec; plot_data{conditional_trait, zthresh_index}.params = params; plot_data{conditional_trait, zthresh_index}.zthresh = zthresh; + plot_data{conditional_trait, zthresh_index}.n_snps = sum(abs(zvec2)>=zthresh); + plot_data{conditional_trait, zthresh_index}.sum_data_weights = sum(weights_bgmg(abs(zvec2)>=zthresh)) + if (conditional_trait==1) && (zthresh_index == 1) plot_data{conditional_trait, zthresh_index}.pdf = pdf; plot_data{conditional_trait, zthresh_index}.pdf_zgrid = zgrid;