FingerID

Markus Heinonen huibin.shen

News

03.08.2012: New version of both CDE and standard packages are available now: CDE-FingerID-1.2.tar.gz (sourceforge.net) and FingerID-1.2.tar.gz (sourceforge.net).

30.07.2012: With the help of the distribution tool CDE, users can run the package without any pre-install work. The new package can be found here: CDE-FingerID-1.1.tar.gz (sourceforge.net).

30.07.2012: Some bugs are fixed. The new package can be found here: FingerID-1.1.tar.gz (sourceforge.net).

16.07.2012: FingerID first release on 16.07.2012. Users can download the package at here FingerID-1.0.tar.gz (sourceforge.net). Users are required to install Openbabel and LibSVM before running the package.

.

Abstract

FingerID is framework for metabolite identification from MS/MS data. It's published in Bioinformatics. An abstract from the paper:

Metabolite identification from tandem mass spectra is an important problem in metabolomics, underpinning subsequent metabolic modelling and network analysis. Yet, currently this task requires matching the observed spectrum against a database of reference spectra originating from similar equipment and closely matching operating parameters, a condition that is rarely satisfied in public repositories. Furthermore, the computational support for identification of molecules not present in reference databases is lacking. Recent efforts in assembling large public mass spectral databases such as MassBank have opened the door for the development of a new genre of metabolite identification methods.

We introduce a novel framework for prediction of molecular characteristics and identification of metabolites from tandem mass spectra using machine learning with the support vector machine (SVM). Our approach is to first predict a large set of molecular fingerprints of the unknown metabolite from salient tandem mass spectral signals, and in the second step to use the predicted fingerprints for matching against large molecule databases, such as PubChem (see Figure 1). We demonstrate that a set of molecular fingerprints can be predicted with high accuracy, and that they are useful in de novo metabolite identification, where the reference database does not contain any spectra of the same molecule.

Overview

FingerID is a machine learning based framework for metabolite identification from MS/MS data. The method uses a state-of-the-art machine learning algorithms to first learn a model between a metabolite and its MS/MS peaks. The learned model can then be used to give predictions on the structural components of unknown metabolites, given their MS/MS measurements.

To use FingerID to identify metabolites from MS/MS you need:

  • A representative dataset of MS/MS spectra with known precursors with closely matching instrument and operational parameters to the unknown MS/MS spectra. We recommend the MassBank database.
  • A fingerprint set. We provide a default set of FP3, FP4 and MACCS structural fingerprint set from OpenBabel consisting of 528 unique fingerprints.
  • Currently the provided package works only in Linux environment.

The FingerID works by using the model to first predict a set of structural fingerprints, which are then used to query candidate structures from e.g. PubChem using a statistical model.

overview.jpg

Package usage instruction

We maintain two type of package. If you do not have OpenBabel-2.3.0 and LibSVM and not willing to install them, you can download our CDE package. Otherwise, you can download a much smaller standard package which you have to provide the OpenBabel path and LibSVM path as arguments. The related paper Metabolites identification and fingerprint prediction via machine learning has more detail about the methods.

To unzip the packages, you can use following scipt:

tar -zxvf package-name

CDE package usage instruction

The latest version of CDE package is at here: CDE-FingerID-1.2.tar.gz (sourceforge.net)

To run the programme, follow the instructions below.

  1. After unzipping the package, go to the ./cde-root/home/fs/hzshen/mass_classification/package/ folder.
  2. Putting your training mass spectra and testing spectra into the train_data and test_data folders. The file should be in the MassBank format. We have sample training data and testing data in the folder.
  3. Setting the arguments in fingerid.cfg. Default values are there for all parameters. By using CDE, users do not need to provide libSVM path and OpenBabel path.
  4. Run the program as ./fingerid-run
  5. Search result are written in search.res. If validate is set to True in the main module, a file validate.res will also be there. Validate.res contains 3 rows: First row records the ranks of the correct molecules; Second row records search time for querying molecular database; Third row records the number of candidates after mass filtering.

Standard package usage instruction

The latest version of standard package is at here: FingerID-1.2.tar.gz (sourceforge.net)

To run the programme, you need to install OpenBabel-2.3.0 and LibSVM and then follow the instructions below. If you do not have OpenBabel-2.3.0 and LibSVM, you can download CDE fingerid package.

  1. Putting your training mass spectra and testing spectra into the train_data and test_data folders. The file should be in the MassBank format. We have sample training data and testing data in the folders.
  2. Setting the arguments in fingerid.cfg. You have to provide OpenBabel-2.3.0 and LibSVM path.
  3. Run the program as ./fingerid-run
  4. Search results are written in search.res. If validate parameter in the main.py is set to True in the main module, a file validate.res will also be there. Validate.res contains 3 rows: First row records the ranks of the correct molecules; Second row records search time for querying molecular database; Third row records the number of candidates after mass filtering.

The validate.res will contain useful information only if there are database IDs for the test data and you are searching the same database. For example, we have kegg ligand compound ID in the sample test data and we are searching kegg ligand database by default.

Detailed description of available arguments can be found in the main.py in the package. The kernel computation and SVM training may cost hours depending on the data size.

Database extension

Users can extend the molecular database to any database, e.g. PubChem, if parse the data to specified format as in kegg_mass and kegg_fp.dict. But now we only support validation of the search on Kegg or PubChem (SEARCH_KEGG and SEARCH_PUBCHEM parameters in fingerid.cfg)

kegg_mass contains n*2 matrix where n is the number of entry for some molecular database and the first row is the id for the database entry and the second row is the exact mass of that entry.

Example:
C00001 18.0106
C00002 506.9957
C00003 664.1169
C00004 665.1248
C00005 745.0911
C00006 744.0833
...           ...

Kegg_fp.dict is the python

dict( {"C00001":"0100110101010101010100....","C00002":"11010111000010101010...",...} )

taking database id as the key and corresponding fingperprints as the value. It's a binary file and can be loaded into memory, for instance, by pickle module. You can create your own dict by the following python code:

f = open("kegg_fp.dict","wb")
pickle.write(f)
f.close()

Notice that the kegg_fp.dict with this release contains the fingerprints generated by OpenBabel-2.3.0 so to perform identification with this database, you have to use the same version of OpenBabel, that is 2.3.0. The fingerprints may be different in different version. If you are using another version of OpenBabel, you have to rebuild the kegg_fp.dict using your version of OpenBabel.

When you create your own fingerprints dict, please use the FP2, FP3 and MACCS fingerprints (all together 528 fingerprints) in OpenBabel to make the fingerprints in dict and in the prediction comparable.


Auth0 Logo