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

How to save "gwaslab.Sumstats.Sumstats" object into csv/tsv file #33

Closed chenyangjjj closed 1 year ago

chenyangjjj commented 1 year ago

Hi Yunye,

I got some issues about saving my QC-ed sumstats into tap separated file(.csv, .tsv). How we can achieve this IN gwaslab?

Best,

Cloufield commented 1 year ago

Hi, to save the data, you could

  1. directly save sumstats.data like a dataframe sumstats.data.to_csv() . Descriptions can be found here: https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.to_csv.html
  2. save as other formats (such as ldsc) using sumstats.to_format() . Descriptions can be found here: https://cloufield.github.io/gwaslab/Format/
chenyangjjj commented 1 year ago

Thank you