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

Module partition

source code

'partition.py' is a module that parallelizes the process of partitioning random sets of genes. This is where most of the complexity of Genecentric is, particularly in the 'localmaxcut' function.
Functions [hide private]
 
bpms()
Generates a list of happy bipartitions in parallel and then generates a list of BPMs in parallel.
source code
 
group_genes((i, g1))
group_genes is applied to every gene, and a BPM is generated from every gene. In particular, given M happy bipartitions, generate a BPM where the first module contains all genes that appeared in the same set in the M bipartitions C% of the time and the second module contains all genes that appeared in the opposite set in the M bipartitions C% of the time.
source code
 
localmaxcut(m)
Generates a random bipartition and makes the bipartition 'happy' by applying 'Weighted-Flip' (from Leiserson et al., 2011) until there are no unhappy genes left.
source code
 
get_unhappy(nweights)
Returns all of the genes that are unhappy given a dictionary of gene ids mapped to its total neighboring weights.
source code
 
random_bipartition()
Creates two random sets of genes from the genetic interaction data.
source code
Variables [hide private]
  happyparts = None
  __package__ = 'bpm'