Caution
This repository has been ENTIRELY modernized and updated using AI assistance. The original FastTargetPred codebase has been significantly modified, including:
- Complete code refactoring and modernization
- New dependency management systems
- Updated Python syntax and type annotations
- New SMILES input functionality
- Integrated results analysis tools
While extensive testing has been performed, users should exercise extreme caution:
- β Test thoroughly with your specific use cases before relying on results
- β Validate outputs against known reference compounds
- β Compare results with the original FastTargetPred version where possible
β οΈ Use at your own risk for research and production environmentsβ οΈ No warranty is provided for accuracy or functionality
The original research and algorithms probably maybe remain intact, but the implementation has been extensively modified.
FastTargetPred is a modern target prediction tool for molecular compounds that has been updated to use contemporary Python practices and dependency management.
- Added
pyproject.tomlfor modern Python package configuration - Added
requirements.txtfor backward compatibility - Proper dependency specification with version constraints
- Support for optional dependencies (development, jupyter)
- Minimum Python version: 3.8+ (previously 3.7+)
- Modern type annotations throughout the codebase
- Updated syntax using f-strings and modern Python features
- Better error handling and type safety
- No longer requires MayaChemTools to be in PATH
- Automatically uses bundled
mayachemtoolsdirectory - Fallback to system PATH if bundled version not available
- Improved error messages and setup guidance
- New feature: Accept SMILES strings directly as input
- Format:
name1:SMILES1 name2:SMILES2or justSMILES - Automatic conversion to SDF format using RDKit
- 3D coordinate generation and optimization
- Mutually exclusive with SDF file input
-
MayaChemTools Setup: Download and unzip MayaChemTools into the
mayachemtools/folder:# The mayachemtools directory should be present in the root directory # If not already bundled, download from the official source and unzip here
-
Research Dataset (Optional): For access to the complete research dataset including 160,000 tetrapeptides and ChEMBL29 compounds:
# Download the Zenodo research dataset wget https://zenodo.org/records/5751499/files/Zenodo_Final-data-_for_FastTargetPred-and-Tetrapeptides_data.zip unzip Zenodo_Final-data-_for_FastTargetPred-and-Tetrapeptides_data.zipThe dataset contains:
- 714,780 ChEMBL29 compounds with pre-computed fingerprints
- 160,000 systematically enumerated tetrapeptides
- Target prediction results and similarity analyses
# Install in development mode
pip install -e .
# Or install from requirements.txt
pip install -r requirements.txt# Create a new environment
conda create -n fasttargetpred python=3.8
conda activate fasttargetpred
# Install dependencies
conda install numpy matplotlib pandas
conda install -c conda-forge rdkit
# Install the package
pip install -e .# Basic usage with SDF file
fasttargetpred input.sdf
# With custom database and fingerprint
fasttargetpred input.sdf -db db/chembl25_active -fp ECFP4 MACCS
# Multiple SDF files
fasttargetpred file1.sdf file2.sdf file3.sdf# SMILES with names
fasttargetpred -smiles "aspirin:CC(=O)OC1=CC=CC=C1C(=O)O" "caffeine:CN1C=NC2=C1C(=O)N(C(=O)N2C)C"
# SMILES without names (uses SMILES as name)
fasttargetpred -smiles "CC(=O)OC1=CC=CC=C1C(=O)O" "CN1C=NC2=C1C(=O)N(C(=O)N2C)C"
# Tetrapeptide example (from research dataset)
fasttargetpred -smiles "LAAA:[H]N[C@@H](CC(C)C)C(=O)N[C@@H](C)C(=O)N[C@@H](C)C(=O)N[C@@H](C)C(O)=O" -fp ECFP4 -tc 0.5
# Another tetrapeptide example - AEDG (Ala-Glu-Asp-Gly) using lower threshold for better coverage
fasttargetpred -smiles "AEDG:N[C@@H](C)C(=O)N[C@@H](CCC(O)=O)C(=O)N[C@@H](CC(O)=O)C(=O)NCC(O)=O" -fp ECFP4 -tc 0.3# Generate HTML report from CSV output
fasttargetpred-workup -i output.csv -o report.html
# With structure images (requires RDKit)
fasttargetpred-workup -i output.csv -o report.html -sdf input.sdf
# With statistics plots
fasttargetpred-workup -i output.csv -o report.html -pfrom src.main import main
from src.arg_parsing import UserArguments
# Use the modernized API
# (Implementation details would depend on specific use case)- Python 3.8+
- NumPy >= 1.20.0
- Matplotlib >= 3.4.0
- RDKit >= 2022.3.1 (for SMILES support)
- Pandas >= 1.3.0
- Jupyter >= 1.0.0 (for notebook support)
- pytest >= 6.0 (for development)
- black >= 22.0 (for code formatting)
- flake8 >= 4.0 (for linting)
- mypy >= 0.910 (for type checking)
- Minimum Python version increased from 3.7 to 3.8
- Some internal APIs have changed (mainly affects programmatic usage)
- Command-line interface remains largely compatible
- SMILES string input support with
-smilesflag - Automatic 3D coordinate generation for SMILES inputs
- Better error messages and validation
- Modern type annotations throughout
- No longer requires MayaChemTools in PATH
- Better dependency management with
pyproject.toml - Cleaner, more maintainable code structure
- Enhanced error handling and user feedback
- Update Python: Ensure you're using Python 3.8 or later
- Install dependencies: Use
pip install -r requirements.txtorpip install -e . - MayaChemTools: No longer needs to be in PATH - uses bundled version
- SMILES support: New feature - try it with
-smilesflag instead of SDF files
Most existing command lines should work without changes:
# v1.x (still works in v2.0)
python FastTargetPred.py input.sdf -db db/chembl25_active
# v2.0 (preferred)
fasttargetpred input.sdf -db db/chembl25_active# Clone and install in development mode
git clone https://github.com/ludovicchaput/FastTargetPred.git
cd FastTargetPred
pip install -e .[dev]
# Run tests
pytest
# Format code
black src/
# Type checking
mypy src/# Compile platform-specific C extensions
python setup.py /path/to/python/includeThis project maintains the same license as the original FastTargetPred.
- Valentin Guillaume
- Ludovic Chaput
- β¨ New: SMILES string input support
- β¨ New: Modern dependency management with pyproject.toml
- β¨ New: Integrated MayaChemTools (no PATH requirement)
- π§ Changed: Minimum Python version 3.8+
- π§ Changed: Modern type annotations throughout
- π§ Changed: Improved error handling and user feedback
- π Fixed: Various type safety and compatibility issues
- Initial release with SDF file support
- Basic target prediction functionality
What does FastTargetPred do ? FastTargetPred allows to predict putative protein target(s) for a query compound or for a collection of compounds.
How to install FastTargetPred ?
- Download the entire folder
- Download the free chemistry toolkit MayaChemTools directory (http://www.mayachemtools.org/)
- To launch FastTargetPred, you must use Python version 3.7 or superior. The help program includes every instruction to run the program. You can run it with the following command: python3.7 FastTargetPred.py -help
For more information, a user guide is provided: FastTargetPred_manual.pdf.