Skip to content

Commit 59b3b81

Browse files
Merge pull request #46 from MetaSys-LISBP/dev
Dev to 2.2.3
2 parents 149ae8f + 357008a commit 59b3b81

File tree

5 files changed

+20
-5
lines changed

5 files changed

+20
-5
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22

33
[![PyPI version](https://badge.fury.io/py/IsoCor.svg)](https://badge.fury.io/py/IsoCor)
44
[![PyPI pyversions](https://img.shields.io/pypi/pyversions/isocor.svg)](https://pypi.python.org/pypi/isocor/)
5-
[![Build Status](https://travis-ci.com/MetaSys-LISBP/IsoCor.svg?branch=master)](https://travis-ci.com/MetaSys-LISBP/IsoCor)
65
[![Documentation Status](https://readthedocs.org/projects/isocor/badge/?version=latest)](http://isocor.readthedocs.io/?badge=latest)
6+
[![install with bioconda](https://img.shields.io/badge/install%20with-bioconda-brightgreen.svg?style=flat)](http://bioconda.github.io/recipes/isocor/README.html)
7+
78

89
[![IsoCor graphical user interface](https://raw.githubusercontent.com/MetaSys-LISBP/IsoCor/master/doc/_static/isocor_GUI.png)](https://isocor.readthedocs.io/en/latest/)
910

isocor/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"""
66

77
# Version number MUST be maintained here (x.y.z format)
8-
__version__ = '2.2.2'
8+
__version__ = '2.2.3'
99

1010
from isocor.mscorrectors import MetaboliteCorrectorFactory
1111
from isocor.mscorrectors import LowResMetaboliteCorrector, HighResMetaboliteCorrector

isocor/mscorrectors.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -240,13 +240,13 @@ def _correct_with_bfgs(self, measurement):
240240
enrichment = math.fsum(
241241
p*i for i, p in enumerate(isotopologue_fraction))/self.formula[self._tracer_el]
242242
else:
243-
isotopologue_fraction = [np.NaN for p in corrected_area]
244-
enrichment = np.NaN
243+
isotopologue_fraction = [np.nan for p in corrected_area]
244+
enrichment = np.nan
245245
sum_m = math.fsum(measurement)
246246
if sum_m != 0:
247247
residuum = [v/sum_m for v in resi]
248248
else:
249-
residuum = [np.NaN for v in resi]
249+
residuum = [np.nan for v in resi]
250250
return corrected_area, isotopologue_fraction, residuum, enrichment
251251

252252
def get_mass_distribution_vector(self):
@@ -671,3 +671,4 @@ def compute_correction_matrix(self):
671671
else:
672672
correction_matrix = self._correctionmatrix_combination()
673673
return correction_matrix
674+

isocor/tests/test_correction_process_HighRes.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,13 @@
1414

1515

1616
@pytest.mark.parametrize("data", [{"formula": "C2H2",
17+
"resolution_at_400": 1e3,
18+
"tracer": "13C",
19+
"v_expected": "[np.nan, np.nan, np.nan]",
20+
"v_measured": "[0, 0, 0]",
21+
"correct_NA_tracer": False,
22+
"tracer_purity": [0.0, 1.0]},
23+
{"formula": "C2H2",
1724
"resolution_at_400": 1e3,
1825
"tracer": "13C",
1926
"v_expected": "[1., 0., 0.]",

isocor/tests/test_correction_process_LowRes.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@
1313
# Tests the entire correction process at low resolution
1414
# (here pXY represents natural abundance of isotope X of element Y)
1515
@pytest.mark.parametrize("data", [{"formula": "C2H2",
16+
"tracer": "13C",
17+
"v_expected": "[np.nan, np.nan, np.nan]",
18+
"v_measured": "[0, 0, 0]",
19+
"correct_NA_tracer": False,
20+
"tracer_purity": [0.0, 1.0]},
21+
{"formula": "C2H2",
1622
"tracer": "13C",
1723
"v_expected": "[1., 0., 0.]",
1824
"v_measured": "[p1H * p1H, p1H * p2H * 2, p2H * p2H]",

0 commit comments

Comments
 (0)