AntiCapt: A method for predicting, designing and scanning anticancer single-stranded (ss) DNA aptamers
Introduction
AntiCapt is developed for predicting, designing, and scanning anticancer (AC) single-stranded (ssDNA) aptamers. Two models are incorporated -- both use the SAME feature pipeline (fine-tuned HyenaDNA embeddings), with different classifiers trained on different datasets:
- Model 1 (main / default): Anticancer aptamer v/s random oligonucleotides -- fine-tuned HyenaDNA embeddings + LightGBM
- Model 2 (alternate): Anticancer aptamer v/s general aptamers -- fine-tuned HyenaDNA embeddings + LightGBM (separate training data, scaler, and classifier)
Modules/Jobs: This program implements three modules (job types):
- Predict -- predicting anticancer-aptamer potential of input DNA sequences.
- Design -- generating all single-point mutants (every position x every alternative base) of input sequences and computing the anticancer-aptamer potential (score) of each mutant. Useful for identifying which single substitutions most improve predicted potency.
- Scan -- creating all overlapping windows of a given length from longer input sequences and computing the anticancer-aptamer potential of each window. Useful for localizing the active region of a longer sequence.
Installation
Option 1: Install via PyPI (recommended)
pip install anticapt
This installs the anticapt command directly, with both models
(fine-tuned HyenaDNA checkpoints, LightGBM classifiers, and scalers)
bundled in -- nothing further to set up.
Option 2: Install from source
git clone https://github.com/raghavagps/anticapt.git
cd anticapt
pip install -e .
Both models (Dataset1 and Dataset2 -- fine-tuned HyenaDNA checkpoints,
LightGBM classifiers, and scalers) are already included under
anticapt/models/ and ready to use immediately -- no additional setup
needed. The layout is:
anticapt/models/
├── dataset1/
│ ├── finetuned_hyenadna/ <- fine-tuned HyenaDNA checkpoint
│ │ (config.json, weights, tokenizer files)
│ ├── LGBM_model.joblib
│ └── LGBM_scaler.joblib
└── dataset2/
├── finetuned_hyenadna/ <- fine-tuned HyenaDNA checkpoint
├── LGBM_model.joblib
└── LGBM_scaler.joblib
If you later want to update either model, see models/README.txt for
the layout requirements. If both datasets should share one fine-tuned
embedding model, copy/symlink it into both finetuned_hyenadna/ folders.
MAX_LENGTH in anticapt/hyenadna_features.py is set to 128,
matching the original fine-tuning pipeline -- change it there if yours
differs.
Minimum Usage
anticapt -i example/aptamer.fasta
This predicts the anticancer-aptamer potential of sequences in FASTA
format, using Model 1 by default, threshold 0.5. Output saved to
anticapt_output.csv.
Full Usage
anticapt [-h] -i INPUT [-o OUTPUT] [-j {1,2,3}] [-m {1,2}]
[-t THRESHOLD] [-w WINLENG] [-d {1,2}]
optional arguments:
-h, --help show this help message and exit
-i, --input Input: ssDNA aptamer sequence(s) in FASTA format,
or one sequence per line (simple format)
-o, --output Output: file for saving results, default anticapt_output.csv
-j, --job {1,2,3} Job Type: 1:predict, 2:design, 3:scan, default 1
-m, --model {1,2} Model: 1:Anticancer aptamer v/s random
oligonucleotides (default), 2:Anticancer aptamer
v/s general aptamers; both use fine-tuned
HyenaDNA embeddings + LGBM
-t, --threshold Threshold: value between 0 and 1, default 0.5
-w, --winleng Window Length: scan mode only, default 30
-d, --display {1,2} Display: 1:AC-aptamers only, 2:all sequences,
default 2
Examples
Predict, using Dataset2's model, only showing positives:
anticapt -i example/aptamer.fasta -m 2 -d 1 -o predict_results.csv
Design mutants of your sequences and rank by predicted score:
anticapt -i example/aptamer.fasta -j 2 -o design_results.csv
Scan a long sequence with a 25 nt window:
anticapt -i long_sequence.fasta -j 3 -w 25 -o scan_results.csv
Input File
Two formats accepted:
- FASTA format (standard) --
>headerline followed by sequence. - Simple format -- one sequence per line, no headers; IDs are
auto-generated as
Seq_1,Seq_2, ...
Non-ACGT characters trigger a warning but are not stripped automatically (check your sequences if you see this warning -- it usually means stray whitespace, ambiguity codes, or an accidental protein/RNA sequence).
Output File
Results are saved in CSV format. Column sets differ slightly by job type:
- Predict:
Sequence_ID, Sequence, Length, Score, Prediction - Design:
Sequence_ID, Position, Original_Base, Mutant_Base, Mutant_Sequence, Score, Prediction - Scan:
Sequence_ID, Start_Position, End_Position, Window_Sequence, Score, Prediction
Score is the predicted probability (0 to 1) of the anticancer-aptamer
class; Prediction is the thresholded call at --threshold.
Package Files
setup.py : Package metadata / build config
README.md : This file provides information about this package
LICENSE.txt : GNU GPL v3.0 license text
CITATION.cff : Citation information
src/anticapt/
__init__.py : Package entry point, exposes core functions
python_scripts/
anticapt.py : Main CLI program (predict/design/scan)
seq_io.py : FASTA/simple-format reading, output writing
design_scan.py : Point-mutant and sliding-window generation
hyenadna_features.py : Fine-tuned HyenaDNA embedding extraction (both models)
models/
README.txt : Model directory layout
dataset1/
finetuned_hyenadna/ : Model 1's fine-tuned HyenaDNA checkpoint
LGBM_model.joblib : Model 1 classifier
LGBM_scaler.joblib : Model 1 scaler
dataset2/
finetuned_hyenadna/ : Model 2's fine-tuned HyenaDNA checkpoint
LGBM_model.joblib : Model 2 classifier
LGBM_scaler.joblib : Model 2 scaler
example/
aptamer.fasta : Test example file containing ssDNA aptamer sequences in FASTA format
License
This project is licensed under the GNU General Public License v3.0 --
see the LICENSE file for details.
Address for Contact
In case of any query please contact:
Prof. G. P. S. Raghava, Head Department of Computational Biology,
Indraprastha Institute of Information Technology (IIIT),
Okhla Phase III, New Delhi 110020; Phone: +91-11-26907444;
Email: raghava@iiitd.ac.in Web: http://webs.iiitd.edu.in/raghava/
Metadata
Release files for anticapt 1.0
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 | Actions |
|---|---|---|---|---|
| anticapt-1.0.tar.gz | 3.7 MB | Without provenance | Details for anticapt-1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| anticapt-1.0-py3-none-any.whl | Python 3 | none | any | Details for anticapt-1.0-py3-none-any.whl |
Total release size: 7.4 MB
Release files / anticapt-1.0.tar.gz
| Download URL | anticapt-1.0.tar.gz |
|---|---|
| Size | 3.7 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a6f08a04a230a4fadcd06d5a94648a5e9179b8ba2399295e8b6064cd729a32eb
|
|
BLAKE2b-256 checksum How to use checksums |
cc07318122018d6aec9eee1758fc52fa89dbef916c5e1346e67f30561f668630
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.13
|
Release files / anticapt-1.0-py3-none-any.whl
| Download URL | anticapt-1.0-py3-none-any.whl |
|---|---|
| Size | 3.7 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
55c934b43b1e14bcbcc623c072386decb446ca319220d43907136f5147476404
|
|
BLAKE2b-256 checksum How to use checksums |
c934c26185b286260c971deef78ada44f89d12f4dc7a566bc3e0f3045fa39aed
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.13
|
Security for anticapt 1.0
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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.