Export data for Manhattan Plot


I tried to export data to do a Manhattan Plot. I would like a text file with 4 columns (chromosome, position,rsid and p values) or 3 columns (locus, rsid, p values).
I can list all the p values of my logistic regression, but I don’t know how to list and export these results in a table with the locus position and the rsid.


The key method is Table.export. If you have a MatrixTable, then you can get to a Table with .rows():

rows = mt.rows()
# the locus, alleles key isn't affected by 'select', so this stays
rows = rows.select(rows.rsid, rows.linreg.p_value).export('file')

You should also know we’re working on integrated manhattan plot functionality!