Skip to content

Commit

Permalink
fix for set enrichment
Browse files Browse the repository at this point in the history
  - bonferroni cutoff: fixed order of denominator/numerator
  - updated changes
  - updated version number and README
  • Loading branch information
weiju committed Aug 22, 2016
1 parent b23c1f0 commit f663616
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 4 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.rst
@@ -1,6 +1,14 @@
Changes
=======

Version 1.2.0, 2016/08/22
-------------------------

- fix: numeric row names are converted to string
- fix: DataMatrix.subtract_with_quantile() did not have any effect
- fix: set enrichment, bonferroni cutoff denominator-numerator were
in wrong positions

Version 1.2.0, 2016/08/08
-------------------------

Expand Down
8 changes: 8 additions & 0 deletions README.md
Expand Up @@ -126,6 +126,14 @@ Running cMonkey on Human data is somewhat difficult because neither the string d

### Package maintainers

#### General

The distribution is built using setuptools and wheel format

- setup.py contains all information needed to build the distribution
increase the version number before making a distribution
- record user-relevant changes in CHANGELOG.rst

#### Build distribution

python3 setup.py sdist bdist_wheel
Expand Down
7 changes: 4 additions & 3 deletions cmonkey/set_enrichment.py
Expand Up @@ -188,7 +188,7 @@ def __init__(self, organism, membership, ratios, config_params=None):

def bonferroni_cutoff(self):
"""Bonferroni cutoff value"""
return float(self.num_clusters()) / 0.05
return 0.05 / float(self.num_clusters())

def do_compute(self, iteration_result, ref_matrix):
"""compute method
Expand Down Expand Up @@ -229,15 +229,16 @@ def do_compute(self, iteration_result, ref_matrix):
SET_SET_TYPE = set_type
logging.info("PROCESSING SET TYPE '%s'", set_type.name)
start1 = util.current_millis()
cutoff = self.bonferroni_cutoff()
if use_multiprocessing:
with util.get_mp_pool(self.config_params) as pool:
results = pool.map(compute_cluster_score,
[(cluster, self.bonferroni_cutoff(), ref_min_score)
[(cluster, cutoff, ref_min_score)
for cluster in xrange(1, self.num_clusters() + 1)])
else:
results = []
for cluster in xrange(1, self.num_clusters() + 1):
results.append(compute_cluster_score((cluster, self.bonferroni_cutoff(), ref_min_score)))
results.append(compute_cluster_score((cluster, cutoff, ref_min_score)))

elapsed1 = util.current_millis() - start1
logging.info("ENRICHMENT SCORES COMPUTED in %f s, STORING...",
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Expand Up @@ -9,7 +9,7 @@
LICENSE = 'LGPL V3'
URI = 'https://github.com/baliga-lab/cmonkey2'
AUTHOR = 'Baliga Lab, Institute for Systems Biology'
VERSION = '1.2.0'
VERSION = '1.2.1'

KEYWORDS = ['class', 'cmonkey2']

Expand Down

0 comments on commit f663616

Please sign in to comment.