Cloufield / gwaslab

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

getlead() cannot handle "X" as CHR value #18

Closed michaelofrancis closed 1 year ago

michaelofrancis commented 1 year ago

Hi, I just struggled with my data for about an hour to finally realize that the error I was getting from mysumstats.get_lead() TypeError: boolean value of NA is ambiguous was caused by values of "X" in the CHR column. Replacing with "23" fixed this issue. Perhaps the manual page should specify? Thanks!

Cloufield commented 1 year ago

Hi, thanks for the suggestion. I will add a note for it.

FYI, https://cloufield.github.io/gwaslab/tutorial_3.4/#standardization-qc-basic_check Before plotting or using other functions, you can first run .basic_check() , which is designed to fix problems like this. (including conversion of x to 23)

michaelofrancis commented 1 year ago

That is a good function, I wasn't using that. I think the source of my confusion was that "X" does work in plot_mqq() so I didn't realize this was the issue for get_lead(). Thank you again.