Liquid-Chromatography (LC) coupled to tandem mass spectrometry (MS/MS) is widely used in identifying small molecules in untargeted metabolomics. Various strategies exist to acquire MS/MS fragmentation spectra; however, the development of new acquisition strategies is hampered by the lack of framework that let researchers prototype, compare, and optimise strategies before validations on real machines.
Here we introduce Virtual Metabolomics Mass Spectrometer (VIMMS), a programmable and modular framework that simulates fragmentation strategies in tandem mass spectrometry-based metabolomics.
Can't wait to get started? Check out the following resources:
- Project documentation page:
- Demo notebooks illustrating the use of the framework in a simulated setting can be found in the Demo folder.
- Example notebooks to accompany publications can be found in the Example folder
ViMMS allows for scan-level control simulation of the MS2 acquisition process in-silico. It can be used to generate new LC-MS/MS data based on empirical data or virtually re-run a previous LC-MS/MS analysis using pre-existing data to allow the testing of different fragmentation strategies. Using ViMMS, we can compare different fragmentation strategies on real data, with the resulting scan results extractable as mzML files.
Additionally ViMMS can also be used as a framework to develop, optimise and test new fragmentation strategies. New fragmentation strategies can be implemented in ViMMS by extending from a Controller class. Such controllers can be run on both the simulator as well as on actual mass spectrometry instruments that have supported APIs.
Popular fragmentation strategies, such as Top-N, can be implemented in ViMMS and tested on a wide variety of simulated data. The data can be generated completely in-silico by sampling from a database of formulae, or generated with characteristics that resemble real data. For example, please refer to these notebooks.
New fragmentation strategies can be developed on ViMMS by extending from a base Controller class. The controller can be run in either a simulated or a real environment (connecting to an actual mass spectrometry instrument). At the moment, we support only the Thermo Fusion instrument via IAPI, but please contact us if you want to add support for other instruments.
-
For example, here we show an example MS1 (fullscan) controller that only sends MS1 scans and saves them back: https://github.com/glasgowcompbio/vimms/blob/master/vimms/Controller/fullscan.py.
-
Another example of a Top-N controller that fragments the top-N most intense precursor ions in the survey (MS1) scan: https://github.com/glasgowcompbio/vimms/blob/master/vimms/Controller/topN.py.
Stable version
ViMMS requires Python 3+. You can install the current release of ViMMS using pip or pipenv.
$ pip install vimms
or
$ pipenv install vimms
The current version can be found in the Release page. or from PyPi.
Older version
- You can download ViMMS 1.0 used in our original paper from here:
It contains codes up to the first paper, but they are quite out-of-date now.
Development version
To use the latest bleeding-edge ViMMS code in this repository, follow the steps below to check out the master branch. Note that this repository is in active development, so some things may break (please report an issue in that case).
- Clone this repository by checking out the master branch:
git clone https://github.com/glasgowcompbio/vimms.git
. - We provide two ways to manage the dependencies required by ViMMS. The first is using Pipenv, and the second is to use Anaconda Python. Refer to Section A and B below respectively.
A. Managing Dependencies using Pipenv
- Install pipenv (https://pipenv.readthedocs.io).
- In the cloned Github repo, run
$ pipenv install
to create a new virtual environment and install all the packages need to run ViMMS. - Go into the newly created virtual environment in step (4) by typing
$ pipenv shell
. - In this environment, you could develop new controllers, run notebooks (
$ jupyter lab
) etc.
B. Managing Dependencies using Pipenv
- Install Anaconda Python (https://www.anaconda.com/products/individual).
- In the cloned Github repo, run
$ conda env create --file environment.yml
to create a new virtual environment and install all the packages need to run ViMMS. - Go into the newly created virtual environment in step (4) by typing
$ conda activate vimms
. - In this environment, you could develop new controllers, run notebooks (
$ jupyter lab
) etc.
Additionally unit tests that demonstrate how simulations can be run are available in the tests
folder. You can use the script run_tests.sh
or run_tests.bat
to run them.
To run individual test classes you can use:
python -m pytest <module>::<class>
For example:
python -m pytest tests/integration/test_controllers.py::TestSMARTROIController
To see test output, add the -s
switch, e.g.:
python -m pytest -s tests/integration/test_controllers.py::TestSMARTROIController
ViMMS is an MIT-licensed open-sourced project, and we welcome all contributions such as bugfixes, new features etc. A guideline for community contribution can be found here.
To reference the ViMMS simulator in your work, please cite our paper:
[1] Wandy, Joe, et al. "In Silico Optimization of Mass Spectrometry Fragmentation Strategies in Metabolomics." Metabolites 9.10 (2019): 219. https://www.mdpi.com/2218-1989/9/10/219
If you develop new controllers on top of ViMMS, please also cite the following paper:
[2] Davies, Vinny, et al. "Rapid Development of Improved Data-dependent Acquisition Strategies." Analytical Chemistry (2020). https://pubs.acs.org/doi/10.1021/acs.analchem.0c03895 (data)
ViMMS has been presented in various metabolomics and computational biology venues. The following are our highlights:
- The following poster was presented in the CompMS COSI track in ISMB 2020, and was voted the best poster for that track. An accompanying video presentation is also available. A similar poster was also presented at Metabolomics 2020 conference.
- ViMMS was also presented as a talk at Metabolomics 2021 conference. You can find the slides here.
Slides and recorded videos from other departmental talks: