Unfortunately, I have not found a solution myself. How do I create a Manhattan plot within python using, e.g., matplotlib / pandas. The problem is that in these plots the x-axis is discrete.
from pandas import DataFrame
from scipy.stats import uniform
from scipy.stats import randint
import numpy as np
# some sample data
df = DataFrame({'gene' : ['gene-%i' % i for i in np.arange(1000)],
'pvalue' : uniform.rvs(size=1000),
'chromosome' : ['ch-%i' % i for i in randint.rvs(0,12,size=1000)]})
# -log_10(pvalue)
df['minuslog10pvalue'] = -np.log10(df.pvalue)
df = df.sort_values('chromosome')
# How to plot gene vs. -log10(pvalue) and colour it by chromosome?