greatpy.tl.set_bonferroni
- greatpy.tl.set_bonferroni(enrichment_df, alpha=0.05)
Create new columns in the dataframe with the Bonferroni correction
- Parameters:
- enrichment_df : pd.DataFrame
Dataframe with the enrichment computed by enrichment function
- alpha : float
alpha value for the Bonferroni correction
Default is
0.05
- Returns:
dataframe new columns with the Bonferroni 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 ) >>> bonferroni = set_bonferroni(enrichment,alpha=0.05) >>> bonferroni.head() ... | | go_term | binom_p_value | hypergeom_p_value | binom_bonferroni | hypergeom_bonferroni | ... |:-----------|:-----------------------------------------------------------------|----------------:|--------------------:|-------------------:|-----------------------:| ... | GO:0045887 | positive regulation of synaptic growth at neuromuscular junction | 5.17744e-13 | 0.0029275 | 3.0754e-10 | 1 | ... | GO:0044721 | protein import into peroxisome matrix, substrate release | 4.83812e-10 | 0.0029275 | 2.87384e-07 | 1 | ... | GO:0036250 | peroxisome transport along microtubule | 4.83812e-10 | 0.0029275 | 2.87384e-07 | 1 | ... | GO:0016561 | protein import into peroxisome matrix, translocation | 6.31131e-10 | 0.00584656 | 3.74892e-07 | 1 | ... | GO:0047485 | protein N-terminus binding | 1.2945e-09 | 0.0050377 | 7.68931e-07 | 1 |