Skip to content

Commit

Permalink
include nsnps and their weights from qq plots
Browse files Browse the repository at this point in the history
  • Loading branch information
ofrei committed Nov 12, 2018
1 parent 32efaf8 commit 23bb52d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions BGMG_cpp_qq_plot.m
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
3 changes: 3 additions & 0 deletions BGMG_cpp_stratified_qq_plot.m
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 23bb52d

Please sign in to comment.