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

If the FCS file uses whitespace delimiters (e.g. \x0c) avoid stripping #37

Closed gergelycsegzi closed 3 years ago

gergelycsegzi commented 3 years ago

Otherwise the $BEGINDATA could be cut. In my case I had headers without 'data start' where the first data row had: \x0c$BEGINDATA So doing both the trim and the raw_text = raw_text[1:] means that we cut off the '$' which results in an error on line 381: self._data_start = int(text['$BEGINDATA'])

eyurtsev commented 3 years ago

Hi @gergelycsegzi thanks for the PR. Could you include a unit-test that covers this scenario?

gergelycsegzi commented 3 years ago

Hi @eyurtsev added the unit tests. As expected it was failing before and working now. One thing to note, is that 1 unit test fails because the corresponding file does not seem to be present. It was added here: https://github.com/eyurtsev/fcsparser/pull/30

eyurtsev commented 3 years ago

Thanks!