Python for Data

From Notepad to 10 Terabytes: How a Glasgow Gastroenterologist Built an AI-Powered Research Operating System

Modern medical research generates staggering volumes of data, yet the administrative backbone of many clinical studies remains surprisingly archaic. In 2020, Dr. Shaun Chuah, a gastroenterologist and clinical researcher at the University of Glasgow, faced a monumental data logistics challenge. Preparing for a multi-city, multi-hospital study tracking inflammatory bowel disease (IBD), Chuah calculated that his team would collect approximately 30,000 biological samples over a two-year period. When he inquired with peers about how such massive quantities of clinical material and associated metadata were traditionally cataloged, the prevailing answer was Microsoft Excel. Realizing that spreadsheets would inevitably lead to data fragmentation and human error, Chuah decided to build a custom solution from scratch, despite having virtually no prior programming experience beyond writing raw HTML in Notepad during his high school years. Six years later, that rudimentary project has evolved into Foundry120, an enterprise-grade clinical research operating system holding 10 terabytes of genomics and clinical data, governed by an advanced agentic artificial intelligence layer known as Helix.

The Genesis of a Accidental Developer

The story of Foundry120 is rooted in the practical demands of clinical gastroenterology. Specializing in inflammatory bowel conditions such as Crohn’s disease and ulcerative colitis—complex autoimmune disorders characterized by chronic gastrointestinal inflammation—Chuah understood the urgent need for translational research breakthroughs. The prevalence of IBD is rising globally across both developed and developing nations, placing a growing burden on healthcare systems. To uncover the environmental triggers, genetic susceptibilities, and immunological pathways driving these diseases, large-scale cohort studies are essential.

Chuah’s 2020 study aimed to recruit roughly 200 participants, following them longitudinally at three-month intervals. At each milestone, researchers planned to collect extensive biological specimens, including blood, stool, and saliva samples. Simple multiplication revealed the daunting scale of the logistics: 30,000 unique samples requiring rigorous chain-of-custody tracking across multiple metropolitan hospitals.

Faced with enterprise laboratory information management systems (LIMS) that were prohibitively expensive, cumbersome, and designed for millions of routine hospital samples rather than niche research cohorts, Chuah turned to the Python ecosystem. Armed with the official Django tutorial, programming textbooks like Two Scoops of Django and Test-Driven Development with Python, and online educational resources, he began building a web application to solve his immediate operational bottleneck: tracking physical samples using QR codes and secure database entries.

Scaling Up: From Sample Tracking to Big Data Management

As the study progressed through the disruptions of the COVID-19 pandemic, the application’s scope expanded naturally. Tracking physical vials in freezers was only the first step; the biological samples were subsequently funneled into high-throughput experimental pipelines. Stool samples yielded complex microbiome datasets, while blood samples were processed for genomics, including cell-free DNA sequencing. A single sequencing file for a single participant could easily span 5 to 10 gigabytes, arriving in formats like compressed FASTQ files destined for intensive bioinformatics pipelines.

Within a few years, the University of Glasgow research group found its data scattered across local hard drives, departmental file shares, and disparate spreadsheets. Recognizing the unsustainability of this model, Chuah and his collaborators migrated the infrastructure to Microsoft Azure Blob Storage, transforming hard storage caps into manageable cloud expenditures and establishing a centralized architecture. Foundry120 evolved into a comprehensive research operating system organized around three core pillars: rigorous sample organization, centralized multimodal data management, and automated AI-driven workflows.

The Integration of Agentic AI

By 2025, the platform had integrated an agentic artificial intelligence assistant named Helix to streamline data interrogation. Unlike traditional conversational chatbots that function merely as search engines, Helix operates as an autonomous agent capable of executing complex multi-step workflows. When a researcher asks a question—such as identifying all plasma samples from patients treated with a specific therapeutic agent—Helix does not rely on static summaries or pre-computed indexes. Instead, it interacts with deterministic backend tools, writes and executes Python analysis scripts within secure virtual machine sandboxes, reviews error logs, self-corrects code, and synthesizes the results.

This architecture addresses a major hurdle in clinical data management: bridging the gap between raw unstructured data (such as endoscopy videos, digital pathology slides, and MRI scans) and structured metadata. By treating all data formats as uniform files coupled with robust metadata layers, the system allows researchers to perform complex cross-modal joins in minutes rather than days. Furthermore, because query execution and code generation are strictly gated by Django’s backend permissions and Azure’s role-based access controls, the AI operates under strict security and privacy guardrails, ensuring compliance with rigorous regulatory frameworks like GDPR and institutional review board (IRB) standards.

Broader Implications for Translational Science

The evolution of Foundry120 highlights a broader technological shift occurring within academic and medical research institutions. Historically, universities relied heavily on on-premises computing clusters housed in campus basements to handle heavy computational workloads. However, the sporadic, burst-heavy nature of modern biomedical data processing—where massive parallel computing power is required intermittently rather than continuously—makes cloud infrastructure increasingly attractive from an economic standpoint.

At the same time, the integration of agentic AI into scientific workflows signals a fundamental change in how researchers interact with data. While traditional bioinformatics required specialized programming skills in languages like Python or R to query relational databases and generate visualizations, agentic systems lower the barrier to entry while shifting the human role from direct implementation to high-level supervision and verification.

As research datasets continue to grow exponentially—with newer assays threatening to generate terabytes of data per single sample—platforms like Foundry120 offer a blueprint for sustainable digital infrastructure in medicine. By combining mature, battle-tested web frameworks like Django with modern cloud storage and sandboxed AI agents, clinical research teams can overcome administrative bottlenecks and accelerate the pace of discovery for complex, chronic diseases.

Related Articles

Back to top button
Whatvis
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.