Programming error in a particular set of Python scripts may have affected hundreds of studies

'Willoughby-Hoye' python scripts produced different results depending on the operating systems on which they were run

Python scripts used for computational analysis of data may produce different results depending on the operating systems on which they are run.

That's according to a team of researchers at the University of Hawaii, who recently observed similar behaviour from "Willoughby-Hoye" scripts, casting doubts on the results of about 150 published chemistry studies.

The scripts returned correct results on Windows 10 and MacOS Mavericks operating systems, but returned flawed results on Ubuntu and MacOS Mojave

"Willoughby-Hoye" scripts are named after their authors, Patrick Willoughby and Thomas Hoye of the University of Minnesota, who developed them to handle nuclear magnetic resonance spectroscopy (NMR) data.

According to the researchers, they recently performed some experiments involving cyanobacteria, and then used "Willoughby-Hoye" python scripts to analyse results obtained from their experiments.

They observed that the scripts returned correct results on Windows 10 and MacOS Mavericks operating systems, but returned flawed results on Ubuntu and MacOS Mojave.

For Windows 10 and MacOS Mavericks, the results returned were as expected (173.2). But for MacOS Mojave and Ubuntu 16, the results were flawed and also varied (172.7 and 172.4, respectively).

The research team, which included Ram Neupane, Jayanti Bhandari Neupane, Wesley Yoshida, Yuheng Luo, Philip Williams and Rui Sun, said the variation in results was caused by the scripts' use of Python's 'glob' module, which depends on the operating system for the order in which the input files are processed and returned.

The researchers have now modified the sorting code in Willoughby-Hoye scripts to fix the problem.

In a Twitter post, Patrick Willoughby, now an assistant professor of chemistry at Ripon College, thanked the University of Hawaii research team for finding and correcting the programming bug.

Willoughby said the scripts worked properly six year ago as "the OS was able to handle the sorting" properly.

Philip Williams said the bug may have affected the results of between 150 and 160 research studies carried out in recent years.

The findings of the research were published in the journal Organic Letters.