Skip to content

Commit

Permalink
Merge pull request #5 from MetaSys-LISBP/dev
Browse files Browse the repository at this point in the history
v2.0.5 to fix #4
  • Loading branch information
bdelepine authored Nov 27, 2018
2 parents 2cd6f9b + e456015 commit 95ba2a6
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
version = '2.0'
# The full version, including alpha/beta/rc tags.
# Do not forget to update PyPi (setup.py) version
release = '2.0.4'
release = '2.0.5'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
2 changes: 1 addition & 1 deletion isocor/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
for conveniance.
"""

__version__ = '2.0.4'
__version__ = '2.0.5'

from isocor.mscorrectors import MetaboliteCorrectorFactory
from isocor.mscorrectors import LowResMetaboliteCorrector, HighResMetaboliteCorrector
10 changes: 5 additions & 5 deletions isocor/ui/isocordb.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def registerIsopotes(self, isotopesfile=Path("Isotopes.dat")):
if not isotopesfile.is_file():
raise ValueError(
"Isotopes database not found in:\n'{}'.".format(isotopesfile))
with open(isotopesfile, 'r') as fp:
with open(str(isotopesfile), 'r') as fp: # str for compatibility with Python3.5
self.dfIsotopes = pd.read_csv(fp)
for i in ['element', 'mass', 'abundance']:
if i not in self.dfIsotopes.columns:
Expand All @@ -79,7 +79,7 @@ def registerIsopotes(self, isotopesfile=Path("Isotopes.dat")):
except:
raise ValueError("Error in 'Isotopes.dat' at line {}:\nabundance={!r}".format(i+2, item))
# reload file
with open(isotopesfile, 'r') as fp:
with open(str(isotopesfile), 'r') as fp:
self.dfIsotopes = pd.read_csv(
fp, converters={'mass': Decimal, 'abundance': np.float64})
self._stripColNames(self.dfIsotopes)
Expand All @@ -93,7 +93,7 @@ def registerDerivativesDB(self, derivativesfile=Path("Derivatives.dat")):
if not derivativesfile.is_file():
raise ValueError(
"Derivatives database not found in:\n'{}'.".format(derivativesfile))
with open(derivativesfile, 'r') as fp:
with open(str(derivativesfile), 'r') as fp:
self.dfDerivatives = pd.read_csv(fp, delimiter='\t')
for i in ['name', 'formula']:
if i not in self.dfDerivatives.columns:
Expand All @@ -105,7 +105,7 @@ def registerMetabolitesDB(self, metabolitesfile=Path("Metabolites.dat")):
if not metabolitesfile.is_file():
raise ValueError(
"Metabolites database not found in:\n'{}'.".format(metabolitesfile))
with open(metabolitesfile, 'r') as fp:
with open(str(metabolitesfile), 'r') as fp:
self.dfMetabolites = pd.read_csv(fp, delimiter='\t')
for i in ['name', 'formula']:
if i not in self.dfMetabolites.columns:
Expand All @@ -116,7 +116,7 @@ def registerMetabolitesDB(self, metabolitesfile=Path("Metabolites.dat")):
def registerDatafile(self, datafile=Path("mydata.tsv")):
if not Path(datafile).is_file():
raise ValueError("No data file selected.")
with open(datafile, 'r') as fp:
with open(str(datafile), 'r') as fp:
self.dfDatafile = pd.read_csv(fp, delimiter='\t')
for i in ['sample', 'metabolite', 'derivative', 'area', 'isotopologue']:
if i not in self.dfDatafile.columns:
Expand Down
2 changes: 1 addition & 1 deletion isocor/ui/isocorgui.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ def process(self):
formatter = logging.Formatter(
'%(asctime)s - %(name)s - %(levelname)s - %(message)s', "%Y-%m-%d %H:%M:%S")
log_file = Path(self.varOutputPath.get()).joinpath(fin_base + '.log')
file_handler = logging.FileHandler(log_file, mode='w+')
file_handler = logging.FileHandler(str(log_file), mode='w+')
file_handler.setLevel(self.log_level)
file_handler.setFormatter(formatter)
self.logger.addHandler(file_handler)
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

setuptools.setup(
name="IsoCor",
version="2.0.4",
version="2.0.5",
author="Pierre Millard, Baudoin Delépine, Matthieu Guionnet",
author_email="[email protected]",
description="IsoCor: Isotope Correction for mass spectrometry labeling experiments",
Expand Down

0 comments on commit 95ba2a6

Please sign in to comment.