BOTAS
An Integrated Bacterial RNA-seq Analysis Framework with Circular-Aware Alignment and Operon Inference
Clabe Simiyu Wekesa, Kelvin Kiprotich, John Muoma, Axel Mithöfer
BOTAS (Bacterial Operon-Aware Transcriptome Alignment System) is an integrated framework for bacterial RNA-seq analysis that combines reference indexing, read alignment, gene quantification, and operon inference within a single command-line application.
Unlike conventional RNA-seq workflows that require multiple independent software packages, BOTAS provides an end-to-end workflow designed specifically for bacterial transcriptomics. The framework supports circular chromosomes and plasmids, single-end and paired-end sequencing, fragment-level gene quantification, and RNA-seq-guided operon inference while maintaining compatibility with standard genomic file formats.
BOTAS is implemented in Python and is designed for reproducible, modular, and high-throughput bacterial transcriptomic analyses.
Features
Native Reference Indexing
- Native minimizer-based reference indexing
- Reusable BOTAS index format (
*.botas.idx) - Configurable k-mer and minimizer window sizes
- Support for linear and circular bacterial genomes
- Circular overhang indexing for reads spanning the origin
- Selective circular treatment of chromosomes or plasmids
RNA-seq Alignment
- Native bacterial read alignment engine
- Single-end and paired-end read alignment
- Support for circular genome boundary crossings
- Edit-distance alignment using Edlib
- Mapping-quality estimation
- Optional rRNA read filtering
- Optional coordinate sorting and BAM indexing
- Multiprocessing support
Gene Quantification
- Gene-level paired-end fragment counting
- Reconstruction of paired-end fragments from coordinate-sorted BAM files
- Multi-sample quantification
- Configurable minimum feature overlap
- Optional largest-overlap assignment
- Assignment statistics for mapped, ambiguous, unmapped, and unassigned fragments
- Gene counts compatible with featureCounts under equivalent settings
Operon Inference
- RNA-seq-guided operon prediction
- Integration of genomic adjacency and transcriptional evidence
- Strand-consistency analysis
- Intergenic-distance evaluation
- Gene-coverage comparison
- Consensus operon inference across multiple BAM files
- TSV output
- Optional GFF output
General
- Python implementation
- Standard FASTA, FASTQ, BAM, GFF3, and TSV file support
- Reproducible command-line workflow
- Modular architecture
- Suitable for integration into automated pipelines
Installation
Install from PyPI
pip install botas-rnaseq
Install the latest development version
pip install git+https://github.com/clabe-wekesa/botas.git
Install from source
git clone https://github.com/clabe-wekesa/botas.git
cd botas
pip install .
Development installation
pip install -e ".[dev]"
Workflow
A typical BOTAS analysis consists of four steps.
Reference FASTA
│
▼
botas index
│
▼
BOTAS index (.botas.idx)
│
▼
botas align
│
▼
Coordinate-sorted BAM
│
├──────────────────┐
▼ ▼
botas quantify botas getOperons
│ │
▼ ▼
Gene counts Operon predictions
Quick Start
1. Build a reference index
botas index \
--ref reference.fasta \
--out reference.botas.idx
For a circular bacterial genome:
botas index \
--ref reference.fasta \
--circular \
--out reference.botas.idx
Selected contigs, such as plasmids, can be treated as circular:
botas index \
--ref reference.fasta \
--circular-contigs plasmid1,plasmid2 \
--out reference.botas.idx
When --out is omitted, BOTAS generates an output name ending in .botas.idx.
2. Align sequencing reads
Paired-end alignment
botas align \
--index reference.botas.idx \
--fq1 reads_R1.fastq.gz \
--fq2 reads_R2.fastq.gz \
--pool \
--threads 8 \
--sort-bam \
--out sample.bam
Single-end alignment
botas align \
--index reference.botas.idx \
--fq reads.fastq.gz \
--threads 4 \
--sort-bam \
--out sample.bam
BOTAS can also align directly from a reference FASTA:
botas align \
--ref reference.fasta \
--fq1 reads_R1.fastq.gz \
--fq2 reads_R2.fastq.gz \
--circular \
--pool \
--threads 8 \
--sort-bam \
--out sample.bam
The --sort-bam option creates a coordinate-sorted BAM file and its corresponding .bai index.
Optional rRNA filtering
botas align \
--index reference.botas.idx \
--fq1 reads_R1.fastq.gz \
--fq2 reads_R2.fastq.gz \
--filter-rrna \
--pool \
--threads 8 \
--sort-bam \
--out sample.bam
BOTAS uses its bundled rRNA database unless a custom FASTA file is supplied with --rrna-db.
Logging level
botas align ... --log INFO
botas align ... --log DEBUG
botas align ... --log WARN
botas align ... --log ERROR
The logging level must be provided after --log.
3. Quantify gene expression
botas quantify \
--bam sample.sorted.bam \
--gff annotation.gff \
--feature-type gene \
--id-attribute locus_tag \
--out sample.gene_counts.tsv
The BAM input must contain coordinate-sorted paired-end alignments.
When --id-attribute is omitted, BOTAS uses locus_tag for gene features.
Quantify multiple BAM files
botas quantify \
--bam sample1.sorted.bam sample2.sorted.bam sample3.sorted.bam \
--gff annotation.gff \
--feature-type gene \
--id-attribute locus_tag \
--out gene_expression_matrix.tsv
Largest-overlap assignment
By default, fragments overlapping multiple features remain ambiguous. They may instead be assigned to the feature with the largest overlap:
botas quantify \
--bam sample.sorted.bam \
--gff annotation.gff \
--largest-overlap
Equal largest overlaps remain ambiguous.
4. Infer operons
Infer operons from one BAM file
botas getOperons \
--bam sample.sorted.bam \
--gff annotation.gff \
--out sample.operons.tsv
Infer consensus operons from multiple BAM files
botas getOperons \
--bam sample1.sorted.bam sample2.sorted.bam sample3.sorted.bam \
--gff annotation.gff \
--consensus \
--out consensus.operons.tsv
Write operons as GFF features
botas getOperons \
--bam sample.sorted.bam \
--gff annotation.gff \
--write-gff \
--prefix sample
Operon inference can be controlled using options such as:
--max-igd--min-coverage--min-cov-ratio--min-support--min-score
Working Directory
BOTAS creates a working directory for each analysis. A custom location can be specified using:
botas -d sample.botas align ...
The directory contains analysis logs, temporary files, final results, and a run manifest.
A typical structure is:
sample.botas/
├── logs/
├── tmp/
├── results/
│ ├── sample.bam
│ ├── sample.sorted.bam
│ ├── sample.sorted.bam.bai
│ ├── sample.gene_counts.tsv
│ └── sample.operons.tsv
└── manifest.json
The exact files depend on the command and options used.
Default Output Names
When --out is omitted, BOTAS generates an output name from the input filename.
| Command | Default suffix |
|---|---|
botas index |
.botas.idx |
botas align |
.bam |
| Single-sample gene quantification | .gene_counts.tsv |
| Single-sample operon quantification | .operon_counts.tsv |
| Multi-sample gene quantification | .gene_expression_matrix.tsv |
| Multi-sample operon quantification | .operon_expression_matrix.tsv |
botas getOperons |
.operons.tsv |
BOTAS also appends the appropriate suffix when an output prefix is supplied without the expected extension.
Command Overview
botas index Build a BOTAS reference index
botas align Align RNA-seq reads
botas quantify Quantify gene or operon expression
botas getOperons Infer bacterial operons
Detailed help is available for every command:
botas --help
botas index --help
botas align --help
botas quantify --help
botas getOperons --help
The installed version can be displayed with:
botas --version
Supported Input Formats
| Analysis | Input |
|---|---|
| Indexing | FASTA |
| Alignment | FASTQ or compressed FASTQ |
| Quantification | Coordinate-sorted paired-end BAM and GFF3 |
| Operon inference | Coordinate-sorted BAM and GFF3 |
Supported Output Formats
| Analysis | Output |
|---|---|
| Indexing | BOTAS index (*.botas.idx) |
| Alignment | BAM and optional BAI |
| Quantification | TSV |
| Operon inference | TSV and optional GFF |
Requirements
- Python 3.10 or later
- pysam
- edlib
- Biopython
Citation
When using BOTAS in published research, please cite:
Wekesa CS, Kiprotich K, Muoma J, Mithöfer A. BOTAS: An Integrated Bacterial RNA-seq Analysis Framework with Circular-Aware Alignment and Operon Inference. Manuscript under review.
Citation information will be updated following publication.
License
BOTAS is distributed under the MIT License.
Author
Clabe Simiyu Wekesa
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 botas_rnaseq-0.1.6.tar.gz.
File metadata
- Download URL: botas_rnaseq-0.1.6.tar.gz
- Upload date:
- Size: 2.3 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
db5356426d058dfda572759639a4ba1bd4049a0d07c53e817c975e57d7baba9b
|
|
| MD5 |
1618ab29e190e8ddf0978d4eb839abc9
|
|
| BLAKE2b-256 |
7ca4812bb48a1229de2ab1181727697e576923097d7cae5da1884f372c739a7c
|
File details
Details for the file botas_rnaseq-0.1.6-py3-none-any.whl.
File metadata
- Download URL: botas_rnaseq-0.1.6-py3-none-any.whl
- Upload date:
- Size: 2.3 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ad5dd8fce792a042a4219f59656906549faba78e27ef44eddd2f3e4dd31968f4
|
|
| MD5 |
479499c8d83b7e82ce550ff42a4a00cb
|
|
| BLAKE2b-256 |
cbd5b60f42d77bcc73663969a6ed1df1dfb2bdd54eb0f5c91222617aafa5f189
|