satchellhong / qqman

Draws Manhattan plot and QQ plot using plink assoc output.
MIT License
2 stars 2 forks source link

Unexpected ordering of chromosomes #1

Open LindoNkambule opened 3 years ago

LindoNkambule commented 3 years ago

Hi,

I am trying to generate a Manhattan plot using qqman.manhattan(man_df_pruned, show=True, xrotation = 90.0) and getting an unexpected ordering of chromosomes. The ordering is as follows: 23, 24, 1, 10, ..., 19, 2, 20, 21, 22, 3...

man_df_pruned is a pandas df with three columns: 'CHR', 'BP', 'P'

iamjli commented 3 years ago

I ran into an issue with ordering as well. The function casts the chromosome column to categorical (in place!), so the order of the categories are defined by the order that you provide.