akoyabio / phenoptrReports

Create analysis reports from inForm data.
https://akoyabio.github.io/phenoptrReports
zlib License
15 stars 7 forks source link

Merge addin corrupts files with comma as decimal separator #31

Closed AB-Kent closed 4 years ago

AB-Kent commented 4 years ago

When merging cell seg files written with comma as the decimal separator, the merge addin will sometimes delete the comma. This changes e.g. '14835,9' to '148359' which obviously corrupts the data.

The underlying cause is the behavior of readr::parse_guess() which strips out commas unless there is a leading zero before it.

> parse_guess(c('14835,9', '3168,47', '104,1', '4,971'))
[1] 148359 316847   1041   4971
> parse_guess(c('14835,9', '3168,47', '104,1', '0,971'))
[1] "14835,9" "3168,47" "104,1"   "0,971"