Skip to content

Commit

Permalink
Merge pull request #39 from llegregam/Dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
llegregam committed Apr 25, 2023
2 parents acd7052 + 6d88653 commit 6c1e070
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion ms_reader/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "1.4.1"
__version__ = "1.4.2"
13 changes: 10 additions & 3 deletions ms_reader/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,10 +200,17 @@ def convert_df(df):
submit_pca_out = st.form_submit_button("Export stat output for PCA")

if reader.calib_data is not None:
reader.handle_calibration()

try:
reader.handle_calibration()
except Exception as e:
st.error("There was an error while handling the calibration data")
raise
if report_box:
reader.generate_report(metabolites_to_drop)
try:
reader.generate_report(metabolites_to_drop)
except Exception as e:
st.error("There was an error while generating the report")
raise
if preview:
with st.expander("Show report"):
st.dataframe(reader.calrep)
Expand Down
2 changes: 1 addition & 1 deletion ms_reader/extract.py
Original file line number Diff line number Diff line change
Expand Up @@ -921,7 +921,7 @@ def _output_log(self, destination):
def export_stat_output(self, path, pca=False):

dest = Path(path)
dest = dest / "output_for_graphstat.tsv"
dest = dest / "output_for_graphstat.tsv" if not pca else dest / "ouptput_for_graphstat_PCA.tsv"
stat_out = self._build_stat_output(pca)
stat_out.to_csv(str(dest), sep="\t", index=False, encoding='utf-8-sig')
self._output_log(path)
Expand Down

0 comments on commit 6c1e070

Please sign in to comment.