Flame

Flame is a flexible framework supporting predictive modeling and similarity search within the eTRANSAFE (http://etransafe.eu) project.

Flame allows to:

  • Easily develop machine-learning models, for example QSAR-like models, starting from annotated collections of chemical compounds stored in standard formats (i.e. SDFiles)
  • Transfer new models into a production environment where they can be used by web services to predict the properties of new compounds.

Flame can be used in comand mode or using a web based GUI. The code for the GUI is accessible here.

Installation (binaries and docker)

We provide Windows and Linux installers for performing local installations which include the graphic interface.

The latest versons can be downloaded here:

These versions can be run using an script which starts a locally installed web server, accessible from a web browser at address http://localhost:8000

A docker container (https://www.docker.com/), fully configured can be downloaded from DockerHub and installed using:

docker run -d -p 8010:8000 mpastorphi/flame

Then, the Flame GUI will be accesible from a web browser at address http://localhost:8010

Please note that the port of this address is defined in the command line above and can be easily customized.

It is also possible to use an existing local folder for storing the models and the predictions generated by Flame. Let’s assume you wish to use ‘c:\flame_repo’ as the local flame repository. Start by creating three folders inside named ‘models’, ‘predictions’, and ‘spaces’. Then, run the following command:

docker run -d -p 8010:8000 -v c:\flame_repo:/data mpastorphi/flame

Then, as in the previous example, you can acces the Flame GUI from a web broser at http://localhost:8010

Documentation

A Flame walkthrough, showing the main features is accesible here

A collection of short videos illustrate how Flame can be used for:

  • predict a sigle molecule here
  • predict sketching the input structure here
  • profile a collection of molecules here
  • build a simple model here
  • document a model here

Flame is described in the following open-access article:


Flame: an open source framework for model development, hosting, and usage in production environments

Manuel Pastor, José Carlos Gómez-Tamayo & Ferran Sanz

Journal of Cheminformatics volume 13, Article number: 31 (2021)

(https://jcheminf.biomedcentral.com/articles/10.1186/s13321-021-00509-z)

Installing from source code

Flame can be used in most Windows, Linux or macOS configurations, provided that a suitable execution environment is set up. We recommend, as a fist step, installing the Conda package and environment manager. Download a suitable Conda or Anaconda distribution for your operative system from here

Download the repository:

git clone https://github.com/phi-grib/flame.git

Go to the repository directory

cd flame

and create the conda environment with all the dependencies and extra packages (numpy, RDKit…):

conda env create -f environment.yml

Once the environment is created type:

source activate flame

to activate the environment.

Conda environments can be easily updated using a new version of the environment definition

conda env update -f new_environment.yml

Flame must be installed as a regular Python package. From the flame directory type (note the dot at the end):

pip install .

or

python setup.py install

For development, use pip with the -e flag or setup with develop instead of install. This will made accesible the latest changes to other components (eg. flame_API)

pip install -e .

or

python setup.py develop

Configuration

After installation is completed, you must run the configuration command to configure the directory where flame will place the models and chemical spaces. If Flame has not been configured previously the following command

flame -c config

will suggest a default directory structure following the XDG specification in GNU/Linux, %APPDATA% in windows and ~/Library/Application Support/flame_models in Mac OS X.

To specify a custom path use the -d parameter to enter the root folder where the models and chemical spaces will be placed:

flame -c config -d /my/custom/path

will set up the model repository to /my/custom/path/models, the chemical spaces repository to /my/custom/path/spaces and the predictions to /my/custom/path/predictions.

Once Flame has been configured, the current setting can be displayed using again the command

flame -c config

As a fallback, Flame can also be configured using the following command

flame -c config -a silent

This option sets up the models, spaces and predictions repositories within the Flame installation directory (flame\flame\models, flame\flame\spaces, flame\flame\predictions). Unlike other options, this command does not ask permision to the end-user to create the directories or set up the repositories and is used internally by automatic installers and for software development.

Main features

  • Native support of most common machine-learning algorithms, including rich configuration options and facilitating the model optimization.
  • Easy creation of chemical spaces for similarity search, using fingerprints or molecular descriptors.
  • Support for any standard formatted input: from a tsv table to a collection of compounds in SMILES or SDFile format.
  • Multiple interfaces adapted to the needs of different users: as a web service, for end-user prediction, as a full featured GUI for model development, as command line, integration in Jupyter notebooks, etc.
  • Support for parallel processing.
  • Support for multilevel models: the output of a model can be used as input for other models.
  • Integrated model version management.

Licensing

Flame was produced at the PharmacoInformatics lab (http://phi.upf.edu), in the framework of the eTRANSAFE project (http://etransafe.eu). eTRANSAFE has received support from IMI2 Joint Undertaking under Grant Agreement No. 777365. This Joint Undertaking receives support from the European Union’s Horizon 2020 research and innovation programme and the European Federation of Pharmaceutical Industries and Associations (EFPIA).

Alt text Alt text

Copyright 2020 Manuel Pastor (manuel.pastor@upf.edu)

Flame is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation version 3.

Flame is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with Flame. If not, see http://www.gnu.org/licenses/.