Skip to content

Commit a8c67c2

Browse files
authored
Merge pull request MetaSys-LISBP#9 from MetaSys-LISBP/dev
v2.0.3
2 parents 636f583 + d4f48d3 commit a8c67c2

File tree

7 files changed

+22
-23
lines changed

7 files changed

+22
-23
lines changed

docs/faq.rst

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,11 @@ What units should be used for input data?
2424
------------------------------
2525

2626
Input data (biomass concentration, metabolites concentrations, and time) can be provided to PhysioFit using any unit. Still, we recommand to use units for which values are as close to unity as
27-
possible to ensure numerical stability (e.g. 3 mM instead of 3e3 µM). Importantly, units of the estimated fluxes depend on units of time and metabolites and biomass concentrations.
27+
possible to ensure numerical stability (e.g. 3 mM instead of 3e3 µM). Importantly, units of the estimated fluxes depend on units of time and metabolites and biomass concentrations. The concentration of different metabolites can
28+
be provided using different units, but a single unit must be used for all measurements of a given metabolite.
2829

2930
.. seealso:: :ref:`flux units`
3031

31-
To avoid any numerical instabilities, provide values in a range not too far from unity (e.g. if a metabolite
32-
concentration is 2 mM, provide the value directly in mM and not as 2e-3 M). The concentration of different metabolites can
33-
be provided using different units, but a single unit must be used for all measurements of a given metabolite.
34-
3532
.. _`flux units`:
3633

3734
What are the flux units?

physiofit/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "2.0.2"
1+
__version__ = "2.0.3"

physiofit/base/io.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,15 +67,15 @@ def _read_data(path_to_data: str) -> DataFrame:
6767

6868
data_path = Path(path_to_data).resolve()
6969

70-
if data_path.suffix == ".tsv":
70+
if data_path.suffix in [".txt", ".tsv"]:
7171
data = read_csv(str(data_path), sep="\t")
7272
elif data_path.suffix == ".csv":
7373
data = read_csv(str(data_path), sep=";")
7474
else:
7575
if not data_path.exists():
7676
raise ValueError(f"{data_path} is not a valid file")
7777
else:
78-
raise TypeError(f"{data_path} is not a valid format. Accepted formats are .csv or .tsv")
78+
raise TypeError(f"{data_path} is not a valid format. Accepted formats are .csv, .txt or .tsv")
7979

8080
IoHandler._verify_data(data)
8181
return data

physiofit/ui/cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ def parse_args():
8282
parser = argparse.ArgumentParser("Physiofit: Extracellular flux estimation software")
8383

8484
# Parse data arguments (tsv + json)
85-
parser.add_argument("-t", "--data", type=str, help="Path to data file in tsv format")
85+
parser.add_argument("-t", "--data", type=str, help="Path to data file in tabulated format (txt or tsv)")
8686
parser.add_argument("-c", "--config", type=str, help="Path to config file in json format")
8787

8888
# Parse basic parameters

physiofit/ui/gui.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ def _initialize_opt_menu(self):
7878
if file_extension == "json":
7979
config = IoHandler.read_json_config(self.data_file)
8080
input_values.update(config)
81-
elif file_extension != "tsv":
81+
elif file_extension not in ["tsv", "txt"]:
8282
raise KeyError(
8383
f"Wrong input file format. Accepted formats are tsv for data files or json for configuration "
8484
f"files. Detected file: {self.data_file.name}")
@@ -94,7 +94,7 @@ def _initialize_opt_menu(self):
9494
submitted = self._initialize_opt_menu_widgets(input_values, file_extension)
9595

9696
if submitted:
97-
if file_extension == "tsv":
97+
if file_extension in ["tsv", "txt"]:
9898
self.io_handler.data = data
9999
self.io_handler.data = self.io_handler.data.sort_values("time", ignore_index=True)
100100
self.io_handler.names = self.io_handler.data.columns[1:].to_list()
@@ -145,7 +145,7 @@ def _initialize_opt_menu_widgets(self, input_values, file_extension):
145145
disabled=enable_mc
146146
)
147147

148-
if file_extension == "tsv":
148+
if file_extension in ["tsv", "txt"]:
149149

150150
# Set up tkinter for directory chooser
151151
root = tk.Tk()

requirements.txt

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
pandas
2-
matplotlib
3-
numpy
4-
scipy
1+
pandas >= 1.1.5
2+
numpy >= 1.21.6
3+
scipy >= 1.5.2
4+
streamlit>=1.8.0
5+
matplotlib >= 3.5.1
6+
openpyxl >= 3.0.9

setup.cfg

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@ classifiers =
1616

1717
[options]
1818
packages = find:
19-
python_requires = >=3.6
19+
python_requires = >=3.7
2020
install_requires =
21-
pandas
22-
numpy
23-
scipy
24-
streamlit>=1.5.0
25-
matplotlib
26-
openpyxl
21+
pandas >= 1.1.5
22+
numpy >= 1.21.6
23+
scipy >= 1.5.2
24+
streamlit>=1.8.0
25+
matplotlib >= 3.5.1
26+
openpyxl >= 3.0.9
2727

2828
[options.entry_points]
2929
console_scripts =

0 commit comments

Comments
 (0)