From 4237c6bd76505a2d6234b595eb956955b8713333 Mon Sep 17 00:00:00 2001 From: ssjunnebo Date: Tue, 27 Jan 2026 08:52:03 +0100 Subject: [PATCH 1/4] Correct URL in email --- taca/analysis/analysis_element.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/taca/analysis/analysis_element.py b/taca/analysis/analysis_element.py index c46c0a77..04f85b7c 100755 --- a/taca/analysis/analysis_element.py +++ b/taca/analysis/analysis_element.py @@ -153,7 +153,7 @@ def _process(run_to_process): email_subject = f"{run} has been transferred to the analysis cluster" email_message = ( f"Rsync of data for run {run} to the analysis cluster has finished!\n" - f"The run is available at https://genomics-status.scilifelab.se/flowcells_element/{run}" + f"The run is available at https://genomics-status.scilifelab.se/flowcells_element/{run.NGI_run_id}" ) send_mail(email_subject, email_message, CONFIG["mail"]["recipients"]) From 13ba235e1faf19144b78571223a3f8ca4148617a Mon Sep 17 00:00:00 2001 From: ssjunnebo Date: Tue, 27 Jan 2026 09:41:30 +0100 Subject: [PATCH 2/4] Send email when MismatchThreshold is set to 0 --- taca/element/Element_Runs.py | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/taca/element/Element_Runs.py b/taca/element/Element_Runs.py index 0ac1a5d0..e3c64445 100644 --- a/taca/element/Element_Runs.py +++ b/taca/element/Element_Runs.py @@ -13,7 +13,9 @@ import pandas as pd from Levenshtein import distance +from taca.utils.config import CONFIG from taca.utils.filesystem import chdir +from taca.utils.misc import send_mail from taca.utils.statusdb import ElementRunsConnection logger = logging.getLogger(__name__) @@ -724,7 +726,22 @@ def make_demux_manifests( ) settings_kvs["I1MismatchThreshold"] = str(i1_mm_threshold) settings_kvs["I2MismatchThreshold"] = str(i2_mm_threshold) - + if i1_mm_threshold == 0 or i2_mm_threshold == 0: + email_subject = ( + f"MismatchThreshold(s) set to 0 for {self.NGI_run_id}" + ) + email_message = ( + f"During demultiplexing manifest generation for run {self.NGI_run_id}, " + "the minimum distance between some index sequences was at or below 2. " + "As a result, the I1MismatchThreshold and/or I2MismatchThreshold was set to 0.\n\n" + f"Lanes: {', '.join(map(str, group['Lane'].unique()))}\n" + f"I1MismatchThreshold: {i1_mm_threshold}\n" + f"I2MismatchThreshold: {i2_mm_threshold}\n\n" + "Please check that this is acceptable and inform the user." + ) + send_mail( + email_subject, email_message, CONFIG["mail"]["recipients"] + ) # Add PhiX to group group = pd.concat([group, group_controls], axis=0, ignore_index=True) From e8c49c12141c9faf741292c6d85d0868dbd36f3d Mon Sep 17 00:00:00 2001 From: ssjunnebo Date: Tue, 27 Jan 2026 09:44:48 +0100 Subject: [PATCH 3/4] Versioning --- VERSIONLOG.md | 4 ++++ taca/__init__.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/VERSIONLOG.md b/VERSIONLOG.md index 14ed2542..29c618bc 100644 --- a/VERSIONLOG.md +++ b/VERSIONLOG.md @@ -1,5 +1,9 @@ # TACA Version Log +##20260127.1 + +Email when MismatchThreshold is set to 0 for AVITI runs + ##20251127.1 Enable archiving of Aviti Teton runs to PDC diff --git a/taca/__init__.py b/taca/__init__.py index 2cc41b5c..35d2b951 100644 --- a/taca/__init__.py +++ b/taca/__init__.py @@ -1,3 +1,3 @@ """Main TACA module""" -__version__ = "1.6.14" +__version__ = "1.6.15" From 3e5833975caff336a8c8276609f9557d023e49e5 Mon Sep 17 00:00:00 2001 From: ssjunnebo Date: Tue, 27 Jan 2026 10:12:14 +0100 Subject: [PATCH 4/4] Fix test_process_on_finished_run --- tests/analysis/test_analysis_element.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/analysis/test_analysis_element.py b/tests/analysis/test_analysis_element.py index cf9a33c5..489786ae 100644 --- a/tests/analysis/test_analysis_element.py +++ b/tests/analysis/test_analysis_element.py @@ -154,6 +154,14 @@ def test_process_on_finished_run(aviti_fixture): # Sub-mock configuration mocks["mock_db"].return_value.check_db_run_status.return_value = "ongoing" mocks["mock_db"].return_value.upload_to_statusdb.return_value = None + # set mocks["mock_mail"] to mock taca.element.Element_Runs.send_mail instead + # of taca.analysis.analysis_element.send_mail + mocks["mock_mail"].stop() + mocks["mock_mail"] = patch("taca.element.Element_Runs.send_mail").start() + patch( + "taca.element.Element_Runs.CONFIG", + new={**get_config(tmp), "mail": {"recipients": [""]}}, + ).start() # Add metadata files run_dir = create_element_run_dir(