D-Sites: Hybrid TFBS Predictor for Bacterial Genomes
A comprehensive computational tool for predicting transcription factor binding sites (TFBS) in bacterial genomes using hybrid PWM, DNA shape features, and Random Forest classification.
🚀 Quick Start
Installation
git clone https://github.com/pankaj357/D-Sites.git
cd D-Sites
pip install .
This installs the dsites command-line tool and all required dependencies
(see requirements.txt for the exact pinned versions used for the published
benchmarks).
Basic Prediction
Minimal Command
dsites --fasta <genome.fasta> \
--gff <annotation.gff> \
--motif <motif_file> \
--gene <TF_name> \
--genome_accession <accession_id>
Complete Example
dsites \
--fasta <path_to_genome.fasta> \
--gff <path_to_annotation.gff> \
--motif <path_to_motif_file> \
--gene <TF_NAME> \
--genome_accession <GENOME_ACCESSION> \
--output results \
--n_trees 300 \
--neg_ratio 5 \
--prob_cutoff 0.5 \
--pseudocount 0.5 \
--pad 10 \
--seed 42 \
--batch 10000 \
--up 300 \
--down 50 \
--auto_cutoff
If the TF/genome pair is not present in the bundled CollecTF export, provide known binding sequences explicitly (plain text, one sequence per line):
dsites --fasta genome.fna --gff genomic.gff --motif motif.txt \
--gene FNR --genome_accession NC_003197.2 \
--known known_binding_sites.txt --output results
Command Breakdown
Required Arguments
--fasta: Genome FASTA file path
--gff: Genome annotation file (GFF3 format, required for promoter-based
scanning; optional with --full_genome)
--motif: TF motif file (JASPAR or MEME format)
--gene: Transcription factor name
--genome_accession: Genome accession ID, used to look up known sites in the
bundled CollecTF dataset (scanning always covers ALL contigs in the FASTA)
Optional Arguments with Defaults
--output results: Output directory (alias: --outdir)
--n_trees 300: Number of Random Forest trees
--neg_ratio 5: Negative:Positive ratio (honored exactly)
--min_negatives 0: Optional minimum number of negative examples
--pseudocount 0.5: Count-based PWM pseudocount, p = (count + pc) / (N + 4*pc)
--prob_cutoff 0.5: Probability cutoff
--pad 10: Window padding around known sites
--seed 42: Random seed (runs are fully deterministic for a fixed seed)
--batch 10000: Batch size for parallel scanning
--up 300: Upstream promoter size
--down 50: Downstream promoter size
--full_genome: Slide windows across entire contigs instead of promoter windows
--auto_cutoff: Automatically select probability cutoff via precision-recall curve
📈 Performance
Held-out evaluation (grouped 5-fold site-level cross-validation; thresholds selected from out-of-bag
predictions; FIMO compared on identical promoter windows at matched prediction counts — full workflow
in evaluation/):
- Recall of known promoter-localized sites: 75% (AmrZ), 76% (GlxR), 96% (CodY)
- Ranking quality comparable to FIMO overall; higher precision and recall than FIMO for CodY (0.154 vs 0.118 precision at N = 500)
- DNA-shape features improve ranking for every factor tested (ablation); largest gain for CodY (~2× PR-AUC vs PWM-only)
- A model trained on 97 E. coli FNR sites (RegulonDB 13.5) transfers to Salmonella Typhimurium LT2 (cross-genome application)
📝 Citation
If you use D-Sites in your research, please cite:
Pankaj et al. D-Sites: A hybrid machine-learning framework for prediction of transcription factor binding sites in bacterial genomes. Evolutionary Bioinformatics (under review).
📄 License
MIT License - see LICENSE for details.
💬 Contact
For questions and support, contact:
- Pankaj: ft.pank@gmail.com
- Kanaka KK: kkokay07@gmail.com
Metadata
Release files for dsites 1.3.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 | |
|---|---|---|---|
| dsites-1.3.0.tar.gz | 148.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| dsites-1.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 294.8 kB
Release files / dsites-1.3.0.tar.gz
| Download URL | dsites-1.3.0.tar.gz |
|---|---|
| Size | 148.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b4834fdf0adbbd0c643cdf23585bc6adfa13e36b5d04da180a127541ee230c07
|
|
BLAKE2b-256 checksum How to use checksums |
3a91bc23002b27eb44e78eeed6ec5e2ff1890b07234e128e9d9821292f722c32
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.14
|
Release files / dsites-1.3.0-py3-none-any.whl
| Download URL | dsites-1.3.0-py3-none-any.whl |
|---|---|
| Size | 146.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2b7fc4cb4d8812f916c3008e39f3e01531b065aea92e00cbb76aa767906a1858
|
|
BLAKE2b-256 checksum How to use checksums |
0d9519f8d4b52c805bf793a9c4d84f82b53f80349c16287615188db83e328a9b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.14
|