Skip to content

Commit 95ba2a6

Browse files
authored
Merge pull request #5 from MetaSys-LISBP/dev
v2.0.5 to fix #4
2 parents 2cd6f9b + e456015 commit 95ba2a6

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

doc/conf.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
version = '2.0'
5858
# The full version, including alpha/beta/rc tags.
5959
# Do not forget to update PyPi (setup.py) version
60-
release = '2.0.4'
60+
release = '2.0.5'
6161

6262
# The language for content autogenerated by Sphinx. Refer to documentation
6363
# for a list of supported languages.

isocor/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
for conveniance.
55
"""
66

7-
__version__ = '2.0.4'
7+
__version__ = '2.0.5'
88

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

isocor/ui/isocordb.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ def registerIsopotes(self, isotopesfile=Path("Isotopes.dat")):
6060
if not isotopesfile.is_file():
6161
raise ValueError(
6262
"Isotopes database not found in:\n'{}'.".format(isotopesfile))
63-
with open(isotopesfile, 'r') as fp:
63+
with open(str(isotopesfile), 'r') as fp: # str for compatibility with Python3.5
6464
self.dfIsotopes = pd.read_csv(fp)
6565
for i in ['element', 'mass', 'abundance']:
6666
if i not in self.dfIsotopes.columns:
@@ -79,7 +79,7 @@ def registerIsopotes(self, isotopesfile=Path("Isotopes.dat")):
7979
except:
8080
raise ValueError("Error in 'Isotopes.dat' at line {}:\nabundance={!r}".format(i+2, item))
8181
# reload file
82-
with open(isotopesfile, 'r') as fp:
82+
with open(str(isotopesfile), 'r') as fp:
8383
self.dfIsotopes = pd.read_csv(
8484
fp, converters={'mass': Decimal, 'abundance': np.float64})
8585
self._stripColNames(self.dfIsotopes)
@@ -93,7 +93,7 @@ def registerDerivativesDB(self, derivativesfile=Path("Derivatives.dat")):
9393
if not derivativesfile.is_file():
9494
raise ValueError(
9595
"Derivatives database not found in:\n'{}'.".format(derivativesfile))
96-
with open(derivativesfile, 'r') as fp:
96+
with open(str(derivativesfile), 'r') as fp:
9797
self.dfDerivatives = pd.read_csv(fp, delimiter='\t')
9898
for i in ['name', 'formula']:
9999
if i not in self.dfDerivatives.columns:
@@ -105,7 +105,7 @@ def registerMetabolitesDB(self, metabolitesfile=Path("Metabolites.dat")):
105105
if not metabolitesfile.is_file():
106106
raise ValueError(
107107
"Metabolites database not found in:\n'{}'.".format(metabolitesfile))
108-
with open(metabolitesfile, 'r') as fp:
108+
with open(str(metabolitesfile), 'r') as fp:
109109
self.dfMetabolites = pd.read_csv(fp, delimiter='\t')
110110
for i in ['name', 'formula']:
111111
if i not in self.dfMetabolites.columns:
@@ -116,7 +116,7 @@ def registerMetabolitesDB(self, metabolitesfile=Path("Metabolites.dat")):
116116
def registerDatafile(self, datafile=Path("mydata.tsv")):
117117
if not Path(datafile).is_file():
118118
raise ValueError("No data file selected.")
119-
with open(datafile, 'r') as fp:
119+
with open(str(datafile), 'r') as fp:
120120
self.dfDatafile = pd.read_csv(fp, delimiter='\t')
121121
for i in ['sample', 'metabolite', 'derivative', 'area', 'isotopologue']:
122122
if i not in self.dfDatafile.columns:

isocor/ui/isocorgui.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ def process(self):
174174
formatter = logging.Formatter(
175175
'%(asctime)s - %(name)s - %(levelname)s - %(message)s', "%Y-%m-%d %H:%M:%S")
176176
log_file = Path(self.varOutputPath.get()).joinpath(fin_base + '.log')
177-
file_handler = logging.FileHandler(log_file, mode='w+')
177+
file_handler = logging.FileHandler(str(log_file), mode='w+')
178178
file_handler.setLevel(self.log_level)
179179
file_handler.setFormatter(formatter)
180180
self.logger.addHandler(file_handler)

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
setuptools.setup(
99
name="IsoCor",
10-
version="2.0.4",
10+
version="2.0.5",
1111
author="Pierre Millard, Baudoin Delépine, Matthieu Guionnet",
1212
author_email="[email protected]",
1313
description="IsoCor: Isotope Correction for mass spectrometry labeling experiments",

0 commit comments

Comments
 (0)