Skip to main content

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

GitHub: https://github.com/clabe-wekesa/botas

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

botas_rnaseq-0.1.5.tar.gz (2.3 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

botas_rnaseq-0.1.5-py3-none-any.whl (2.3 MB view details)

Uploaded Python 3

File details

Details for the file botas_rnaseq-0.1.5.tar.gz.

File metadata

  • Download URL: botas_rnaseq-0.1.5.tar.gz
  • Upload date:
  • Size: 2.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.13

File hashes

Hashes for botas_rnaseq-0.1.5.tar.gz
Algorithm Hash digest
SHA256 2324405414e1b021f7337d1238d8e3e242367e9b46315cf47ef7b3918e18a163
MD5 c7c768e2004cca9c4094f14f952b6472
BLAKE2b-256 52b1c3bd0d33e1ddf32de3dd2fe54ce7201ac20fd51f315edc6c9aa8084c3de4

See more details on using hashes here.

File details

Details for the file botas_rnaseq-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: botas_rnaseq-0.1.5-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.13

File hashes

Hashes for botas_rnaseq-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 3198a784ccfa2a5cf7b635969ae3c90fc26f9a0ad17de9cd028ba6e6f1ec7ce3
MD5 7610e9c93fd7043f23ad9a2f11295757
BLAKE2b-256 a59f63d898a8d3d4d9cd2836eeb200e440fd6cb6986c6081a0ba23fae1ac864f

See more details on using hashes here.

Release history Release notifications | RSS feed

0.1.6

2 files

This release

0.1.5 This release

2 files

0.1.4

2 files

0.1.3

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page