Package bpm :: Module enrichment
[hide private]
[frames] | no frames]

Module enrichment

source code

enrichment.py provides functions for gathering, reading, writing and sorting GO enrichment information from Funcassociate.
Functions [hide private]
 
enrich(modulecnt, (bpmi, modi, genes))
Initiates a request to Funcassociate and returns a dictionary of goterms.
source code
 
sortgo(goterms)
Sorts the keys of a goterms dictionary according to the current configuration.
source code
 
read_bpm(bpmtext)
Parses raw BPM text (everything between the '>' and '>') from a gobpm file, and turns it into a goterms dictionary keyed by GO accession.
source code
 
write_bpm(bpmi, modi, genes, goterms)
Writes a BPM entry with GO enrichment information in gobpm file format.
source code
Variables [hide private]
  __package__ = 'bpm'
Function Details [hide private]

enrich(modulecnt, (bpmi, modi, genes))

source code 
Initiates a request to Funcassociate and returns a dictionary of goterms.
Parameters:
  • modulecnt - The total number of modules in the BPM file.
  • bpmi, modi, genes - A tuple representing a module. 'bpmi' is the BPM index number, 'modi' is the module index number, and 'genes' is a list of gene names in the module.
Returns:
A four-tuple of the input module and its associated go terms.

read_bpm(bpmtext)

source code 

Parses raw BPM text (everything between the '>' and '>') from a gobpm file, and turns it into a goterms dictionary keyed by GO accession.

The fields in each dictionary entry represent the GO information returned by Funcassociate. Namely, a p-value, the number of genes in the module with the same enrichment, the number of genes in the query, the name of the GO term, and finally, the names of the genes in the query with the corresponding GO enrichment.