diff --git a/VERSIONLOG.md b/VERSIONLOG.md index 46e0c252..1c49ab1c 100644 --- a/VERSIONLOG.md +++ b/VERSIONLOG.md @@ -4,6 +4,10 @@ Add element instruments to bioinfo_tab +## 20241031.1 + +Fix extra postfix in sample names for BCL Convert + ## 20241029.3 Fix missing settings for BCL Convert diff --git a/taca/illumina/Runs.py b/taca/illumina/Runs.py index 07d46098..8b2fda67 100644 --- a/taca/illumina/Runs.py +++ b/taca/illumina/Runs.py @@ -703,6 +703,22 @@ def _process_simple_lane_with_single_demux( os.unlink(dest) os.symlink(source, dest) + # Replace the file laneBarcode.html + html_report_laneBarcode = os.path.join( + source, "html", self.flowcell_id, "all", "all", "all", "laneBarcode.html" + ) + if os.path.exists(html_report_laneBarcode): + html_report_laneBarcode_parser = LaneBarcodeParser(html_report_laneBarcode) + # Remove the trailing "_SX" postfix from samples names for BCL Convert when it handles SmartSeq3 libraries + for entry in html_report_laneBarcode_parser.sample_data: + if "_S" in entry["Sample"]: + entry["Sample"] = "_".join(entry["Sample"].split("_")[:-1]) + html_report_laneBarcode_parser.sample_data = sorted( + html_report_laneBarcode_parser.sample_data, + key=lambda k: (k["Lane"].lower(), k["Sample"]), + ) + _generate_lane_html(html_report_laneBarcode, html_report_laneBarcode_parser) + def _fix_html_reports_for_complex_lanes( self, demux_folder,