pymodulon.enrichment
Contains functions for gene set enrichment analysis
Module Contents
Functions
|
Creates contingency table for gene enrichment |
|
Computes enrichment statistic for gene_set in target_genes. |
|
Runs false detection correction for a table of statistics |
|
Converts a complex regulon (regulon_str) into a list of genes |
|
Computes enrichment statistics for a gene_set in a regulon |
|
Compare a gene set against an entire TRN |
|
Compare a gene set against a dataframe of gene annotations |
-
pymodulon.enrichment.
contingency
(set1, set2, all_genes)[source] Creates contingency table for gene enrichment
-
pymodulon.enrichment.
compute_enrichment
(gene_set, target_genes, all_genes, label=None)[source] Computes enrichment statistic for gene_set in target_genes.
- Parameters
- Returns
Table containing statistically significant enrichments
- Return type
pd.Series
-
pymodulon.enrichment.
FDR
(p_values, fdr, total=None)[source] Runs false detection correction for a table of statistics
-
pymodulon.enrichment.
parse_regulon_str
(regulon_str, trn)[source] Converts a complex regulon (regulon_str) into a list of genes
-
pymodulon.enrichment.
compute_regulon_enrichment
(gene_set, regulon_str, all_genes, trn)[source] Computes enrichment statistics for a gene_set in a regulon
- Parameters
- Returns
result – Table containing statistically significant enrichments
- Return type
-
pymodulon.enrichment.
compute_trn_enrichment
(gene_set, all_genes, trn, max_regs=1, fdr=0.01, method='both', force=False)[source] Compare a gene set against an entire TRN
- Parameters
gene_set (set) – Gene set for enrichment (e.g. genes in iModulon)
all_genes (set) – Set of all genes
trn (DataFrame) – Table containing transcriptional regulatory network
max_regs (int) – Maximum number of regulators to include in complex regulon (default: 1)
fdr (float) – False detection rate (default = .01)
method (str) – How to combine complex regulons. (default: ‘both’) “or” computes enrichment against union of regulons “and” computes enrichment against intersection of regulons “both” performs both tests
force (bool) – Allows computation of >2 regulators (default = False)
- Returns
Table containing statistically significant enrichments
- Return type