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

If you're not sure about the file name format, learn more about wheel file names.

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

Uploaded Python 3

File details

Details for the file pybatchclassyfire-0.1.6-py3-none-any.whl.

File metadata

  • Download URL: pybatchclassyfire-0.1.6-py3-none-any.whl
  • Upload date:
  • Size: 9.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.33.0 CPython/3.7.4

File hashes

Hashes for pybatchclassyfire-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 caad263c26e6404eb61de0fd90f1a3a05e161b88069ce186ee73494b77ddbd2d
MD5 2ebb3a381c8f2dbdb3616427638e7312
BLAKE2b-256 96cfd264ca45cbceb92bff290a61a197f3ecc6d250c7594d9ff56d5e597d1076

See more details on using hashes here.

Supported by

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