pycallingcards.tools.GWAS#

pycallingcards.tools.GWAS(data, chr_name=['Chr_liftover', 'Start_liftover', 'End_liftover'], return_name='GWAS')[source]#

Calculate the GWAS result for the peak in the data. GWAS data is downloaded from GWAS Catalog.

Parameters:
  • data (DataFrame) – The pd.DataFrame. Should contain either 3 columns [chr,start,end] or 1 column like ‘chr8_64645834_64659215’.

  • chr_name (list (default: ['Chr_liftover', 'Start_liftover', 'End_liftover'])) – If the data contains either 3 columns [chr,start,end], input the column names as a list: eg [‘Chr_liftover’, ‘Start_liftover’, ‘End_liftover’]. If the data contains either 1 column like ‘chr8_64645834_64659215’, input the column name as a list: eg [‘Peak’].

  • return_name (str (default: 'GWAS')) – The name of the column for the result.

Return type:

DataFrame

Example:

>>> import pycallingcards as cc
>>> adata_cc = cc.datasets.mousecortex_data(data="CC")
>>> result = cc.tl.pair_peak_gene_bulk(adata_cc,"https://github.com/The-Mitra-Lab/pycallingcards_data/releases/download/data/deseq_MF.csv")
>>> GWAS_result = cc.tl.GWAS(result, chr_name = ['Peak'])