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/avinab-neogy/aptamer_generator.git
Local Development
git clone https://github.com/avinab-neogy/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
Metadata
Release files for aptamer-generator 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| aptamer_generator-0.1.1.tar.gz | 4.0 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| aptamer_generator-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.0 kB
Release files / aptamer_generator-0.1.1.tar.gz
| Download URL | aptamer_generator-0.1.1.tar.gz |
|---|---|
| Size | 4.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
91821530606f75fe879b4e605da3313b93fc2b7841f45119ee06d9e12a6d5d86
|
|
BLAKE2b-256 checksum How to use checksums |
88e655eb47e212c7cbbf3d0d2c7e482fffeb4da0832a98697020b0d68f61ad2f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.10.12
|
Release files / aptamer_generator-0.1.1-py3-none-any.whl
| Download URL | aptamer_generator-0.1.1-py3-none-any.whl |
|---|---|
| Size | 4.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
79dcea3c60e373d6c1e1e7f5a5fe0c38e954e3e20581752b3b6de3af1d5b30cf
|
|
BLAKE2b-256 checksum How to use checksums |
03c0d1dc9b07dbb36c90db861df6aaaac7f1e0bdc6c110ea1e898974081e0c0e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.10.12
|
Security for aptamer-generator 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.