Skip to content

Commit

Permalink
Changes for v1.2.0 (#9)
Browse files Browse the repository at this point in the history
Fix standard error calculation for combined replicates.
Update manuscript link in documentation.
Update version string.
  • Loading branch information
afrubin authored Sep 13, 2017
1 parent 561d973 commit fbd9c6d
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 9 deletions.
6 changes: 3 additions & 3 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@
# built documents.
#
# The short X.Y version.
version = '1.1'
version = '1.2'
# The full version, including alpha/beta/rc tags.
release = '1.1.1'
release = '1.2.0'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down Expand Up @@ -272,7 +272,7 @@
.. _HDF5: http://pandas.pydata.org/pandas-docs/stable/io.html#hdf5-pytables
.. _Enrich2 manuscript: http://biorxiv.org/content/early/2016/09/25/075150
.. _Enrich2 manuscript: https://genomebiology.biomedcentral.com/articles/10.1186/s13059-017-1272-5
.. Replacement aliases for intersphinx library documentation
Expand Down
7 changes: 6 additions & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

Enrich2: deep mutational scanning data analysis
============================================================================

Expand All @@ -12,6 +11,12 @@ To cite Enrich2, please reference `A statistical framework for analyzing deep mu

Enrich2 was written by `Alan F Rubin <mailto:[email protected]>`_ |ORCID_icon| http://orcid.org/0000-0003-1474-605X

.. error:: Important notice for users of Enrich2 v1.0 or v1.1

Enrich2 v1.2.0 corrects an error in the software that, for most datasets, resulted in the standard errors for combined scores being over-estimated. The counts, scores, and replicate-wise standard errors are unaffected.

If you have analyzed datasets that contain replicates with a previous version of Enrich2, the easiest way to get the correct standard error values is to delete the experiment HDF5_ file (the file name ends with ``'_exp.h5'``) and re-run the program. This will recalculate combined scores and standard errors without redoing other parts of the analysis.

.. |ORCID_icon| image:: _static/iD_icon.png
:target: http://orcid.org

Expand Down
4 changes: 2 additions & 2 deletions enrich2/experiment.py
Original file line number Diff line number Diff line change
Expand Up @@ -394,9 +394,9 @@ def calc_scores(self, label):
data.loc[:, idx[cnd, 'epsilon']] = 0.
# multiple replicates
else:
betaML, sigma2ML, eps = rml_estimator(y, sigma2i)
betaML, var_betaML, eps = rml_estimator(y, sigma2i)
data.loc[:, idx[cnd, 'score']] = betaML
data.loc[:, idx[cnd, 'SE']] = np.sqrt(sigma2ML)
data.loc[:, idx[cnd, 'SE']] = np.sqrt(var_betaML)
data.loc[:, idx[cnd, 'epsilon']] = eps

# special case for normalized wild type variant
Expand Down
2 changes: 1 addition & 1 deletion enrich2/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
__author__ = "Alan F Rubin"
__copyright__ = "Copyright 2016-2017, Alan F Rubin"
__license__ = "GPLv3"
__version__ = "1.1.1"
__version__ = "1.2.0"
__maintainer__ = "Alan F Rubin"
__email__ = "[email protected]"

Expand Down
3 changes: 2 additions & 1 deletion enrich2/random_effects.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,5 @@ def rml_estimator(y, sigma2i, iterations=50):
axis=0) / (sw - (sw2 / sw))
eps = np.abs(sigma2ML - sigma2ML_new)
sigma2ML = sigma2ML_new
return betaML, sigma2ML, eps
var_betaML = 1 / np.sum(1 / (sigma2i + sigma2ML), axis=0)
return betaML, var_betaML, eps
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

setup(
name="Enrich2",
version="1.1.1",
version="1.2.0",

packages=find_packages(),
package_data={
Expand Down

0 comments on commit fbd9c6d

Please sign in to comment.