Skip to content

Commit

Permalink
Updated docs index
Browse files Browse the repository at this point in the history
  • Loading branch information
ribesstefano committed Aug 19, 2024
1 parent e2fe735 commit e55ad5c
Show file tree
Hide file tree
Showing 2 changed files with 149 additions and 10 deletions.
49 changes: 48 additions & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,54 @@
# Useful Tips on How to Build the Documentation

This document provides useful tips on how to build the documentation for the project.
## Steps

1. Install `sphinx` and `sphinx_rtd_theme`:
```bash
pip install sphinx sphinx_rtd_theme
```
2. Create a `docs` directory in the root of the project:
```bash
mkdir docs
```
3. Create the documentation structure:
```bash
cd docs
sphinx-quickstart
```
- Answer the questions as follows:
- Separate source and build directories (y/n) [n]: n
- Project name: PROTAC-Degradation-Predictor
- Author name(s): Your Name
- Project version: v1.0.1
```
4. Edit the `conf.py` file:
- Add the following lines:
```python
import os
import sys
sys.path.insert(0, os.path.abspath('..'))
```
- Add the following line to the `extensions` list:
```python
'sphinx.ext.autodoc',
```
- Check the current `conf.py` file in this repository for more details.
5. Create modules rst files: `sphinx-apidoc -o docs/source/ ./protac_degradation_predictor`
6. To include modules in the documentation, in `index.rst`, add the following line: `source/modules`
7. Setup the gh-pages branch:
```bash
git checkout --orphan gh-pages
git reset --hard
git commit --allow-empty -m "Init"
git push origin gh-pages
git checkout main
```
8. Generate the specific workflow Action file:
- See file `.github/workflows/gh-pages.yml` in this repository.

## Miscellaneous

- Useful [guide](https://olgarithms.github.io/sphinx-tutorial/docs/7-hosting-on-github-pages.html)
- Automatically create modules rst files: `sphinx-apidoc -o source/ ../protac_degradation_predictor`
- Then, in `index.rst`, add the following line: `source/modules`
- Build the documentation: `make clean ; make html`
110 changes: 101 additions & 9 deletions docs/index.rst
Original file line number Diff line number Diff line change
@@ -1,18 +1,110 @@
.. PROTAC-Degradation-Predictor documentation master file, created by
sphinx-quickstart on Mon Aug 19 11:16:51 2024.
sphinx-quickstart on Mon Aug 23 17:31:15 2021.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
PROTAC-Degradation-Predictor documentation
==========================================
===========================================================
PROTAC-Degradation-Predictor: Documentation and Overview
===========================================================

Add your content using ``reStructuredText`` syntax. See the
`reStructuredText <https://www.sphinx-doc.org/en/master/usage/restructuredtext/index.html>`_
documentation for details.
**PROTAC-Degradation-Predictor** is a Python package designed to predict the activity of PROTAC molecules using advanced machine learning techniques. The tool aims to assist researchers in evaluating the potential effectiveness of PROTACs, a novel class of drugs that target protein degradation.

.. .. image:: https://yourimageurl.com/logo.png # Add your project's logo or any relevant image
.. :align: center
Introduction
============

PROTACs (Proteolysis Targeting Chimeras) are a class of molecules that induce the degradation of specific proteins. This package allows researchers to predict the activity of PROTACs by leveraging a variety of machine learning models, including XGBoost and PyTorch-based pretrained neural networks.

The primary functionalities of this package include:
- Predicting PROTAC activity using different machine learning models.
- Accessing curated datasets for training and evaluation.
- Hyperparameter tuning and model training using Optuna.

Features
========

- **Machine Learning Models**: Utilize XGBoost, PyTorch, and scikit-learn models to predict PROTAC activity (refer to the :func:`protac_degradation_predictor.get_protac_active_proba` function).
- **Dataset Handling**: Load and manage datasets specific to PROTAC research (refer to the :func:`protac_degradation_predictor.data_utils.load_curated_dataset` function).
- **Customizability**: Tune model hyperparameters and experiment with different model configurations (refer to the :func:`protac_degradation_predictor.optuna_utils.hyperparameter_tuning_and_training` function).

Quickstart
==========

To get started with PROTAC-Degradation-Predictor, follow these steps:

1. **Installation**:
Install the package using pip:

.. code-block:: bash
git clone https://github.com/ribesstefano/PROTAC-Degradation-Predictor.git
cd PROTAC-Degradation-Predictor
pip install .
2. **Basic Usage**:
Here's an example of how to predict PROTAC activity:

.. code-block:: python
from protac_degradation_predictor import get_protac_active_proba
smiles = "CC(C)C1=CC=C(C=C1)C2=NC3=CC=CC=C3C(=O)N2"
e3_ligase = "Q9Y6K9"
target_uniprot = "P04637"
cell_line = "HCT116"
prediction = get_protac_active_proba(
protac_smiles=smiles,
e3_ligase=e3_ligase,
target_uniprot=target_uniprot,
cell_line=cell_line,
device='cpu',
use_models_from_cv=False,
use_xgboost_models=True,
study_type='standard'
)
print(prediction)
For more detailed usage and customization, refer to the relevant sections below.

Contents
========

.. toctree::
:maxdepth: 4
:caption: Contents:
:maxdepth: 2
:caption: Documentation Contents:

source/modules
source/protac_degradation_predictor
source/protac_degradation_predictor.optuna_utils
source/protac_degradation_predictor.protac_dataset
source/protac_degradation_predictor.pytorch_models

Getting Help
============

If you encounter any issues or have questions, please refer to the following resources:
- **Documentation**: Full API documentation and user guide.
- **GitHub Issues**: Report bugs or request features on the [GitHub Issues](https://github.com/ribesstefano/PROTAC-Degradation-Predictor/issues) page.
- **Contributing**: Learn how to contribute to the project by reading our [Contribution Guidelines](https://github.com/ribesstefano/PROTAC-Degradation-Predictor/blob/main/CONTRIBUTING.md).

License
=======

This project is licensed under the MIT License. See the [LICENSE](https://github.com/ribesstefano/PROTAC-Degradation-Predictor/blob/main/LICENSE) file for details.

About
=====

**Author**: Stefano Ribes

**Version**: v1.0.1

Built with Sphinx using the [Read the Docs theme](https://sphinx-rtd-theme.readthedocs.io/).

----------

*This documentation was last updated on August 19, 2024.*

source/modules

0 comments on commit e55ad5c

Please sign in to comment.