ChatMDV: Democratising Bioinformatics Analysis Using Large Language Models

Maria Kiourlappou, Peter K. Todd, Yaxuan Kong, Jayesh Hire, Sheik Mohammed Sulthan, Martin J. Sergeant, Stefan Zohren, Jim R. Hughes, Stephen TaylorbioRxiv 2025 · DOI

TL;DR

ChatMDV is a new tool that lets researchers generate complex bioinformatics visualizations using simple natural language commands. By integrating Large Language Models (LLMs) with the Multi-Dimensional Viewer (MDV) platform, it significantly lowers the technical barrier to exploring large biological datasets, making advanced analysis more accessible and reproducible.

What Problem Does This Paper Address?

The explosion of high-throughput biological data from sources like single-cell sequencing, spatial omics, and imaging has created a critical need for powerful analytical and visualization tools. While existing platforms like MDV offer comprehensive interfaces, they often require significant manual configuration and programming expertise. This creates a "usability gap," limiting accessibility for researchers without extensive computational backgrounds and slowing down the pace of discovery. The authors aim to bridge this gap by enabling users to interact with their data and generate visualizations through intuitive natural language, rather than complex code or intricate graphical interfaces.

Methods

ChatMDV employs a three-module pipeline built around a Retrieval-Augmented Generation (RAG) approach.

  1. Data & Chart Planner Agent: This module takes the user's natural language query and, using LLMs and a Python REPL (Read-Eval-Print Loop), identifies relevant data fields within the dataset and suggests appropriate chart types. It also leverages conversational history to maintain context.
  2. RAG Pipeline: This module retrieves pre-generated Python code templates (using the MDV Python API) that are semantically similar to the user's query and the suggested chart type. These templates are stored in a vector database for efficient retrieval.
  3. Code Generation Chain: This module combines the user's query, identified data fields, chart type suggestions, and retrieved code templates to synthesize executable Python code. This code is then executed to generate the visualization within the MDV interface.

The system is designed to be modular and adaptable, with LLMs not requiring fine-tuning and the framework supporting various data modalities beyond scRNA-seq.

Datasets

The authors evaluated ChatMDV using three publicly available single-cell RNA-sequencing (scRNA-seq) datasets of increasing complexity:

  • Peripheral Blood Mononuclear Cells 3K (PBMC3K): A well-characterized dataset from a healthy donor, serving as a benchmark.
  • Lung Cancer Atlas: A large dataset from the Human Cell Atlas, offering a rich landscape of cell states in healthy and diseased lung tissue.
  • TAURUS Study: A longitudinal dataset from patients with Crohn's disease and ulcerative colitis, capturing samples before and after anti-TNF therapy.

These datasets were chosen to test ChatMDV's ability to handle varying biological and technical complexities, including different sample sizes, numbers of cell types, and longitudinal data.

Key Insights and Ideas

  • Natural Language as a Universal Interface: The core idea is that natural language can serve as a powerful, accessible interface for complex data analysis, democratizing access to bioinformatics tools.
  • RAG for Contextual Accuracy: By retrieving relevant code templates, the RAG pipeline significantly reduces LLM "hallucinations" and ensures that generated code is more accurate and contextually grounded.
  • Bridging Code and GUI: ChatMDV effectively bridges the gap between command-line tools (requiring coding) and graphical user interfaces (which can be limited), offering a hybrid approach.
  • Reproducibility through Code Access: The generated Python code is accessible to the user, promoting reproducibility and allowing for further manual refinement or programmatic extension.
  • Modularity for Adaptability: The modular design allows ChatMDV to be adapted for other data modalities and visualization platforms beyond MDV.

Key Results

ChatMDV demonstrated high success rates across the evaluated datasets:

  • PBMC3K dataset: 100% success rate.
  • Lung Cancer dataset: 95% success rate.
  • TAURUS dataset: 96% success rate.

The success rate was generally higher for simpler prompts that clearly specified graph types and parameter names. The authors observed a slight decrease in performance for more complex datasets (lung cancer and TAURUS), which they attribute to increased dataset size, a larger number of columns to search, and less consistent column naming in one of the datasets. ChatMDV successfully generated various visualizations, including scatter plots of UMAP components, gene expression heatmaps, violin plots, and even differential gene expression analysis using Scanpy. It also demonstrated the ability to handle follow-up questions, create multiple visualizations in a single view, and perform dataset filtering.

Limitations and Future Work

Limitations:

  • Syntactically Invalid Code: ChatMDV can occasionally produce syntactically invalid or unparsable Python code, particularly when misusing data types or hallucinating parameter names.
  • Resource Intensive Analysis: Performing more intense scRNA-seq analyses (e.g., using Scanpy on large datasets) can be limited by the RAM available in the Docker container.

Future Work:

  • Seamless Integration with Agent Systems: Future work could involve integrating ChatMDV into multi-agent systems (like FlowAgent) to automate entire scRNA-seq pipelines, with ChatMDV acting as the interactive visualization layer.
  • Expanding Data Asset Integration: The RAG architecture could be extended to integrate other unstructured biological assets like PDFs, Electronic Lab Notebooks, and Jupyter notebooks.
  • Local LLM Deployment: The use of open-source LLMs (like LLAMA) for local deployment is suggested to prioritize data privacy for sensitive patient data.
  • Improved Error Handling: Continued development of error handling, iterative retries, and comprehensive logging is planned to address issues with invalid code generation.

Summary updated

Abstract

Abstract Background The rapid advancement in single-cell, spatial omics, imaging, and genomic technologies requires robust analytical and visualisation platforms capable of managing complex biological data. Tools such as Multi-Dimensional Viewer (MDV) offer comprehensive interfaces for data exploration, but still require manual configuration and computational expertise to generate visualisation outputs, limiting accessibility for many users. Results We present ChatMDV, a natural language interface integrated with MDV that allows users to generate high-quality interactive visualisations through natural language commands. ChatMDV employs a retrieval-augmented generation (RAG) pipeline combined with large language models (LLMs) to translate user queries into reproducible Python code and interactive output. This approach enables exploratory and targeted analysis in diverse biological domains. We demonstrate ChatMDV’s capabilities using three datasets of increasing complexity: the Peripheral Blood Mononuclear Cells 3K (PBMC3K) dataset, the lung cancer atlas dataset hosted at the Human Cell Atlas and the longitudinal TAURUS study single-cell RNA-sequencing (scRNA-seq) dataset. Conclusions By bridging the gap between natural language processing and bioinformatics visualisation, ChatMDV reduces technical barriers, enhances reproducibility, and supports more inclusive scientific inquiry. Its modular design and adherence to FAIR (Findability, Accessibility, Interoperability, and Reuse) principles make it a scalable and adaptable framework for accelerating biological data analysis. Key Points ChatMDV enables users to create interactive visualisations from biological datasets using natural language. The system combines large language models with MDV’s graphical platform to simplify data exploration. It supports reproducibility, adaptability, and FAIR data practices, making it suitable for a wide range of users and use cases.
BibTeX
@misc{kiourlappou2025chatmdv,
  author = {Maria Kiourlappou and Peter K. Todd and Yaxuan Kong and Jayesh Hire and Sheik Mohammed Sulthan and Martin J. Sergeant and Stefan Zohren and Jim R. Hughes and Stephen Taylor},
  title = {{ChatMDV: Democratising Bioinformatics Analysis Using Large Language Models}},
  year = {2025},
  doi = {10.1101/2025.08.26.671083},
  howpublished = {bioRxiv},
}
Figure