eyurtsev / fcsparser

A python parser for reading fcs files supporting FCS 2.0, 3.0, 3.1
MIT License
74 stars 45 forks source link

parse TEXT segments that don't end with a delimiter #26

Closed bpteague closed 3 years ago

bpteague commented 3 years ago

Hi @eyurtsev ! I keep coming across "challenging" FCS files from weird instruments and software. Most I can handle at a higher level, but apparently the Cytek NL-2000 produces FCS files whose TEXT segment does NOT end with a delimiter (but is otherwise conformant.)

I'll attach an example file -- I propose handling it by changing the error at https://github.com/eyurtsev/fcsparser/blob/5b33e1bdcbfaf58964565150c8e17530dd5f8076/fcsparser/api.py#L210 to a warning, and allowing the TEXT segment to end without a delimiter. (Yes, I know the FCS standard is explicit about this, but what are we going to do?....)

Let me know what you think. Thanks! -Brian

Cytek NL-2000.zip

bpteague commented 3 years ago

PS - here's the original bug that led to this patch: https://github.com/cytoflow/cytoflow/issues/265

eyurtsev commented 3 years ago

Thanks for the PR! Can I add the attached Cytek NL-2000 file as a test file?

bpteague commented 3 years ago

Go for it!

bpteague commented 3 years ago

Also, I obviously don't know how pull requests work :( let me make a new branch with just that commit.

bpteague commented 3 years ago

Closing this one because git is confusing; please use #27 instead.