botas-rnaseq 0.1.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. botas_rnaseq-0.1.3/LICENSE +21 -0
  2. botas_rnaseq-0.1.3/PKG-INFO +249 -0
  3. botas_rnaseq-0.1.3/README.md +211 -0
  4. botas_rnaseq-0.1.3/botas/__init__.py +6 -0
  5. botas_rnaseq-0.1.3/botas/cli/align.py +867 -0
  6. botas_rnaseq-0.1.3/botas/core/__init__.py +0 -0
  7. botas_rnaseq-0.1.3/botas/core/align_core.py +282 -0
  8. botas_rnaseq-0.1.3/botas/core/align_pe.py +545 -0
  9. botas_rnaseq-0.1.3/botas/core/botas_index.py +406 -0
  10. botas_rnaseq-0.1.3/botas/core/cigar.py +140 -0
  11. botas_rnaseq-0.1.3/botas/core/circular.py +141 -0
  12. botas_rnaseq-0.1.3/botas/core/edlib_utils.py +87 -0
  13. botas_rnaseq-0.1.3/botas/core/pairing.py +167 -0
  14. botas_rnaseq-0.1.3/botas/core/parallel_context.py +29 -0
  15. botas_rnaseq-0.1.3/botas/core/pe_pool.py +309 -0
  16. botas_rnaseq-0.1.3/botas/core/ref_index.py +333 -0
  17. botas_rnaseq-0.1.3/botas/core/scoring.py +28 -0
  18. botas_rnaseq-0.1.3/botas/core/se_pool.py +247 -0
  19. botas_rnaseq-0.1.3/botas/core/slice.py +66 -0
  20. botas_rnaseq-0.1.3/botas/core/threading_utils.py +20 -0
  21. botas_rnaseq-0.1.3/botas/core/utils.py +53 -0
  22. botas_rnaseq-0.1.3/botas/core/version.py +7 -0
  23. botas_rnaseq-0.1.3/botas/data/rrna_mini.fa.gz +0 -0
  24. botas_rnaseq-0.1.3/botas/io/bam_writer.py +272 -0
  25. botas_rnaseq-0.1.3/botas/io/fastq.py +41 -0
  26. botas_rnaseq-0.1.3/botas/io/reference_set.py +146 -0
  27. botas_rnaseq-0.1.3/botas/io/workdir.py +68 -0
  28. botas_rnaseq-0.1.3/botas/operons/__init__.py +0 -0
  29. botas_rnaseq-0.1.3/botas/operons/classifier.py +38 -0
  30. botas_rnaseq-0.1.3/botas/operons/cli.py +237 -0
  31. botas_rnaseq-0.1.3/botas/operons/consensus.py +33 -0
  32. botas_rnaseq-0.1.3/botas/operons/core.py +20 -0
  33. botas_rnaseq-0.1.3/botas/operons/features.py +25 -0
  34. botas_rnaseq-0.1.3/botas/operons/io.py +154 -0
  35. botas_rnaseq-0.1.3/botas/operons/merge.py +19 -0
  36. botas_rnaseq-0.1.3/botas/quantify/__init__.py +0 -0
  37. botas_rnaseq-0.1.3/botas/quantify/_core_fast.c +11909 -0
  38. botas_rnaseq-0.1.3/botas/quantify/cli.py +227 -0
  39. botas_rnaseq-0.1.3/botas/quantify/core.py +725 -0
  40. botas_rnaseq-0.1.3/botas/quantify/genes.py +127 -0
  41. botas_rnaseq-0.1.3/botas/quantify/infer_operons.py +41 -0
  42. botas_rnaseq-0.1.3/botas/quantify/io.py +627 -0
  43. botas_rnaseq-0.1.3/botas/quantify/operons.py +107 -0
  44. botas_rnaseq-0.1.3/botas/rrna/__init__.py +3 -0
  45. botas_rnaseq-0.1.3/botas/rrna/db.py +8 -0
  46. botas_rnaseq-0.1.3/botas/rrna/rrna.py +51 -0
  47. botas_rnaseq-0.1.3/botas_rnaseq.egg-info/PKG-INFO +249 -0
  48. botas_rnaseq-0.1.3/botas_rnaseq.egg-info/SOURCES.txt +53 -0
  49. botas_rnaseq-0.1.3/botas_rnaseq.egg-info/dependency_links.txt +1 -0
  50. botas_rnaseq-0.1.3/botas_rnaseq.egg-info/entry_points.txt +2 -0
  51. botas_rnaseq-0.1.3/botas_rnaseq.egg-info/requires.txt +16 -0
  52. botas_rnaseq-0.1.3/botas_rnaseq.egg-info/top_level.txt +1 -0
  53. botas_rnaseq-0.1.3/pyproject.toml +110 -0
  54. botas_rnaseq-0.1.3/setup.cfg +4 -0
  55. botas_rnaseq-0.1.3/setup.py +11 -0
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Clabe Wekesa
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,249 @@
1
+ Metadata-Version: 2.4
2
+ Name: botas-rnaseq
3
+ Version: 0.1.3
4
+ Summary: BOTAS: Bacterial Operon-aware Transcriptome Alignment System
5
+ Author-email: Clabe Wekesa <simiyu86wekesa@gmail.com>
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/clabe-wekesa/botas
8
+ Project-URL: Repository, https://github.com/clabe-wekesa/botas
9
+ Project-URL: Issues, https://github.com/clabe-wekesa/botas/issues
10
+ Project-URL: Documentation, https://github.com/clabe-wekesa/botas#readme
11
+ Keywords: RNA-seq,bacterial transcriptomics,operons,sequence alignment,bioinformatics,circular genomes
12
+ Classifier: Development Status :: 4 - Beta
13
+ Classifier: Intended Audience :: Science/Research
14
+ Classifier: Operating System :: POSIX :: Linux
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3.10
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
20
+ Requires-Python: >=3.10
21
+ Description-Content-Type: text/markdown
22
+ License-File: LICENSE
23
+ Requires-Dist: pysam>=0.22
24
+ Requires-Dist: edlib>=1.3.9
25
+ Requires-Dist: biopython>=1.81
26
+ Provides-Extra: progress
27
+ Requires-Dist: tqdm>=4.66; extra == "progress"
28
+ Provides-Extra: dev
29
+ Requires-Dist: Cython>=3.0; extra == "dev"
30
+ Requires-Dist: pytest>=7.4; extra == "dev"
31
+ Requires-Dist: pytest-cov>=4.1; extra == "dev"
32
+ Requires-Dist: black>=24.0; extra == "dev"
33
+ Requires-Dist: ruff>=0.5; extra == "dev"
34
+ Requires-Dist: mypy>=1.8; extra == "dev"
35
+ Requires-Dist: build>=1.2; extra == "dev"
36
+ Requires-Dist: twine>=5.0; extra == "dev"
37
+ Dynamic: license-file
38
+
39
+ # BOTAS
40
+
41
+ ## Bacterial Operon-Aware Transcriptome Alignment System
42
+
43
+ BOTAS is a bacterial RNA-seq analysis framework that integrates read alignment, gene quantification, operon inference, and operon-level quantification within a unified Python package. It is specifically designed for bacterial transcriptomes, providing native support for circular genomes, operon-aware analyses, and strand-specific expression profiling.
44
+
45
+ Unlike general-purpose RNA-seq aligners developed primarily for eukaryotic transcriptomes, BOTAS addresses the unique characteristics of bacterial genomes, including dense gene organization, polycistronic transcription, operon architecture, and circular chromosomes.
46
+
47
+ ---
48
+
49
+ ## Key Features
50
+
51
+ - Seed-and-extend alignment engine optimized for bacterial genomes
52
+ - Native support for circular chromosomes and plasmids
53
+ - Paired-end and single-end read alignment
54
+ - Strand-aware gene expression quantification
55
+ - Gene-level and operon-level expression quantification
56
+ - Operon inference from aligned reads
57
+ - Operon-aware transcriptome analysis
58
+ - Optional rRNA filtering
59
+ - Parallel execution for scalable performance
60
+ - Modular and extensible Python architecture
61
+
62
+ ---
63
+
64
+ ## Why BOTAS?
65
+
66
+ Most RNA-seq aligners were designed for eukaryotic transcriptomes and assume splicing, large introns, and linear chromosomes. These assumptions are inappropriate for bacterial transcriptomes, which are characterized by:
67
+
68
+ - Densely packed genes
69
+ - Polycistronic transcripts organized into operons
70
+ - Circular chromosomes and plasmids
71
+ - Strong dependence on strand-specific transcription
72
+
73
+ BOTAS addresses these challenges through native circular-genome support, operon-aware analysis, strand-specific quantification, circular insert-size validation, and integrated gene and operon quantification within a single framework.
74
+
75
+ ---
76
+
77
+ ## Installation
78
+
79
+ ### Install from PyPI
80
+
81
+ ```bash
82
+ pip install botas
83
+ ```
84
+
85
+ ### Install the latest development version
86
+
87
+ ```bash
88
+ pip install git+https://github.com/clabe-wekesa/botas.git
89
+ ```
90
+
91
+ ### Install from source
92
+
93
+ ```bash
94
+ git clone https://github.com/clabe-wekesa/botas.git
95
+ cd botas
96
+ pip install .
97
+ ```
98
+
99
+ ### Development installation
100
+
101
+ ```bash
102
+ pip install -e ".[dev]"
103
+ ```
104
+
105
+ ---
106
+
107
+ ## Quick Start
108
+
109
+ ### Paired-end alignment
110
+
111
+ ```bash
112
+ botas align \
113
+ -r reference.fasta \
114
+ -1 reads_R1.fastq \
115
+ -2 reads_R2.fastq \
116
+ -o aligned.bam
117
+ ```
118
+
119
+ ### Single-end alignment
120
+
121
+ ```bash
122
+ botas align \
123
+ -r reference.fasta \
124
+ -U reads.fastq \
125
+ -o aligned.bam
126
+ ```
127
+
128
+ ### Gene quantification
129
+
130
+ ```bash
131
+ botas quantify \
132
+ -b aligned.bam \
133
+ -g genes.gff \
134
+ -o gene_counts.tsv
135
+ ```
136
+
137
+ Supported features include:
138
+
139
+ - Strand-specific counting
140
+ - MAPQ filtering
141
+ - Multi-mapper handling
142
+ - TPM and RPKM calculation
143
+ - Multi-BAM count matrix generation
144
+
145
+ ### Operon inference
146
+
147
+ ```bash
148
+ botas getOperons \
149
+ -b aligned.bam \
150
+ -g genes.gff \
151
+ -o operons.tsv
152
+ ```
153
+
154
+ Operon inference integrates:
155
+
156
+ - Intergenic distance
157
+ - Strand consistency
158
+ - Coverage similarity
159
+ - Paired-end support
160
+ - Consensus-based merging
161
+
162
+ ---
163
+
164
+ ## Architecture
165
+
166
+ ```text
167
+ botas/
168
+ ├── cli/ # Command-line interface
169
+ ├── core/ # Alignment engine
170
+ ├── data/ # Reference resources
171
+ ├── io/ # FASTQ, BAM and reference handling
172
+ ├── operons/ # Operon inference
173
+ ├── quantify/ # Gene and operon quantification
174
+ └── rrna/ # rRNA detection and filtering
175
+ ```
176
+
177
+ The alignment engine implements:
178
+
179
+ - K-mer indexing
180
+ - Seed clustering
181
+ - Edit-distance extension using edlib
182
+ - CIGAR reconstruction
183
+ - Mapping quality estimation
184
+ - Circular coordinate normalization
185
+
186
+ ---
187
+
188
+ ## Design Principles
189
+
190
+ BOTAS is designed to provide:
191
+
192
+ - Accurate bacterial RNA-seq alignment
193
+ - Native support for circular genomes
194
+ - Reproducible gene and operon quantification
195
+ - Transparent and interpretable alignment scoring
196
+ - Modular architecture for method development and extension
197
+ - Integration of alignment and operon-level analyses within a unified workflow
198
+
199
+ ---
200
+
201
+ ## Requirements
202
+
203
+ ### Required
204
+
205
+ - Python ≥ 3.10
206
+ - pysam
207
+ - edlib
208
+ - biopython
209
+
210
+ ### Optional
211
+
212
+ - tqdm (progress display)
213
+
214
+ ---
215
+
216
+ ## Documentation
217
+
218
+ Command-line help is available through:
219
+
220
+ ```bash
221
+ botas --help
222
+ botas align --help
223
+ botas quant --help
224
+ botas getOperons --help
225
+ ```
226
+
227
+ ---
228
+
229
+ ## Citation
230
+
231
+ If you use BOTAS in your research, please cite:
232
+
233
+ > Wekesa, C. S. *BOTAS: Bacterial Operon-Aware Transcriptome Alignment System.*
234
+
235
+ Citation details will be updated following publication.
236
+
237
+ ---
238
+
239
+ ## License
240
+
241
+ BOTAS is distributed under the MIT License. See the `LICENSE` file for details.
242
+
243
+ ---
244
+
245
+ ## Author
246
+
247
+ **Clabe Simiyu Wekesa**
248
+
249
+ GitHub: https://github.com/clabe-wekesa
@@ -0,0 +1,211 @@
1
+ # BOTAS
2
+
3
+ ## Bacterial Operon-Aware Transcriptome Alignment System
4
+
5
+ BOTAS is a bacterial RNA-seq analysis framework that integrates read alignment, gene quantification, operon inference, and operon-level quantification within a unified Python package. It is specifically designed for bacterial transcriptomes, providing native support for circular genomes, operon-aware analyses, and strand-specific expression profiling.
6
+
7
+ Unlike general-purpose RNA-seq aligners developed primarily for eukaryotic transcriptomes, BOTAS addresses the unique characteristics of bacterial genomes, including dense gene organization, polycistronic transcription, operon architecture, and circular chromosomes.
8
+
9
+ ---
10
+
11
+ ## Key Features
12
+
13
+ - Seed-and-extend alignment engine optimized for bacterial genomes
14
+ - Native support for circular chromosomes and plasmids
15
+ - Paired-end and single-end read alignment
16
+ - Strand-aware gene expression quantification
17
+ - Gene-level and operon-level expression quantification
18
+ - Operon inference from aligned reads
19
+ - Operon-aware transcriptome analysis
20
+ - Optional rRNA filtering
21
+ - Parallel execution for scalable performance
22
+ - Modular and extensible Python architecture
23
+
24
+ ---
25
+
26
+ ## Why BOTAS?
27
+
28
+ Most RNA-seq aligners were designed for eukaryotic transcriptomes and assume splicing, large introns, and linear chromosomes. These assumptions are inappropriate for bacterial transcriptomes, which are characterized by:
29
+
30
+ - Densely packed genes
31
+ - Polycistronic transcripts organized into operons
32
+ - Circular chromosomes and plasmids
33
+ - Strong dependence on strand-specific transcription
34
+
35
+ BOTAS addresses these challenges through native circular-genome support, operon-aware analysis, strand-specific quantification, circular insert-size validation, and integrated gene and operon quantification within a single framework.
36
+
37
+ ---
38
+
39
+ ## Installation
40
+
41
+ ### Install from PyPI
42
+
43
+ ```bash
44
+ pip install botas
45
+ ```
46
+
47
+ ### Install the latest development version
48
+
49
+ ```bash
50
+ pip install git+https://github.com/clabe-wekesa/botas.git
51
+ ```
52
+
53
+ ### Install from source
54
+
55
+ ```bash
56
+ git clone https://github.com/clabe-wekesa/botas.git
57
+ cd botas
58
+ pip install .
59
+ ```
60
+
61
+ ### Development installation
62
+
63
+ ```bash
64
+ pip install -e ".[dev]"
65
+ ```
66
+
67
+ ---
68
+
69
+ ## Quick Start
70
+
71
+ ### Paired-end alignment
72
+
73
+ ```bash
74
+ botas align \
75
+ -r reference.fasta \
76
+ -1 reads_R1.fastq \
77
+ -2 reads_R2.fastq \
78
+ -o aligned.bam
79
+ ```
80
+
81
+ ### Single-end alignment
82
+
83
+ ```bash
84
+ botas align \
85
+ -r reference.fasta \
86
+ -U reads.fastq \
87
+ -o aligned.bam
88
+ ```
89
+
90
+ ### Gene quantification
91
+
92
+ ```bash
93
+ botas quantify \
94
+ -b aligned.bam \
95
+ -g genes.gff \
96
+ -o gene_counts.tsv
97
+ ```
98
+
99
+ Supported features include:
100
+
101
+ - Strand-specific counting
102
+ - MAPQ filtering
103
+ - Multi-mapper handling
104
+ - TPM and RPKM calculation
105
+ - Multi-BAM count matrix generation
106
+
107
+ ### Operon inference
108
+
109
+ ```bash
110
+ botas getOperons \
111
+ -b aligned.bam \
112
+ -g genes.gff \
113
+ -o operons.tsv
114
+ ```
115
+
116
+ Operon inference integrates:
117
+
118
+ - Intergenic distance
119
+ - Strand consistency
120
+ - Coverage similarity
121
+ - Paired-end support
122
+ - Consensus-based merging
123
+
124
+ ---
125
+
126
+ ## Architecture
127
+
128
+ ```text
129
+ botas/
130
+ ├── cli/ # Command-line interface
131
+ ├── core/ # Alignment engine
132
+ ├── data/ # Reference resources
133
+ ├── io/ # FASTQ, BAM and reference handling
134
+ ├── operons/ # Operon inference
135
+ ├── quantify/ # Gene and operon quantification
136
+ └── rrna/ # rRNA detection and filtering
137
+ ```
138
+
139
+ The alignment engine implements:
140
+
141
+ - K-mer indexing
142
+ - Seed clustering
143
+ - Edit-distance extension using edlib
144
+ - CIGAR reconstruction
145
+ - Mapping quality estimation
146
+ - Circular coordinate normalization
147
+
148
+ ---
149
+
150
+ ## Design Principles
151
+
152
+ BOTAS is designed to provide:
153
+
154
+ - Accurate bacterial RNA-seq alignment
155
+ - Native support for circular genomes
156
+ - Reproducible gene and operon quantification
157
+ - Transparent and interpretable alignment scoring
158
+ - Modular architecture for method development and extension
159
+ - Integration of alignment and operon-level analyses within a unified workflow
160
+
161
+ ---
162
+
163
+ ## Requirements
164
+
165
+ ### Required
166
+
167
+ - Python ≥ 3.10
168
+ - pysam
169
+ - edlib
170
+ - biopython
171
+
172
+ ### Optional
173
+
174
+ - tqdm (progress display)
175
+
176
+ ---
177
+
178
+ ## Documentation
179
+
180
+ Command-line help is available through:
181
+
182
+ ```bash
183
+ botas --help
184
+ botas align --help
185
+ botas quant --help
186
+ botas getOperons --help
187
+ ```
188
+
189
+ ---
190
+
191
+ ## Citation
192
+
193
+ If you use BOTAS in your research, please cite:
194
+
195
+ > Wekesa, C. S. *BOTAS: Bacterial Operon-Aware Transcriptome Alignment System.*
196
+
197
+ Citation details will be updated following publication.
198
+
199
+ ---
200
+
201
+ ## License
202
+
203
+ BOTAS is distributed under the MIT License. See the `LICENSE` file for details.
204
+
205
+ ---
206
+
207
+ ## Author
208
+
209
+ **Clabe Simiyu Wekesa**
210
+
211
+ GitHub: https://github.com/clabe-wekesa
@@ -0,0 +1,6 @@
1
+ from importlib.metadata import PackageNotFoundError, version
2
+
3
+ try:
4
+ __version__ = version("botas-rnaseq")
5
+ except PackageNotFoundError:
6
+ __version__ = "0.1.3"