Aptamer candidate generator with GC content constraints
Project description
Aptamer Generator
A Python package for generating DNA aptamer candidates with controlled GC content using AI-driven methods.
Features
- Configurable Generation: Control sequence length and GC content ranges
- Reproducibility: Seed-based random number generation for consistent results
- Validation: Built-in GC content validation using Biopython
- Testing: Full test coverage with pytest
- Packaging: Easy installation via pip/PyPI
Installation
From GitHub
pip install git+https://github.com/yourusername/aptamer-generator.git
Local Development
git clone https://github.com/yourusername/aptamer-generator.git
cd aptamer-generator
pip install -e .[test] # Editable mode with test dependencies
Usage
Basic Example
from aptamer_generator import AptamerGenerator
# Initialize generator with seed
generator = AptamerGenerator(seed=42)
# Generate 5 sequences of length 40 with 45-55% GC
sequences = generator.generate_candidates(
num=5,
length=40,
gc_range=(0.45, 0.55)
)
# Print results
for i, seq in enumerate(sequences, 1):
print(f"Sequence {i}: {seq}")
Development
Running Tests
pytest -v --cov=aptamer_generator --cov-report=term-missing
Building the Package
python -m build
Uploading to PyPI (Optional)
twine upload dist/*
Technical Details
Dependencies
- Python >=3.8
- numpy >=1.21
- biopython >=1.79
Algorithm
Uses rejection sampling with the following steps:
- Random DNA sequence generation
- GC content calculation
- Constraint validation
- Repeat until requested number of valid sequences are generated
Contributing
- Fork the repository
- Create your feature branch (
git checkout -b feature/your-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin feature/your-feature) - Open a Pull Request
License
MIT License - see LICENSE for details
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file aptamer_generator-0.1.0.tar.gz.
File metadata
- Download URL: aptamer_generator-0.1.0.tar.gz
- Upload date:
- Size: 3.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8d9070438562c40c488c2e8249ca2fc01c8ade3001fb7944f753f62e9bd209a3
|
|
| MD5 |
2a604caa531621bacf50881cfeb6dcc4
|
|
| BLAKE2b-256 |
57f63c030873dd6cf148bb37979683f9cc8755ad02bc54f569902cf8df518e3f
|
File details
Details for the file aptamer_generator-0.1.0-py3-none-any.whl.
File metadata
- Download URL: aptamer_generator-0.1.0-py3-none-any.whl
- Upload date:
- Size: 4.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
39c461710de9ed1d32aba8b4b0b51b978cee64a3d9be9a46c0860a4674de1a74
|
|
| MD5 |
5fed384a758bc06f1284cb79c2f7994b
|
|
| BLAKE2b-256 |
01db8754cb7e26b1840303737e615d9f2c3a0675cecc83749329030fa21449ba
|