From 428070d1d0bc6e49ff7322e112a091b0e9bef9ce Mon Sep 17 00:00:00 2001 From: Thomas Sell Date: Thu, 15 Aug 2024 13:25:50 +0200 Subject: [PATCH] fix: Inline links for material names --- samplesheets/assayapps/generic/plugins.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/samplesheets/assayapps/generic/plugins.py b/samplesheets/assayapps/generic/plugins.py index 1eec422c..176c4550 100644 --- a/samplesheets/assayapps/generic/plugins.py +++ b/samplesheets/assayapps/generic/plugins.py @@ -65,9 +65,13 @@ def _link_from_comment(cell, header, top_header, target_cols, url): return True # Special case for Material Names if ( - top_header['value'] - in th.DATA_FILE_HEADERS + th.MATERIAL_NAME_HEADERS - ) and (header['value'] == 'Name'): + ( + top_header['value'] + in th.DATA_FILE_HEADERS + th.MATERIAL_NAME_HEADERS + ) + and top_header['value'].lower() in target_cols + and (header['value'] == 'Name') + ): cell['link'] = f"{url}/{cell['value']}" return True # Handle everything else