From 80a8b78ba49520727f81e2581da9743a19aa82b8 Mon Sep 17 00:00:00 2001 From: luisas Date: Thu, 19 Sep 2024 17:19:29 +0200 Subject: [PATCH 1/2] minifix shiny --- bin/shiny_app/shiny_app_merge_score_and_trace.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/bin/shiny_app/shiny_app_merge_score_and_trace.py b/bin/shiny_app/shiny_app_merge_score_and_trace.py index e5e4fe79..aca55c0d 100644 --- a/bin/shiny_app/shiny_app_merge_score_and_trace.py +++ b/bin/shiny_app/shiny_app_merge_score_and_trace.py @@ -3,18 +3,19 @@ def convert_time(time_str): # Regular expression to match the time components - pattern = re.compile(r'((?P\d+)h)?\s*((?P\d+)m)?\s*((?P\d+)s)?\s*((?P\d+)ms)?') + pattern = re.compile(r'((?P\d+(\.\d+)?)h)?\s*((?P\d+(\.\d+)?)m)?\s*((?P\d+(\.\d+)?)s)?\s*((?P\d+(\.\d+)?)ms)?') match = pattern.fullmatch(time_str.strip()) if not match: + print(time_str) raise ValueError("Time string is not in the correct format") time_components = match.groupdict(default='0') - hours = int(time_components['hours']) - minutes = int(time_components['minutes']) - seconds = int(time_components['seconds']) - milliseconds = int(time_components['milliseconds']) + hours = float(time_components['hours']) + minutes = float(time_components['minutes']) + seconds = float(time_components['seconds']) + milliseconds = float(time_components['milliseconds']) # Convert everything to minutes total_minutes = (hours * 60) + minutes + (seconds / 60) + (milliseconds / 60000) From 619ed86b1ab3e6ba9329830259c20a7daebc1b51 Mon Sep 17 00:00:00 2001 From: luisas Date: Thu, 19 Sep 2024 17:21:22 +0200 Subject: [PATCH 2/2] minifix shiny --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 713e5849..07869228 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -51,6 +51,7 @@ Initial release of nf-core/multiplesequencealign, created with the [nf-core](htt - [[#134](https://github.com/nf-core/multiplesequencealign/pull/134)] - Code revision for release preparation. - [[#138](https://github.com/nf-core/multiplesequencealign/pull/138)] - MultiQC as nf-core module and fix visualization. - [[#152](https://github.com/nf-core/multiplesequencealign/pull/152)] - Ignore kalign error 132 and print a warning (incompatibility with some CPU types). +- [[#153](https://github.com/nf-core/multiplesequencealign/pull/153)] - Fix time parser in shiny app. ### `Dependencies`