-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 3eb9b10
Showing
115 changed files
with
11,061 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Sphinx build info version 1 | ||
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. | ||
config: 18a360fecbab52cc34c56c2aeabae3fe | ||
tags: 645f666f9bcd5a90fca523b33c5a78b7 |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
.. _documentation: | ||
|
||
qsarKit Documentation | ||
======================= | ||
|
||
This page provides guidelines on how to build, modify, and update the documentation for the ``qsarKit`` project. | ||
|
||
Building the Documentation | ||
-------------------------- | ||
|
||
The ``qsarKit`` documentation is generated using Sphinx, a tool that converts reStructuredText files into HTML websites and other formats. Here's how to build the documentation: | ||
|
||
1. Ensure that Sphinx and other required packages are installed: | ||
|
||
.. code-block:: bash | ||
conda activate qsar_env | ||
pip install sphinx sphinx_rtd_theme | ||
2. Navigate to the `docs` directory from the root of the project: | ||
|
||
.. code-block:: bash | ||
cd docs | ||
3. Build the documentation using the `make` command on Linux or Mac, or `make.bat` on Windows: | ||
|
||
.. code-block:: bash | ||
# For Linux or Mac | ||
make html | ||
# For Windows | ||
.\make.bat html | ||
The generated HTML files will be located in the `docs/build/html` directory. You can open the `index.html` file in your browser to view the documentation. | ||
|
||
Modifying the Documentation | ||
--------------------------- | ||
|
||
The ``qsarKit`` documentation is written in reStructuredText (.rst) format. To modify the documentation: | ||
|
||
1. Navigate to the `docs/source` directory, where you will find the `.rst` files. | ||
|
||
2. Open the `.rst` file you wish to modify in your text editor. | ||
|
||
3. Make your changes to the text. Refer to the reStructuredText Primer for syntax guidelines: https://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html | ||
|
||
4. Save your changes and rebuild the documentation (as described in the "Building the Documentation" section) to view your updates. | ||
|
||
Adding New Pages | ||
---------------- | ||
|
||
To add a new page to the documentation: | ||
|
||
1. Create a new `.rst` file in the `docs/source` directory. | ||
|
||
2. Write your content in the file using reStructuredText format. | ||
|
||
3. Add the file to the table of contents by including it in the appropriate `toctree` directive within an existing `.rst` file, typically `index.rst` or a related section file. | ||
|
||
4. Rebuild the documentation to incorporate the new page. | ||
|
||
Updating the Documentation | ||
-------------------------- | ||
|
||
It is important to keep the documentation updated to reflect changes in the project. To update the documentation: | ||
|
||
1. Follow the steps in the "Modifying the Documentation" section to edit existing pages. | ||
|
||
2. If new features have been added to the project, consider adding new pages following the instructions in the "Adding New Pages" section. | ||
|
||
3. Ensure that all changes are thoroughly reviewed for accuracy and completeness. | ||
|
||
4. After updating the content, rebuild the documentation and verify that all changes are correctly reflected and that there are no broken links. | ||
|
||
Contributing to the Documentation | ||
--------------------------------- | ||
|
||
Contributions to improve the documentation are always welcome. To contribute: | ||
|
||
1. Fork the repository on GitHub. | ||
|
||
2. Clone your fork and create a new branch for your changes. | ||
|
||
3. Make your changes, commit them, and push them to your fork. | ||
|
||
4. Open a pull request against the original repository with a clear description of the improvements. | ||
|
||
Remember to follow the project's contribution guidelines and code of conduct. Your contributions will be reviewed and merged if they meet the project's standards. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
.. _gan: | ||
|
||
Gan | ||
=== | ||
|
||
This module provides the ``QsarGanFeaturizer`` class, an extension of the ``MolGanFeaturizer`` from DeepChem, | ||
tailored for Quantitative Structure-Activity Relationship (QSAR) applications with Generative Adversarial Networks (GAN). | ||
It includes functionalities for processing SMILES strings into molecular representations suitable for GAN modeling. | ||
|
||
This module also provides the ``QsarGan`` class, an extension of the MolGan from DeepChem, tailored for QSAR applications with GAN. | ||
It includes functionalities for training and evaluating GAN models for QSAR. | ||
|
||
Finally, this module provides the ``ExtractDescriptors`` class, which extracts molecular descriptors from SMILES strings using RDKit. | ||
|
||
.. toctree:: | ||
:maxdepth: 1 | ||
|
||
gan/gan_featurizer | ||
gan/qsar_gan | ||
gan/extract_descriptors |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
.. _extract_descriptors: | ||
|
||
Extract Descriptors | ||
=================== | ||
|
||
.. automodule:: qsar.gan.extract_descriptors | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
.. _gan_featurizer: | ||
|
||
Gan Featurizer | ||
============== | ||
|
||
.. automodule:: qsar.gan.gan_featurizer | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
.. _qsar_gan: | ||
|
||
QSAR Gan | ||
======== | ||
|
||
.. automodule:: qsar.gan.qsar_gan | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
.. qsar documentation master file, created by | ||
sphinx-quickstart on Tue Nov 21 21:51:05 2023. | ||
You can adapt this file completely to your liking, but it should at least | ||
contain the root `toctree` directive. | ||
Welcome to qsar's documentation! | ||
================================ | ||
|
||
``qsarKit`` aims to provide tools for developing, analyzing, and visualizing quantitative structure-activity | ||
relationship (QSAR) models using regression and ensemble learning techniques. The package also includes tools for data | ||
preprocessing, feature selection, visualization, model evaluation, and data augmentation using generative adversarial networks (GANs). | ||
|
||
.. toctree:: | ||
:maxdepth: 1 | ||
:caption: User Guide | ||
|
||
installation | ||
quickstart | ||
documentation | ||
|
||
.. toctree:: | ||
:maxdepth: 2 | ||
:caption: Package Reference | ||
|
||
preprocessing | ||
gan | ||
models | ||
utils | ||
visualization | ||
|
||
Indices and tables | ||
================== | ||
|
||
* :ref:`genindex` | ||
* :ref:`modindex` | ||
* :ref:`search` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
.. _installation: | ||
|
||
Installation | ||
============ | ||
|
||
``qsarKit`` is a Python package that utilizes Quantitative Structure-Activity Relationship (QSAR) modeling for evaluating the transfer of environmental contaminants in breast milk. The package is designed for use by researchers and health professionals and integrates multiple predictive models. It provides features for synthetic data generation via Generative Adversarial Networks (GANs). Below are the instructions to install and set up the ``qsarKit`` environment. | ||
|
||
Prerequisites | ||
------------- | ||
|
||
The package requires Miniconda (https://docs.conda.io/projects/miniconda/en/latest/miniconda-install.html) to manage the environment dependencies. Please ensure that Miniconda is installed before proceeding with the installation of ``qsarKit``. | ||
|
||
Installation Steps | ||
------------------ | ||
|
||
Once Miniconda is installed, you can create and activate the ``qsarKit`` environment using the following commands: | ||
|
||
.. code-block:: bash | ||
conda env create -f environment.yaml | ||
conda activate qsar_env | ||
If you encounter any issues activating the environment, try sourcing the Conda script first and then retry activation: | ||
|
||
.. code-block:: bash | ||
source ~/miniconda3/bin/activate qsar_env | ||
or if you installed Anaconda instead of Miniconda: | ||
|
||
.. code-block:: bash | ||
source ~/anaconda3/bin/activate qsar_env | ||
Important Notes | ||
--------------- | ||
|
||
- We currently support only Python 3.10 due to some dependencies that are not yet compatible with newer versions. We will update the package as soon as all dependencies support Python 3.11+. | ||
- Ensure that the `environment.yaml` file is present in the root directory of the ``qsarKit`` package before creating the Conda environment. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
.. _models: | ||
|
||
Models | ||
====== | ||
|
||
This module defines the BaselineModel, an abstract base class for constructing Quantitative Structure-Activity | ||
Relationship (QSAR) models within a machine learning framework. The class is designed to streamline the integration | ||
of different machine learning algorithms into QSAR studies by providing a uniform interface and methodology for | ||
model construction, training, prediction, and hyperparameter optimization. | ||
|
||
Child classes inheriting from ``BaselineModel`` are required to implement the model-specific logic within the defined | ||
abstract methods. This structure promotes a clear separation between the generic model workflow and the specific | ||
implementation details of different QSAR modeling techniques. | ||
|
||
The module also includes several concrete implementations of the ``BaselineModel`` class, each corresponding to a | ||
different machine learning algorithm. These classes provide a starting point for constructing QSAR models using | ||
popular machine learning libraries that use regression algorithms and ensemble methods. | ||
|
||
.. toctree:: | ||
:maxdepth: 1 | ||
|
||
models/base_model | ||
models/catboost_model | ||
models/elasticnet_model | ||
models/lasso_model | ||
models/random_forest_model | ||
models/ridge_model | ||
models/xgboost_model |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
.. _base_model: | ||
|
||
Base Model | ||
========== | ||
|
||
.. automodule:: qsar.models.baseline_model | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
.. _catboost_model: | ||
|
||
CatBoost Model | ||
============== | ||
|
||
.. automodule:: qsar.models.catboost | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
.. _elasticnet_model: | ||
|
||
ElasticNet Model | ||
================ | ||
|
||
.. automodule:: qsar.models.elasticnet | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
.. _lasso_model: | ||
|
||
Lasso Model | ||
=========== | ||
|
||
.. automodule:: qsar.models.lasso | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
.. _random_forest_model: | ||
|
||
RandomForest Model | ||
================== | ||
|
||
.. automodule:: qsar.models.random_forest | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
.. _ridge_model: | ||
|
||
Ridge Model | ||
=========== | ||
|
||
.. automodule:: qsar.models.ridge | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
.. _xgboost_model: | ||
|
||
XGBoost Model | ||
============= | ||
|
||
.. automodule:: qsar.models.xgboost | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
.. _preprocessing: | ||
|
||
Preprocessing | ||
============= | ||
|
||
This module provides the FeatureSelector class designed for feature selection and preprocessing in QSAR modeling. | ||
It includes a series of methods for normalizing data, removing features with low variance, handling multicollinearity, | ||
and managing highly correlated features. The class aims to streamline the preprocessing steps necessary for effective | ||
modeling by providing an integrated approach to handling various data preprocessing tasks such as scaling, variance analysis, | ||
and correlation analysis. | ||
|
||
This module offers custom transformer classes for feature selection in the context of QSAR modeling. | ||
It includes transformers for removing low-variance features and high-correlation features from datasets, | ||
as well as a composite preprocessing pipeline that integrates these transformations in a streamlined process. | ||
|
||
.. toctree:: | ||
:maxdepth: 1 | ||
|
||
preprocessing/feature_selector | ||
preprocessing/custom_preprocessing |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
.. _custom_preprocessing: | ||
|
||
Custom Preprocessing | ||
==================== | ||
|
||
.. automodule:: qsar.preprocessing.custom_preprocessing | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
.. _feature_selector: | ||
|
||
Feature Selector | ||
================ | ||
|
||
.. automodule:: qsar.preprocessing.feature_selector | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: |
Oops, something went wrong.