RECETOX / RIAssigner

RIAssigner is a python tool for retention index (RI) computation for GC-MS data.
MIT License
4 stars 6 forks source link

Error in Kovats RI computation #75

Closed hechth closed 2 years ago

hechth commented 2 years ago

Given an alkane list which skips certain alkanes, the computation doesn't interpolate between the two but between the missing "one higher" alkane and then jumps to the next one.

Carbon_Number   RT
8   4.232
10  6.341
12  8.399
14  10.246
16  11.899
18  13.392
20  14.743
22  15.977
24  17.11

-> RT of 10.245 yields an RI of 1299, so going towards the missing 13th carbon instead of moving towards the 1400 RI value.

hechth commented 2 years ago

Investigating the formula here, it becomes evident that this is not a bug but the actual way of computing it. It can be fixed by replacing the factor of 100 with the difference between the higher and lower RI. @ElliottJP is this something we want to keep (like just throw an error if an alkane list is non-complete) or change to make it a proper piecewise linear interpolation?