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

filter_value filters all data #94

Closed lbwfff closed 4 months ago

lbwfff commented 4 months ago

Dear developer,

I am trying to filter Sumstats object using filter_value but I found that no matter what I do it filters out all the rows, below is my code Screenshot 2024-05-27 at 1 43 38 PM I tried mysumstats.filter_value('CHR==1').plot_mqq() and got empty images. At first I thought it was the pandas version, but installing 2.2 version of pandas didn't solve the problem, how can I fix this?

Thanks, LeeLee

Cloufield commented 4 months ago

Hi LeeLee,

Would you please check the data type of CHR by mysumstats.data.dtypes? Probably you need to run mysumstats.fix_chr() or mysumstats.basic_check() first, since 'CHR==1' only works if CHR is int.

lbwfff commented 4 months ago

Thanks! mysumstats.basic_check() solved my problem!