Skip to main content

A package for automating QSAR analysis on ChEMBL data.

Project description

ChEMBL Miner

Version 0.1.2

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's functionality 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.2.tar.gz (23.3 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.2-py3-none-any.whl (24.4 kB view details)

Uploaded Python 3

File details

Details for the file chembl_miner-0.1.2.tar.gz.

File metadata

  • Download URL: chembl_miner-0.1.2.tar.gz
  • Upload date:
  • Size: 23.3 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.2.tar.gz
Algorithm Hash digest
SHA256 0752ac7d4b7ba74054a6a8afdf4f534adaabc48e21c5951c53b6d1ec3a2b2160
MD5 06afd5d2c9253399cff3dd9b926ebe81
BLAKE2b-256 dd2f22e9adf01620be2804aa9320e01a558abea47df3869b8048b84f0c76e12e

See more details on using hashes here.

File details

Details for the file chembl_miner-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: chembl_miner-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 24.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for chembl_miner-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 25c219f66d1bf0a098c4298ae2756bb1a0efa8d66ea682614234b706837532c4
MD5 ff4c5e06e3dd080074d0efa5477b03b9
BLAKE2b-256 76efd50e33b1c0ed786d938e93a707fef02d18bb75002dbf692f3ac7c5c12c95

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