A flaw in the Python script could lead to incorrect results in over 100 chemistry publications

PhD student at the University of Hawaii found a problem in a Python script used for calculations chemical shift, which determines the chemical structure of the substance under study in the spectral analysis of signals by the method nuclear magnetic resonance. In the course of verifying the research results of one of his professors, a graduate student noticed that when the script was executed on different operating systems on the same data set, the output was different.

For example, when running on macOS 10.14 and Ubuntu 16.04 for a tested dataset, the script gave out incorrect value 172.4 instead of 173.2. The script includes about 1000 lines of code and has been used by chemists since 2014. The study of the code showed that the output of the wrong value due to differences in sorting files in different operating systems. The authors of the script believed that the function "glob ()' always returns files sorted by name, while glob's documentation states that output order is not guaranteed. The fix came down to adding list_of_files.sort() after the glob() call.

A flaw in the Python script could lead to incorrect results in over 100 chemistry publications

The discovered problem called into question the correctness of more than 100 publications in chemistry, the conclusions of which were made on the basis of the chemical shift calculated by the script. The exact number of studies in which the script was used is unknown, but the publication with its code is cited in 158 papers. The authors of these works are recommended to evaluate the correctness of the script on the operating systems used for the calculation and recalculate in order to verify the correctness of the calculated values. The incident is an excellent example of the fact that not only the quality of the experiment, but also the correctness of processing the received data in programs that
this has been widely used, may affect the final result.

Source: opennet.ru

Add a comment