Description of the bug
Two defects in bin/multiqc_mappings_config.py, which mask each other:
▎ - header = fin.readline().split(",") leaves the trailing \n on the last element, so x.strip('"') cannot strip its closing quote — the final rename button is labelled instrument_model". That same stray \n is the only thing separating the block from sample_names_rename:, so fixing the quote alone produces invalid YAML.
▎ - line.strip().split(",") is a naive split, not CSV parsing. Any field containing a comma is split and rejoined with ", ", mutating the value. With --sample_mapping_fields sample_title on ENA records whose titles contain commas, 12/12 rows were altered ('LMOMETAT:2017-10-31, filter fraction:0.2_a' → 'LMOMETAT:2017-10-31, filter fraction:0.2_a'), so MultiQC's rename map no longer matches the real titles.
Command used and terminal output
Relevant files
No response
System information
No response
Description of the bug
Two defects in bin/multiqc_mappings_config.py, which mask each other:
▎ - header = fin.readline().split(",") leaves the trailing \n on the last element, so x.strip('"') cannot strip its closing quote — the final rename button is labelled instrument_model". That same stray \n is the only thing separating the block from sample_names_rename:, so fixing the quote alone produces invalid YAML.
▎ - line.strip().split(",") is a naive split, not CSV parsing. Any field containing a comma is split and rejoined with ", ", mutating the value. With --sample_mapping_fields sample_title on ENA records whose titles contain commas, 12/12 rows were altered ('LMOMETAT:2017-10-31, filter fraction:0.2_a' → 'LMOMETAT:2017-10-31, filter fraction:0.2_a'), so MultiQC's rename map no longer matches the real titles.
Command used and terminal output
Relevant files
No response
System information
No response