Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,10 @@ def validate_samplesheet(
if col_name in row and row[col_name] and "allowed" in col_config:
value = row[col_name]
allowed = col_config["allowed"]
if value not in allowed:
# Samplesheet values are read from CSV as strings (e.g. "0"),
# while enum lists may be typed (e.g. integers [0, 1]).
# Compare as strings so typed enums still validate correctly.
if str(value) not in [str(a) for a in allowed]:
errors.append(
f"Row {row_num}: Invalid value '{value}' for '{col_name}'. "
f"Allowed: {allowed}"
Expand Down