greatpy.tl.set_fdr
- greatpy.tl.set_fdr(enrichment_df, alpha=0.05)
Create new columns in the dataframe with the fdr correction
- Parameters:
- enrichment_df : pd.DataFrame
Dataframe with the enrichment computed by enrichment function
- alpha : float
alpha value for the fdr correction
Default is
0.05
- Returns:
dataframe new columns with the fdr correction for each p-value
- Return type:
pd.DataFrame
Examples
>>> test,regdom,size,ann = loader( "../data/tests/test_data/input/03_srf_hg19.bed", "../data/human/hg19/regulatory_domain.bed", "../data/human/hg19/chr_size.bed", "../data/human/ontologies.csv" ) >>> enrichment = great.tl.enrichment( "../data/tests/test_data/input/03_srf_hg19.bed", "../data/human/hg19/regulatory_domain.bed", "../data/human/hg19/chr_size.bed", "../data/human/ontologies.csv", binom=True, hypergeom=True ) >>> fdr = set_fdr(enrichment,alpha=0.05) >>> fdr.head() ... | | go_term | binom_p_value | hypergeom_p_value | binom_fdr | hypergeom_fdr | ... |:-----------|:-----------------------------------------------------------------|----------------:|--------------------:|------------:|----------------:| ... | GO:0045887 | positive regulation of synaptic growth at neuromuscular junction | 5.17744e-13 | 0.0029275 | 3.0754e-10 | 0.0913909 | ... | GO:0044721 | protein import into peroxisome matrix, substrate release | 4.83812e-10 | 0.0029275 | 9.3723e-08 | 0.0913909 | ... | GO:0036250 | peroxisome transport along microtubule | 4.83812e-10 | 0.0029275 | 9.3723e-08 | 0.0913909 | ... | GO:0016561 | protein import into peroxisome matrix, translocation | 6.31131e-10 | 0.00584656 | 9.3723e-08 | 0.0913909 | ... | GO:0047485 | protein N-terminus binding | 1.2945e-09 | 0.0050377 | 1.53786e-07 | 0.0913909 |