fix: Handle trailing tabs and quoted fields in Agilent Gen5 parser#1241
Merged
Conversation
stephenworlow
previously approved these changes
Jul 14, 2026
Some Gen5 exports (e.g. Synergy H1) produce files with trailing tabs on every line, leading tabs on data sections, and quoted fields containing commas. This caused multiple parse failures: header DataFrame had extra rows, section names were quoted, kinetic/results data had shifted columns, and non-UTF-8 encoding wasn't detected. Fixes: - Add chardet encoding detection for non-UTF-8 files - Strip trailing tabs from all lines at read time - Strip quotes from procedure detail lines in DeviceControlData - Extract section names from first non-empty tab field (handles leading tabs) - Detect and strip extra leading tab from data sections - Merge section data when a blank line separates header from content Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
nathan-stender
force-pushed
the
fix/agilent-gen5-trailing-tabs-encoding
branch
from
July 14, 2026 16:17
7ad7437 to
8a6555e
Compare
stephenworlow
approved these changes
Jul 14, 2026
nathan-stender
added a commit
that referenced
this pull request
Jul 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
°encoded as 0xB0 in Windows-1252)"Optics: Bottom, Gain: 75") by stripping quotes before parsingLayout\n\n<data>)These issues all originate from a specific Gen5 export variant (Synergy H1 reader) that pads every line with trailing tabs, prepends an extra tab to data rows, and quotes fields containing commas.
Test plan
PR391_020 plate1.txt) parses successfully with 96 well documents🤖 Generated with Claude Code