Article 4SKNW Researchers find bug in Python script may have affected hundreds of studies

Researchers find bug in Python script may have affected hundreds of studies

by
Sean Gallagher
from Ars Technica - All content on (#4SKNW)
GettyImages-977644614-800x869.jpg

Enlarge / A Python coding error may have bitten as many as 150 different published chemistry research studies. (credit: Hillary Kladke / Getty Images)

In a paper published October 8, researchers at the University of Hawaii found that a programming error in a set of Python scripts commonly used for computational analysis of chemistry data returned varying results based on which operating system they were run on-throwing doubt on the results of more than 150 published chemistry studies. While trying to analyze results from an experiment involving cyanobacteria, the researchers-Jayanti Bhandari Neupane, Ram Neupane, Yuheng Luo, Wesley Yoshida, Rui Sun, and Philip Williams-discovered significant variations in results run against the same nuclear magnetic resonance spectroscopy (NMR) data.

The scripts, called the "Willoughby-Hoye" scripts after their authors-Patrick Willoughby and Thomas Hoye of the University of Minnesota-were found to return correct results on macOS Mavericks and Windows 10. But on macOS Mojave and Ubuntu, the results were off by nearly a full percent.

The reason for the variation was the scripts' use of Python's glob module, which searches for files matching a specific name pattern-the scripts generated a list of input files to read based on the glob results. But the module depends on the operating system for the order in which the files are returned. And the results of the scripts' calculations are affected by the order in which the files are processed. Rui Sun and Phillip Williams wrote corrected sorting code that fixes the problem, ensuring consistent results.

Read 2 remaining paragraphs | Comments

index?i=zK5nGvLrSzA:xzUIwlntDlc:V_sGLiPB index?i=zK5nGvLrSzA:xzUIwlntDlc:F7zBnMyn index?d=qj6IDK7rITs index?d=yIl2AUoC8zA
External Content
Source RSS or Atom Feed
Feed Location http://feeds.arstechnica.com/arstechnica/index
Feed Title Ars Technica - All content
Feed Link https://arstechnica.com/
Reply 0 comments