Skip to main content

A python client for batch queries of the ClassyFire API

Project description

pybatchclassyfire

This package provides a set of helper functions in python for annotating chemical structures with the chemical ontology developed by Djoumbou et. al using the ClassyFire API

Such function are available from the pyclassyfire package (https://github.com/JamesJeffryes/pyclassyfire) developped by James Jeffryes and from pyMolNetEnhancer (https://pypi.org/project/pyMolNetEnhancer/) package written by Madeleine Ernst, which relied in part on pyclassyfire.

However the ClassyFire API now only returns paginated JSON files (10 compounds/page) see http://classyfire.wishartlab.com/access and tolerates no more than 10 GET request per second.

Building on pyclassyfire and pyMolNetEnhancer functions, pybatchclassyfire as for objective to overcome these limits and allow the batch classification of large tables of structures.

Table of contents

Instalation

Install pybatchclassyfire with:

pip install pybatchclassyfire

And additional required packages with:

pip install -r requirements.txt

Running the batch classification

In order to run the batch classification make sure to have InChI and InChIKey formated chemical structures. Check Getting Started with the RDKit in Python for format conversion process.

  • After installation of the pybatchclassyfire package, download the corresponding gitlab repository

git clone https://gitlab.unige.ch/Pierre-Marie.Allard/pybatchclassyfire.git

  • Make sure to be able to run the Jupyter notebook (pybatchclassyfire_nb.ipynb) on the example file (test_datatable.tsv)

  • Adapt Jupyter notebook to treat your file.

Dependencies

decorator==4.4.2 joblib==0.14.1 networkx==2.4 numpy==1.18.2 pandas==1.0.3 pybatchclassyfire==0.1.3 python-dateutil==2.8.1 pytz==2019.3 requests>=2.6 requests-cache==0.5.2 six==1.14.0

Main citation

https://gitlab.unige.ch/Pierre-Marie.Allard/pybatchclassyfire.git

License

This repository is available under the following license https://gitlab.unige.ch/Pierre-Marie.Allard/pybatchclassyfire/-/blob/master/LICENSE.md

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

pybatchclassyfire-0.1.6-py3-none-any.whl (9.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page