Cloufield / gwaslab

A Python package for handling and visualizing GWAS summary statistics. https://cloufield.github.io/gwaslab/
GNU General Public License v3.0
151 stars 25 forks source link

effect size comparison #58

Closed swvanderlaan closed 12 months ago

swvanderlaan commented 12 months ago

I am applying this code.

compare = gl.compare_effect(path1= gwas_women_sumstats_eur_qc,
                      path2= gwas_men_sumstats_eur_qc,
                    #   mode="beta", # default
                      sig_level=5e-6,
                      is_reg=True,
                      is_45_helper_line=True,
                      label=["Women","Men","Both","None"],
                      xylabel_prefix="Per-allele effect size for ",
                    #   save=os.path.join(PLOTS_loc, "compare.500kb.72dpi.WOMEN_vs_MEN.EUR.pdf"),
                    #   saveargs={"dpi": 72},
                      verbose=True,
)

I am getting this error:

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
...
    154     other_codes = recode_for_categories(
    155         other.codes, other.categories, self.categories, copy=False
    156     )

TypeError: Categoricals can only be compared if 'categories' are the same.

How can I fix this?

Cloufield commented 12 months ago

Hi, Sorry for the bug. I fixed this in v3.4.28. Please try pip install gwaslab=3.4.28.

swvanderlaan commented 12 months ago

Yes! It works again. Thanks.