Interoperable and scalable data analysis with microservices: applications in metabolomics

Payam Emami Khoonsari, Pablo A. Moreno, Sven Bergmann, Joachim Burman, Marco Capuccini, Matteo Carone, Marta Cascante, Pedro de Atauri, Carles Foguet, Alejandra N. González-Beltrán, Thomas Hankemeier, Kenneth Haug, Sijin He, Stephanie Herman, David Johnson, Namrata Kale, Anders Larsson, Steffen Neumann, Kristian Peters, Luca Pireddu, Philippe Rocca-Serra, Pierrick Roger, Rico Rueedi, Christoph Ruttkies, Noureddin Sadawi, Reza M. Salek, Susanna-Assunta Sansone, Daniel Schober, Vitaly A. Selivanov, Etienne A. Thévenot, Michael van Vliet, Gianluigi Zanetti, Christoph Steinbeck, Kim Kultima, Ola SpjuthBioinformatics 2019

TL;DR

This paper introduces a novel microservice-based architecture for metabolomics data analysis, leveraging Docker containers and Kubernetes orchestration. This approach enables the creation of robust, scalable, and interoperable workflows that can be easily deployed and reused across different computational environments, significantly lowering the barrier to entry for complex data analysis.

What Problem Does This Paper Address?

The field of biology, particularly areas like metabolomics, is experiencing an explosion of data generated by high-throughput experiments. Analyzing this massive volume of data presents a significant challenge, especially when dealing with complex workflows that require integrating numerous software tools with diverse dependencies. Traditional high-performance computing (HPC) environments are often rigid and difficult to adapt for the dynamic needs of data analysis, where software updates and specific tool combinations are crucial. Cloud computing offers flexibility, but setting up the necessary software infrastructure on these platforms can be a time-consuming and technically demanding task. This paper addresses the need for a more accessible, scalable, and interoperable solution for complex biological data analysis, specifically in metabolomics.

Methods

The core of the proposed solution is a microservice architecture. Key software tools used in metabolomics analysis are encapsulated as Docker containers. These containers, which bundle the application and its dependencies, can be independently deployed and managed. The orchestration of these microservices, including their scaling and scheduling, is handled by Kubernetes, a powerful container orchestration system.

The authors developed a Virtual Research Environment (VRE) that utilizes this microservice architecture. This VRE can be launched on-demand on cloud resources or desktop computers. To facilitate workflow creation and execution, they integrated two popular workflow engines: Galaxy, a web-based platform for individual tools and workflow sharing, and Luigi, a Python package for building complex pipelines of batch jobs. KubeNow was used to simplify the instantiation of the entire virtual infrastructure.

Datasets

The paper validates their method using four demonstrator studies in metabolomics:

  • Demonstrator 1: A large dataset of 528 mass spectrometry samples from human renal proximal tubule cells (MetaboLights ID: MTBLS233). This dataset was used to test the scalability of the microservice workflow.
  • Demonstrator 2: A dataset of 37 clinical cerebrospinal fluid (CSF) samples from multiple sclerosis patients and controls, along with quality controls and pooled CSF samples for identification (MetaboLights ID: MTBLS558). This was used to demonstrate interoperability and a real-world scenario.
  • Demonstrator 3: A 1D NMR dataset from urine samples of type 2 diabetes mellitus (T2DM) patients and controls (MetaboLights ID: MTBLS1). This showcased the domain-agnostic nature of the microservice architecture.
  • Demonstrator 4: Data from HUVEC cells under hypoxia, used for a start-to-end fluxomics workflow (MetaboLights ID: MTBLS412). This further demonstrated the flexibility and domain-agnosticism of the approach.

Key Insights and Ideas

  • Democratizing Complex Analysis: The microservice architecture, combined with user-friendly VREs and workflow engines, significantly lowers the technical expertise required to perform complex, multi-step data analyses.
  • Scalability on Demand: The system dynamically scales with available computational resources, allowing researchers to handle increasingly large datasets without being limited by fixed infrastructure.
  • Interoperability Through Standardization: Encapsulating tools in Docker containers and using standardized data formats (like mzML and nmrML) promotes interoperability between different software components and analysis pipelines.
  • Reproducibility and Auditability: The containerized nature of the tools, coupled with versioning and workflow management, enhances the reproducibility of scientific analyses.
  • Domain Agnosticism: The microservice approach is not limited to metabolomics and can be readily applied to other scientific disciplines, fostering large-scale integrative science.

Key Results

  • Scalability: Demonstrator 1 achieved a weak scaling efficiency (WSE) of approximately 88% on a large mass spectrometry dataset, indicating efficient parallelization and scalability up to 40 workers. The preprocessing workflow for this dataset took about 4 hours.
  • Interoperability: Demonstrator 2 successfully integrated six major metabolomics data analysis components into a start-to-end workflow using the Galaxy platform, demonstrating seamless integration of diverse tools.
  • Domain Versatility: Demonstrators 3 and 4 successfully applied the microservice architecture to 1D NMR and fluxomics data, respectively, highlighting its applicability beyond mass spectrometry.
  • Ease of Use: The VRE can be launched on-demand with minimal IT expertise required from the user, and workflows can be reused effortlessly.

Limitations and Future Work

  • Containerization Requirement: All tools must be containerized to be used within this architecture, which, while becoming increasingly common, still requires effort.
  • Data Transfer Overhead: Uploading large datasets to cloud environments can be time-consuming, although persistent storage solutions can mitigate this.
  • Workflow Engine Stability: The performance and stability of the overall system can depend on the chosen workflow engine (e.g., Galaxy vs. Luigi).
  • Data Format Incompatibility: Microservices do not inherently solve data format incompatibilities between tools; code for resolving these issues is still necessary.

Future work could involve further development of workflow engines to better leverage cloud infrastructures, continued standardization of data formats, and broader adoption of the microservice paradigm across various scientific domains. The authors also suggest that serverless architectures (Functions as a Service) could be explored in conjunction with microservices for specific use cases, though current complexities in scientific software dependencies make this challenging.

Summary updated

BibTeX
@article{khoonsari2019interoperable,
  author = {Payam Emami Khoonsari and Pablo A. Moreno and Sven Bergmann and Joachim Burman and Marco Capuccini and Matteo Carone and Marta Cascante and Pedro de Atauri and Carles Foguet and Alejandra N. González-Beltrán and Thomas Hankemeier and Kenneth Haug and Sijin He and Stephanie Herman and David Johnson and Namrata Kale and Anders Larsson and Steffen Neumann and Kristian Peters and Luca Pireddu and Philippe Rocca-Serra and Pierrick Roger and Rico Rueedi and Christoph Ruttkies and Noureddin Sadawi and Reza M. Salek and Susanna-Assunta Sansone and Daniel Schober and Vitaly A. Selivanov and Etienne A. Thévenot and Michael van Vliet and Gianluigi Zanetti and Christoph Steinbeck and Kim Kultima and Ola Spjuth},
  title = {{Interoperable and scalable data analysis with microservices: applications in metabolomics}},
  journal = {Bioinformatics},
  year = {2019},
  url = {https://openreview.net/forum?id=mEBxDkyBM8},
}
Figure