Skip to main content

A package for automating QSAR analysis on ChEMBL data.

Project description

ChEMBL Miner

Version 0.1.0

chembl_miner is a Python package designed to streamline the process of Quantitative Structure-Activity Relationship (QSAR) analysis using data from the ChEMBL database. It provides a comprehensive suite of tools for data retrieval, preprocessing, feature engineering, machine learning, and model interpretation, enabling a complete and automated workflow.

Key Features & Utilities

  • Data Retrieval: Fetch bioactivity data from the ChEMBL database using target ChEMBL IDs and specific activity types.
  • Data Preprocessing: A robust and customizable preprocessing pipeline to clean and prepare your data for modeling. This includes handling missing values, converting units, and treating duplicate entries.
  • Feature Engineering: Calculate various molecular fingerprints from PaDEL descriptors (e.g., PubChem, MACCS, EState) to be used as features in your machine learning models.
  • Machine Learning: A flexible wrapper for scikit-learn compatible regression models. It handles hyperparameter optimization using a genetic algorithm, model evaluation with cross-validation, and fitting of the final model.
  • Dataset Management: Convenient wrappers to handle and split your datasets for both training and deployment. It supports structural (or scaffold) splitting to avoid data leakage from the test subset into the training subset.
  • Model Explanation and Analysis: Tools for both exploratory data analysis and model interpretation, allowing you to understand your data and the predictions of your trained models.

Typical Workflow

The package is designed to be used in a sequential workflow:

  1. Data Retrieval: Fetch activity data from ChEMBL using get_activity_data.
  2. Assay Review (Optional): If needed, review and filter specific assays with review_assays.
  3. Preprocessing: Clean the retrieved data with the preprocess_data function.
  4. Feature Calculation: Generate molecular fingerprints using calculate_fingerprint.
  5. Dataset Creation: Create a TrainingData object from your preprocessed data and calculated features. This will handle the splitting of data into training and test sets.
  6. Model Training and Evaluation:
    • Set up a machine learning model using the ModelPipeline.
    • Optimize the model's hyperparameters.
    • Evaluate the model's performance using cross-validation.
    • Fit the final model on the entire training set.
  7. Analysis and Interpretation:
    • Predict using a fit model on a PredictionData object built from deployment data.
    • Explore your dataset with DataExplorer.
    • Interpret your fitted model's behavior with ModelAnalyzer.

Credits

This package was developed using several open source packages:

  • pandas
  • numpy
  • scipy
  • scikit-learn
  • sklearn-genetic-opt
  • matplotlib
  • seaborn
  • chembl_webresource_client
  • padelpy
  • rdkit
  • xgboost
  • statsmodels

Future Implementations Roadmap

  • Expanded Descriptor Support: Generalize the feature engineering module to support a wider range of molecular descriptors beyond fingerprints.
  • Advanced Hyperparameter Search: Implement additional hyperparameter optimization methods, such as Grid Search and Random Search.
  • Enhanced CV Visualization: Add functionality to better visualize cross-validation results to assess model generalization.
  • Classification Models: Incorporate support for classification algorithms in addition to the current regression models.
  • Model Explainability: Integrate SHAP (SHapley Additive exPlanations) for more in-depth model interpretation.
  • Similarity Filtering: Add options for similarity-based filtering during the initial data retrieval step.
  • R Implementation: Explore the possibility of creating an R version of the package.

Project details


Download files

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

Source Distribution

chembl_miner-0.1.post0.tar.gz (23.0 kB view details)

Uploaded Source

Built Distribution

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

chembl_miner-0.1.post0-py3-none-any.whl (24.3 kB view details)

Uploaded Python 3

File details

Details for the file chembl_miner-0.1.post0.tar.gz.

File metadata

  • Download URL: chembl_miner-0.1.post0.tar.gz
  • Upload date:
  • Size: 23.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for chembl_miner-0.1.post0.tar.gz
Algorithm Hash digest
SHA256 057cbb69ab45ca4e7bd61d2c13c181d26b5ac8139d175d3882953f0b26223c63
MD5 b8d04865ede12c2d250a8ef0636b5c1a
BLAKE2b-256 0d2f01ac019da4088f840f5b2c5ea9a31788bae8852f7313702a1e56c20d6285

See more details on using hashes here.

File details

Details for the file chembl_miner-0.1.post0-py3-none-any.whl.

File metadata

File hashes

Hashes for chembl_miner-0.1.post0-py3-none-any.whl
Algorithm Hash digest
SHA256 8aba35ee1db431a1d5706fcac64eb316b1222cc126699f1812dec840652119b7
MD5 cee2f68d8b8fa191b93c00f26690f001
BLAKE2b-256 43b4e7e1b2671d20b9f426c44ba59ca00be26043fcf0dd8ee0accabb93b51233

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