precimed / mixer

Causal Mixture Model for GWAS summary statistics
GNU General Public License v3.0
65 stars 18 forks source link

Change color of Venn Diagrams #26

Closed jaamarks closed 4 years ago

jaamarks commented 4 years ago

In your paper (figure 3) the venn diagrams have a few different colors used to distinguish between the different phenotypic comparisons. How can I specify the colors for my Venn Diagrams? I don't see this as an argument.

usage: mixer_figures.py two [-h] [--argsfile ARGSFILE] [--out OUT]
                            [--ext {png,svg} [{png,svg} ...]] [--zmax ZMAX]
                            [--json JSON [JSON ...]] [--trait1 TRAIT1]
                            [--trait2 TRAIT2] [--trait1-file TRAIT1_FILE]
                            [--trait2-file TRAIT2_FILE]


Also, is there an option to specify whether to include the SE in the venn diagram? The SE was not include in the diagrams that I made like you have published in figure 3.

ofrei commented 4 years ago

@jaamarks Appologies for very slow response on my part. I will add options in mixer_figures.py to specify the colors, by tomorrow.

SE are deliberately removed, and replaced by AIC / BIC analysis (Akaike / Bayesian information criterions). In the original publication AIC / BIC were only implemented for the univariate analysis. Now, running MiXeR on more traits, we find that even well powered GWAS in univariate analysis in some cases are not well powered for cross-trait analysis. AIC / BIC are calculated and stored in the csv file produced by mixer_figures.py, but this is not properly documented. I'll address this in the same change with customizing colors (by tomorrow).

SE were removed because the calculations were based on observed Fisher's information matrix, i.e. hessian of the log likelihood. As our log-likelihood is a somewhat noisy function, numeric hessian calculation is not quite robust. We've considered things like Sandwich variance estimator, but safest and robust option for SE calculation will be go for the same approach as in my colleague's paper ( https://www.biorxiv.org/content/10.1101/772202v1 ). This isn't available in MiXeR yet, but it's a plan for my ongoing MiXeR v2 work.

ofrei commented 4 years ago

@jaamarks make_figures.py two got two new arguments, --trait1-color and --trait2-color:

  --trait1-color {0,1,2,3,4,5,6,7,8}
                        color for the venn diagram (first trait); 0-8, encoded
                        as tab10 color palette (https://matplotlib.org/3.1.1/t
                        utorials/colors/colormaps.html) excluding grey code
                        which is reserved the polygenic overlap
  --trait2-color {0,1,2,3,4,5,6,7,8}
                        color for the venn diagram (second trait)

AIC and BIC for bivariate analysis are described in the README.md file: https://github.com/precimed/mixer#aic-bic-interpretation

jaamarks commented 4 years ago

Thank you @ofrei !