genetinav 0.1.0__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.
- genetinav-0.1.0/.gitignore +39 -0
- genetinav-0.1.0/LICENSE +65 -0
- genetinav-0.1.0/PKG-INFO +311 -0
- genetinav-0.1.0/README.md +218 -0
- genetinav-0.1.0/pyproject.toml +51 -0
- genetinav-0.1.0/src/genetinav/__init__.py +1 -0
- genetinav-0.1.0/src/genetinav/api_client.py +124 -0
- genetinav-0.1.0/src/genetinav/cache.py +71 -0
- genetinav-0.1.0/src/genetinav/chunk_cache.py +148 -0
- genetinav-0.1.0/src/genetinav/cli.py +239 -0
- genetinav-0.1.0/src/genetinav/command_parser.py +32 -0
- genetinav-0.1.0/src/genetinav/command_router.py +33 -0
- genetinav-0.1.0/src/genetinav/db.py +77 -0
- genetinav-0.1.0/src/genetinav/favorites.py +79 -0
- genetinav-0.1.0/src/genetinav/gene_service.py +265 -0
- genetinav-0.1.0/src/genetinav/history.py +94 -0
- genetinav-0.1.0/src/genetinav/models.py +80 -0
- genetinav-0.1.0/src/genetinav/navigation_history.py +61 -0
- genetinav-0.1.0/src/genetinav/sequence.py +63 -0
- genetinav-0.1.0/src/genetinav/settings.py +69 -0
- genetinav-0.1.0/src/genetinav/textual_app.py +168 -0
- genetinav-0.1.0/src/genetinav/themes.py +206 -0
- genetinav-0.1.0/src/genetinav/ui_textual/__init__.py +1 -0
- genetinav-0.1.0/src/genetinav/ui_textual/about_modal.py +339 -0
- genetinav-0.1.0/src/genetinav/ui_textual/base_screen.py +16 -0
- genetinav-0.1.0/src/genetinav/ui_textual/command_palette.py +137 -0
- genetinav-0.1.0/src/genetinav/ui_textual/favorites_modal.py +79 -0
- genetinav-0.1.0/src/genetinav/ui_textual/help_modal.py +191 -0
- genetinav-0.1.0/src/genetinav/ui_textual/history_modal.py +69 -0
- genetinav-0.1.0/src/genetinav/ui_textual/home_screen.py +255 -0
- genetinav-0.1.0/src/genetinav/ui_textual/loading_screen.py +36 -0
- genetinav-0.1.0/src/genetinav/ui_textual/menu_modal.py +210 -0
- genetinav-0.1.0/src/genetinav/ui_textual/result_screen.py +152 -0
- genetinav-0.1.0/src/genetinav/ui_textual/sequence_viewer.tcss +142 -0
- genetinav-0.1.0/src/genetinav/ui_textual/sequence_viewer_controller.py +156 -0
- genetinav-0.1.0/src/genetinav/ui_textual/sequence_viewer_screen.py +765 -0
- genetinav-0.1.0/src/genetinav/ui_textual/settings_modal.py +177 -0
- genetinav-0.1.0/src/genetinav/ui_textual/theme.py +387 -0
- genetinav-0.1.0/src/genetinav/ui_textual/widgets/__init__.py +85 -0
- genetinav-0.1.0/src/genetinav/ui_textual/widgets/gc_track_widget.py +75 -0
- genetinav-0.1.0/src/genetinav/ui_textual/widgets/legend_widget.py +58 -0
- genetinav-0.1.0/src/genetinav/ui_textual/widgets/minimap_widget.py +74 -0
- genetinav-0.1.0/src/genetinav/ui_textual/widgets/ruler_widget.py +110 -0
- genetinav-0.1.0/src/genetinav/ui_textual/widgets/sequence_track_widget.py +121 -0
- genetinav-0.1.0/src/genetinav/ui_textual/widgets/stats_footer_widget.py +117 -0
- genetinav-0.1.0/src/genetinav/utils/__init__.py +1 -0
- genetinav-0.1.0/src/genetinav/utils/errors.py +36 -0
- genetinav-0.1.0/src/genetinav/utils/export.py +17 -0
- genetinav-0.1.0/src/genetinav/utils/validation.py +23 -0
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
*.pyc
|
|
6
|
+
|
|
7
|
+
# pytest cache
|
|
8
|
+
.pytest_cache/
|
|
9
|
+
|
|
10
|
+
# Distribution / packaging
|
|
11
|
+
*.egg-info/
|
|
12
|
+
build/
|
|
13
|
+
dist/
|
|
14
|
+
*.egg
|
|
15
|
+
MANIFEST
|
|
16
|
+
|
|
17
|
+
# Virtual environments
|
|
18
|
+
.venv/
|
|
19
|
+
venv/
|
|
20
|
+
env/
|
|
21
|
+
ENV/
|
|
22
|
+
|
|
23
|
+
# Databases
|
|
24
|
+
*.db
|
|
25
|
+
*.sqlite3
|
|
26
|
+
|
|
27
|
+
# OS artefacts
|
|
28
|
+
.DS_Store
|
|
29
|
+
Thumbs.db
|
|
30
|
+
|
|
31
|
+
# Editor / IDE
|
|
32
|
+
.idea/
|
|
33
|
+
.vscode/
|
|
34
|
+
*.swp
|
|
35
|
+
*.swo
|
|
36
|
+
|
|
37
|
+
# Coverage reports
|
|
38
|
+
.coverage
|
|
39
|
+
htmlcov/
|
genetinav-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
Custom Source-Available License 1.0
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 BIOWESS
|
|
4
|
+
|
|
5
|
+
All rights reserved except as expressly permitted below.
|
|
6
|
+
|
|
7
|
+
1. Permission Granted
|
|
8
|
+
|
|
9
|
+
You are permitted to:
|
|
10
|
+
|
|
11
|
+
- View and study the source code.
|
|
12
|
+
- Clone and download the repository.
|
|
13
|
+
- Run the software locally for personal or educational use.
|
|
14
|
+
- Modify the source code for personal learning purposes.
|
|
15
|
+
- Share snippets or modified versions for non-commercial educational purposes,
|
|
16
|
+
provided proper credit is clearly given to the original author.
|
|
17
|
+
|
|
18
|
+
2. Restrictions
|
|
19
|
+
|
|
20
|
+
You may NOT, without prior written permission from the copyright holder:
|
|
21
|
+
|
|
22
|
+
- Sell this software or any modified version of it.
|
|
23
|
+
- Use this software in a commercial product or service.
|
|
24
|
+
- Offer this software as a paid SaaS, hosted platform, or subscription service.
|
|
25
|
+
- Rebrand, sublicense, or redistribute this software while claiming it as your own work.
|
|
26
|
+
- Remove copyright notices, attribution, or license text.
|
|
27
|
+
- Use substantial portions of this software in commercial projects.
|
|
28
|
+
- Create commercial derivatives based primarily on this project.
|
|
29
|
+
|
|
30
|
+
3. Attribution Requirement
|
|
31
|
+
|
|
32
|
+
Any public use, fork, modification, or redistribution of this project or its
|
|
33
|
+
derivatives must include visible credit to the original author.
|
|
34
|
+
|
|
35
|
+
Example attribution:
|
|
36
|
+
|
|
37
|
+
"Based on genetinav by BIOWESS"
|
|
38
|
+
|
|
39
|
+
4. Ownership
|
|
40
|
+
|
|
41
|
+
The software and all associated intellectual property remain the exclusive
|
|
42
|
+
property of the copyright holder.
|
|
43
|
+
|
|
44
|
+
This license does not transfer ownership of the software or grant any trademark rights.
|
|
45
|
+
|
|
46
|
+
5. Contributions
|
|
47
|
+
|
|
48
|
+
Unless explicitly stated otherwise, any contributions submitted to this project
|
|
49
|
+
may be incorporated into the project under this same license.
|
|
50
|
+
|
|
51
|
+
6. Warranty Disclaimer
|
|
52
|
+
|
|
53
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
54
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
55
|
+
FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
|
|
56
|
+
|
|
57
|
+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
|
58
|
+
DAMAGES, OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT, OR
|
|
59
|
+
OTHERWISE, ARISING FROM, OUT OF, OR IN CONNECTION WITH THE SOFTWARE OR THE
|
|
60
|
+
USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
61
|
+
|
|
62
|
+
7. Acceptance
|
|
63
|
+
|
|
64
|
+
By cloning, downloading, using, or modifying this software, you agree to the
|
|
65
|
+
terms of this license.
|
genetinav-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,311 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: genetinav
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: GenetiNav — navigational genomics toolkit
|
|
5
|
+
Project-URL: Homepage, https://github.com/biowess/genetinav
|
|
6
|
+
Project-URL: Documentation, https://github.com/biowess/genetinav#readme
|
|
7
|
+
Project-URL: Repository, https://github.com/biowess/genetinav
|
|
8
|
+
Project-URL: Bug Tracker, https://github.com/biowess/genetinav/issues
|
|
9
|
+
License: Custom Source-Available License 1.0
|
|
10
|
+
|
|
11
|
+
Copyright (c) 2026 BIOWESS
|
|
12
|
+
|
|
13
|
+
All rights reserved except as expressly permitted below.
|
|
14
|
+
|
|
15
|
+
1. Permission Granted
|
|
16
|
+
|
|
17
|
+
You are permitted to:
|
|
18
|
+
|
|
19
|
+
- View and study the source code.
|
|
20
|
+
- Clone and download the repository.
|
|
21
|
+
- Run the software locally for personal or educational use.
|
|
22
|
+
- Modify the source code for personal learning purposes.
|
|
23
|
+
- Share snippets or modified versions for non-commercial educational purposes,
|
|
24
|
+
provided proper credit is clearly given to the original author.
|
|
25
|
+
|
|
26
|
+
2. Restrictions
|
|
27
|
+
|
|
28
|
+
You may NOT, without prior written permission from the copyright holder:
|
|
29
|
+
|
|
30
|
+
- Sell this software or any modified version of it.
|
|
31
|
+
- Use this software in a commercial product or service.
|
|
32
|
+
- Offer this software as a paid SaaS, hosted platform, or subscription service.
|
|
33
|
+
- Rebrand, sublicense, or redistribute this software while claiming it as your own work.
|
|
34
|
+
- Remove copyright notices, attribution, or license text.
|
|
35
|
+
- Use substantial portions of this software in commercial projects.
|
|
36
|
+
- Create commercial derivatives based primarily on this project.
|
|
37
|
+
|
|
38
|
+
3. Attribution Requirement
|
|
39
|
+
|
|
40
|
+
Any public use, fork, modification, or redistribution of this project or its
|
|
41
|
+
derivatives must include visible credit to the original author.
|
|
42
|
+
|
|
43
|
+
Example attribution:
|
|
44
|
+
|
|
45
|
+
"Based on genetinav by BIOWESS"
|
|
46
|
+
|
|
47
|
+
4. Ownership
|
|
48
|
+
|
|
49
|
+
The software and all associated intellectual property remain the exclusive
|
|
50
|
+
property of the copyright holder.
|
|
51
|
+
|
|
52
|
+
This license does not transfer ownership of the software or grant any trademark rights.
|
|
53
|
+
|
|
54
|
+
5. Contributions
|
|
55
|
+
|
|
56
|
+
Unless explicitly stated otherwise, any contributions submitted to this project
|
|
57
|
+
may be incorporated into the project under this same license.
|
|
58
|
+
|
|
59
|
+
6. Warranty Disclaimer
|
|
60
|
+
|
|
61
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
62
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
63
|
+
FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
|
|
64
|
+
|
|
65
|
+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
|
66
|
+
DAMAGES, OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT, OR
|
|
67
|
+
OTHERWISE, ARISING FROM, OUT OF, OR IN CONNECTION WITH THE SOFTWARE OR THE
|
|
68
|
+
USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
69
|
+
|
|
70
|
+
7. Acceptance
|
|
71
|
+
|
|
72
|
+
By cloning, downloading, using, or modifying this software, you agree to the
|
|
73
|
+
terms of this license.
|
|
74
|
+
License-File: LICENSE
|
|
75
|
+
Keywords: bioinformatics,cli,ensembl,genomics,terminal
|
|
76
|
+
Classifier: Development Status :: 4 - Beta
|
|
77
|
+
Classifier: Environment :: Console
|
|
78
|
+
Classifier: Intended Audience :: Science/Research
|
|
79
|
+
Classifier: License :: Other/Proprietary License
|
|
80
|
+
Classifier: Natural Language :: English
|
|
81
|
+
Classifier: Operating System :: OS Independent
|
|
82
|
+
Classifier: Programming Language :: Python :: 3
|
|
83
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
84
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
85
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
86
|
+
Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
|
|
87
|
+
Classifier: Topic :: Terminals
|
|
88
|
+
Requires-Python: >=3.10
|
|
89
|
+
Requires-Dist: httpx
|
|
90
|
+
Requires-Dist: textual
|
|
91
|
+
Requires-Dist: typer
|
|
92
|
+
Description-Content-Type: text/markdown
|
|
93
|
+
|
|
94
|
+
A terminal-based genomics toolkit for gene lookup, DNA sequence exploration, and genomic coordinate navigation.
|
|
95
|
+
Built with Textual and Typer, powered by the public Ensembl REST API.
|
|
96
|
+
|
|
97
|
+
Type a gene symbol to retrieve its metadata, then drop into a colour-coded, scrollable sequence viewer with motif search, reverse-complement display, and live gene-boundary detection — all from your terminal.
|
|
98
|
+
|
|
99
|
+
## Features
|
|
100
|
+
|
|
101
|
+
- **Gene lookup** – resolve gene symbols via the Ensembl REST API (human, mouse, rat, zebrafish)
|
|
102
|
+
- **Interactive sequence viewer** – scrollable, colour-coded nucleotide track with coordinate ruler, GC-content sparkline, minimap, and stats footer
|
|
103
|
+
- **Rich navigation** – base-by-base and page-by-page scrolling, jump-to-coordinate or gene, motif search with next/prev match, zoom, and back/forward history
|
|
104
|
+
- **Reverse-complement toggle** – flip the display in place without losing position
|
|
105
|
+
- **Dynamic gene-boundary detection** – the viewer automatically relabels itself as you scroll across gene/intergenic boundaries
|
|
106
|
+
- **Search history** – automatically recorded, capped at 200 entries, browsable and re-openable
|
|
107
|
+
- **Favourites** – bookmark genes for quick future access
|
|
108
|
+
- **Theming** – 10 built-in dark colour themes, each with its own DNA base-colour palette
|
|
109
|
+
- **Local caching** – SQLite-backed response cache plus an in-memory chunked sequence cache with background prefetching
|
|
110
|
+
- **Export** – Markdown, JSON, or FASTA (genomic / transcript / CDS) export of the current gene
|
|
111
|
+
- **Open in Ensembl** – jump straight to the gene’s Ensembl page in your browser
|
|
112
|
+
- **Command palette** – fuzzy-filterable command search, global and viewer-aware
|
|
113
|
+
- **Performance mode** – disable animations for a snappier or headless-friendly session
|
|
114
|
+
- **Configurable** – all preferences stored in `~/.genetinav/settings.json`
|
|
115
|
+
|
|
116
|
+
## Installation
|
|
117
|
+
|
|
118
|
+
GenetiNav requires Python 3.10+.
|
|
119
|
+
|
|
120
|
+
Install from PyPI using pip:
|
|
121
|
+
|
|
122
|
+
```bash
|
|
123
|
+
pip install genetinav
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
If you prefer an isolated, globally available installation, use pipx:
|
|
127
|
+
|
|
128
|
+
```bash
|
|
129
|
+
pipx install genetinav
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
After installation, the `genetinav` command will be available in your terminal.
|
|
133
|
+
|
|
134
|
+
## Usage
|
|
135
|
+
|
|
136
|
+
Launch the interactive TUI:
|
|
137
|
+
|
|
138
|
+
```bash
|
|
139
|
+
genetinav
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
Opens the home screen with a search bar. Type a gene symbol and press Enter, or use a `/command` to navigate directly.
|
|
143
|
+
|
|
144
|
+
Quick gene lookup:
|
|
145
|
+
|
|
146
|
+
```bash
|
|
147
|
+
genetinav BRCA1
|
|
148
|
+
genetinav brca2
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
Performs an immediate lookup inside the TUI.
|
|
152
|
+
|
|
153
|
+
### Subcommands
|
|
154
|
+
|
|
155
|
+
| Command | Description |
|
|
156
|
+
|--------------------------|------------------------------------------|
|
|
157
|
+
| `genetinav search <GENE>`| Launch the TUI and look up `<GENE>` |
|
|
158
|
+
| `genetinav settings` | Open the Settings screen directly |
|
|
159
|
+
|
|
160
|
+
### Flags
|
|
161
|
+
|
|
162
|
+
| Flag | Description |
|
|
163
|
+
|----------------------|-----------------------------------------------------------|
|
|
164
|
+
| `--version` | Print the version string and exit |
|
|
165
|
+
| `--no-animation` | Disable animations / enable performance mode |
|
|
166
|
+
| `--theme <NAME>` | Override the active colour theme for this session |
|
|
167
|
+
| `--species <NAME>` | Override the default species for this session |
|
|
168
|
+
| `--clear-cache` | Clear the local gene/sequence response cache and exit |
|
|
169
|
+
| `--clear-history` | Clear the search history and exit |
|
|
170
|
+
|
|
171
|
+
```bash
|
|
172
|
+
# Quick lookup with a specific theme
|
|
173
|
+
genetinav BRCA1 --theme midnight_genome
|
|
174
|
+
|
|
175
|
+
# Disable animations and set default species to mouse
|
|
176
|
+
genetinav --no-animation --species mouse
|
|
177
|
+
|
|
178
|
+
# Clear cached data
|
|
179
|
+
genetinav --clear-cache
|
|
180
|
+
genetinav --clear-history
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
### In-app navigation
|
|
184
|
+
|
|
185
|
+
From the home screen, type a gene symbol or a slash command:
|
|
186
|
+
|
|
187
|
+
| Command | Action |
|
|
188
|
+
|---------------|----------------------------------|
|
|
189
|
+
| `/settings` | Open Settings |
|
|
190
|
+
| `/help` | Show keybinding reference |
|
|
191
|
+
| `/about` | About GenetiNav (and license) |
|
|
192
|
+
| `/history` | View search history |
|
|
193
|
+
| `/recent` | View search history |
|
|
194
|
+
| `/favorites` | View saved favourites |
|
|
195
|
+
| `/themes` | List available colour themes |
|
|
196
|
+
| `/theme` | Prompt to switch active theme |
|
|
197
|
+
|
|
198
|
+
### Result screen keys
|
|
199
|
+
|
|
200
|
+
| Key | Action |
|
|
201
|
+
|-------|--------------------------------------------|
|
|
202
|
+
| `o` | Open the sequence viewer |
|
|
203
|
+
| `v` | Toggle favourite |
|
|
204
|
+
| `c` | Show / copy genomic coordinates |
|
|
205
|
+
| `n` | Start a new search |
|
|
206
|
+
| `m` | Open the menu (Export, Open in Ensembl) |
|
|
207
|
+
| `q` / `Esc` | Back to home |
|
|
208
|
+
|
|
209
|
+
### Sequence viewer keys
|
|
210
|
+
|
|
211
|
+
| Key | Action |
|
|
212
|
+
|--------------------|-----------------------------------------------------|
|
|
213
|
+
| `←` / `→` | Scroll 1 base pair |
|
|
214
|
+
| `↑` / `↓`, `PgUp` / `PgDn` | Scroll one full window |
|
|
215
|
+
| `Home` / `End` | Jump to sequence start / end |
|
|
216
|
+
| `g` | Go to a coordinate (e.g. `chr9:5057799`) or gene |
|
|
217
|
+
| `/` | Search for a DNA motif |
|
|
218
|
+
| `n` / `N` | Next / previous match |
|
|
219
|
+
| `c` | Toggle reverse-complement display |
|
|
220
|
+
| `Ctrl+G` | Toggle the GC-content track |
|
|
221
|
+
| `<` / `>` | Navigate back / forward in viewer history |
|
|
222
|
+
| `+` / `-` | Zoom window size in / out |
|
|
223
|
+
| `Ctrl+P` | Open the command palette |
|
|
224
|
+
| `q` / `Esc` | Close the viewer |
|
|
225
|
+
|
|
226
|
+
## Export Formats
|
|
227
|
+
|
|
228
|
+
From the result screen menu (`m` → Export):
|
|
229
|
+
|
|
230
|
+
| Format | Filename | Contents |
|
|
231
|
+
|-------------------|-----------------------------------------|---------------------------------------|
|
|
232
|
+
| Markdown | `{SYMBOL}_export.md` | Symbol, species, location, summary |
|
|
233
|
+
| JSON | `{SYMBOL}_export.json` | Full GeneRecord dump |
|
|
234
|
+
| FASTA – Genomic | `{SYMBOL}_genomic_{timestamp}.fasta` | The gene’s chromosomal region |
|
|
235
|
+
| FASTA – Transcript| `{SYMBOL}_transcript_{timestamp}.fasta` | Canonical transcript cDNA |
|
|
236
|
+
| FASTA – CDS | `{SYMBOL}_cds_{timestamp}.fasta` | Canonical CDS (falls back to cDNA) |
|
|
237
|
+
|
|
238
|
+
## Configuration
|
|
239
|
+
|
|
240
|
+
Settings are stored in `~/.genetinav/settings.json` and can be edited through the in-app Settings screen (`/settings`) or directly.
|
|
241
|
+
The local database lives at `~/.genetinav/genetinav.db`.
|
|
242
|
+
|
|
243
|
+
| Setting | Default | Description |
|
|
244
|
+
|-----------------------|-------------------|---------------------------------------------|
|
|
245
|
+
| `theme` | `obsidian_helix` | Active colour theme |
|
|
246
|
+
| `history_enabled` | `true` | Record search history |
|
|
247
|
+
| `cache_enabled` | `true` | Cache Ensembl API responses locally |
|
|
248
|
+
| `default_window_size` | `60` | Sequence viewer window size (bases) |
|
|
249
|
+
| `default_species` | `human` | Default species for lookups |
|
|
250
|
+
| `ruler_interval` | `10` | Spacing between ruler tick labels |
|
|
251
|
+
|
|
252
|
+
## Available Themes
|
|
253
|
+
|
|
254
|
+
Ten dark, biologically-themed palettes, each defining both the UI chrome and the DNA base colours used by the sequence viewer:
|
|
255
|
+
|
|
256
|
+
- obsidian_helix
|
|
257
|
+
- midnight_genome
|
|
258
|
+
- carbon_strand
|
|
259
|
+
- void_polymer
|
|
260
|
+
- deep_cell
|
|
261
|
+
- nucleic_night
|
|
262
|
+
- graphene_dark
|
|
263
|
+
- helix_abyss
|
|
264
|
+
- synthetic_strand
|
|
265
|
+
- black_helix_neon
|
|
266
|
+
|
|
267
|
+
List them at any time with `/themes`, or switch instantly with `/theme`.
|
|
268
|
+
|
|
269
|
+
## Data Source
|
|
270
|
+
|
|
271
|
+
Gene metadata and sequence data are retrieved from the Ensembl REST API (`https://rest.ensembl.org/`) using public, unauthenticated endpoints.
|
|
272
|
+
GenetiNav is not affiliated with Ensembl.
|
|
273
|
+
|
|
274
|
+
## Screenshots
|
|
275
|
+
|
|
276
|
+
*Add screenshots or terminal recordings of GenetiNav below.*
|
|
277
|
+
|
|
278
|
+
| Home Screen | Result Screen | Sequence Viewer |
|
|
279
|
+
|--------------------------|----------------------------|------------------------------|
|
|
280
|
+
| Home screen placeholder | Result screen placeholder | Sequence viewer placeholder |
|
|
281
|
+
|
|
282
|
+
## Technologies
|
|
283
|
+
|
|
284
|
+
| Library | Purpose |
|
|
285
|
+
|-----------|--------------------------------------------------------|
|
|
286
|
+
| Textual | Terminal UI framework (screens, widgets, event loop) |
|
|
287
|
+
| Typer | CLI argument parsing and subcommands |
|
|
288
|
+
| httpx | HTTP client for the Ensembl REST API |
|
|
289
|
+
| SQLite | Local persistence for cache, history, and favourites |
|
|
290
|
+
|
|
291
|
+
## Roadmap
|
|
292
|
+
|
|
293
|
+
Potential future directions, not yet implemented:
|
|
294
|
+
|
|
295
|
+
- [ ] Wire up reserved settings (high contrast, monochrome, animation toggles) to live Settings controls
|
|
296
|
+
- [ ] Persist CLI `--theme` / `--species` overrides back to `settings.json`
|
|
297
|
+
- [ ] Automatic retry/backoff for Ensembl API rate limiting and transient network errors
|
|
298
|
+
- [ ] Configurable export destination directory
|
|
299
|
+
- [ ] Disk-persisted sequence and overlap caches for faster cold starts
|
|
300
|
+
- [ ] Broader species support beyond human, mouse, rat, and zebrafish
|
|
301
|
+
|
|
302
|
+
## License
|
|
303
|
+
|
|
304
|
+
Custom Source-Available License 1.0 – Copyright © 2026 BIOWESS.
|
|
305
|
+
You may view, clone, run, and modify this software for personal or educational use, and share non-commercial educational derivatives with attribution. Commercial use, resale, rebranding, or hosting as a paid service is not permitted without prior written permission. See [LICENSE](https://github.com/biowess/genetinav/blob/main/LICENSE) for the full terms.
|
|
306
|
+
|
|
307
|
+
## Credits & Acknowledgements
|
|
308
|
+
|
|
309
|
+
Gene and sequence data courtesy of the Ensembl project.
|
|
310
|
+
Built with Textual and Typer by Textualize.
|
|
311
|
+
Nucleotide colour convention inspired by IGV and the UCSC Genome Browser.
|
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
A terminal-based genomics toolkit for gene lookup, DNA sequence exploration, and genomic coordinate navigation.
|
|
2
|
+
Built with Textual and Typer, powered by the public Ensembl REST API.
|
|
3
|
+
|
|
4
|
+
Type a gene symbol to retrieve its metadata, then drop into a colour-coded, scrollable sequence viewer with motif search, reverse-complement display, and live gene-boundary detection — all from your terminal.
|
|
5
|
+
|
|
6
|
+
## Features
|
|
7
|
+
|
|
8
|
+
- **Gene lookup** – resolve gene symbols via the Ensembl REST API (human, mouse, rat, zebrafish)
|
|
9
|
+
- **Interactive sequence viewer** – scrollable, colour-coded nucleotide track with coordinate ruler, GC-content sparkline, minimap, and stats footer
|
|
10
|
+
- **Rich navigation** – base-by-base and page-by-page scrolling, jump-to-coordinate or gene, motif search with next/prev match, zoom, and back/forward history
|
|
11
|
+
- **Reverse-complement toggle** – flip the display in place without losing position
|
|
12
|
+
- **Dynamic gene-boundary detection** – the viewer automatically relabels itself as you scroll across gene/intergenic boundaries
|
|
13
|
+
- **Search history** – automatically recorded, capped at 200 entries, browsable and re-openable
|
|
14
|
+
- **Favourites** – bookmark genes for quick future access
|
|
15
|
+
- **Theming** – 10 built-in dark colour themes, each with its own DNA base-colour palette
|
|
16
|
+
- **Local caching** – SQLite-backed response cache plus an in-memory chunked sequence cache with background prefetching
|
|
17
|
+
- **Export** – Markdown, JSON, or FASTA (genomic / transcript / CDS) export of the current gene
|
|
18
|
+
- **Open in Ensembl** – jump straight to the gene’s Ensembl page in your browser
|
|
19
|
+
- **Command palette** – fuzzy-filterable command search, global and viewer-aware
|
|
20
|
+
- **Performance mode** – disable animations for a snappier or headless-friendly session
|
|
21
|
+
- **Configurable** – all preferences stored in `~/.genetinav/settings.json`
|
|
22
|
+
|
|
23
|
+
## Installation
|
|
24
|
+
|
|
25
|
+
GenetiNav requires Python 3.10+.
|
|
26
|
+
|
|
27
|
+
Install from PyPI using pip:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
pip install genetinav
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
If you prefer an isolated, globally available installation, use pipx:
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
pipx install genetinav
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
After installation, the `genetinav` command will be available in your terminal.
|
|
40
|
+
|
|
41
|
+
## Usage
|
|
42
|
+
|
|
43
|
+
Launch the interactive TUI:
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
genetinav
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Opens the home screen with a search bar. Type a gene symbol and press Enter, or use a `/command` to navigate directly.
|
|
50
|
+
|
|
51
|
+
Quick gene lookup:
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
genetinav BRCA1
|
|
55
|
+
genetinav brca2
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Performs an immediate lookup inside the TUI.
|
|
59
|
+
|
|
60
|
+
### Subcommands
|
|
61
|
+
|
|
62
|
+
| Command | Description |
|
|
63
|
+
|--------------------------|------------------------------------------|
|
|
64
|
+
| `genetinav search <GENE>`| Launch the TUI and look up `<GENE>` |
|
|
65
|
+
| `genetinav settings` | Open the Settings screen directly |
|
|
66
|
+
|
|
67
|
+
### Flags
|
|
68
|
+
|
|
69
|
+
| Flag | Description |
|
|
70
|
+
|----------------------|-----------------------------------------------------------|
|
|
71
|
+
| `--version` | Print the version string and exit |
|
|
72
|
+
| `--no-animation` | Disable animations / enable performance mode |
|
|
73
|
+
| `--theme <NAME>` | Override the active colour theme for this session |
|
|
74
|
+
| `--species <NAME>` | Override the default species for this session |
|
|
75
|
+
| `--clear-cache` | Clear the local gene/sequence response cache and exit |
|
|
76
|
+
| `--clear-history` | Clear the search history and exit |
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
# Quick lookup with a specific theme
|
|
80
|
+
genetinav BRCA1 --theme midnight_genome
|
|
81
|
+
|
|
82
|
+
# Disable animations and set default species to mouse
|
|
83
|
+
genetinav --no-animation --species mouse
|
|
84
|
+
|
|
85
|
+
# Clear cached data
|
|
86
|
+
genetinav --clear-cache
|
|
87
|
+
genetinav --clear-history
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### In-app navigation
|
|
91
|
+
|
|
92
|
+
From the home screen, type a gene symbol or a slash command:
|
|
93
|
+
|
|
94
|
+
| Command | Action |
|
|
95
|
+
|---------------|----------------------------------|
|
|
96
|
+
| `/settings` | Open Settings |
|
|
97
|
+
| `/help` | Show keybinding reference |
|
|
98
|
+
| `/about` | About GenetiNav (and license) |
|
|
99
|
+
| `/history` | View search history |
|
|
100
|
+
| `/recent` | View search history |
|
|
101
|
+
| `/favorites` | View saved favourites |
|
|
102
|
+
| `/themes` | List available colour themes |
|
|
103
|
+
| `/theme` | Prompt to switch active theme |
|
|
104
|
+
|
|
105
|
+
### Result screen keys
|
|
106
|
+
|
|
107
|
+
| Key | Action |
|
|
108
|
+
|-------|--------------------------------------------|
|
|
109
|
+
| `o` | Open the sequence viewer |
|
|
110
|
+
| `v` | Toggle favourite |
|
|
111
|
+
| `c` | Show / copy genomic coordinates |
|
|
112
|
+
| `n` | Start a new search |
|
|
113
|
+
| `m` | Open the menu (Export, Open in Ensembl) |
|
|
114
|
+
| `q` / `Esc` | Back to home |
|
|
115
|
+
|
|
116
|
+
### Sequence viewer keys
|
|
117
|
+
|
|
118
|
+
| Key | Action |
|
|
119
|
+
|--------------------|-----------------------------------------------------|
|
|
120
|
+
| `←` / `→` | Scroll 1 base pair |
|
|
121
|
+
| `↑` / `↓`, `PgUp` / `PgDn` | Scroll one full window |
|
|
122
|
+
| `Home` / `End` | Jump to sequence start / end |
|
|
123
|
+
| `g` | Go to a coordinate (e.g. `chr9:5057799`) or gene |
|
|
124
|
+
| `/` | Search for a DNA motif |
|
|
125
|
+
| `n` / `N` | Next / previous match |
|
|
126
|
+
| `c` | Toggle reverse-complement display |
|
|
127
|
+
| `Ctrl+G` | Toggle the GC-content track |
|
|
128
|
+
| `<` / `>` | Navigate back / forward in viewer history |
|
|
129
|
+
| `+` / `-` | Zoom window size in / out |
|
|
130
|
+
| `Ctrl+P` | Open the command palette |
|
|
131
|
+
| `q` / `Esc` | Close the viewer |
|
|
132
|
+
|
|
133
|
+
## Export Formats
|
|
134
|
+
|
|
135
|
+
From the result screen menu (`m` → Export):
|
|
136
|
+
|
|
137
|
+
| Format | Filename | Contents |
|
|
138
|
+
|-------------------|-----------------------------------------|---------------------------------------|
|
|
139
|
+
| Markdown | `{SYMBOL}_export.md` | Symbol, species, location, summary |
|
|
140
|
+
| JSON | `{SYMBOL}_export.json` | Full GeneRecord dump |
|
|
141
|
+
| FASTA – Genomic | `{SYMBOL}_genomic_{timestamp}.fasta` | The gene’s chromosomal region |
|
|
142
|
+
| FASTA – Transcript| `{SYMBOL}_transcript_{timestamp}.fasta` | Canonical transcript cDNA |
|
|
143
|
+
| FASTA – CDS | `{SYMBOL}_cds_{timestamp}.fasta` | Canonical CDS (falls back to cDNA) |
|
|
144
|
+
|
|
145
|
+
## Configuration
|
|
146
|
+
|
|
147
|
+
Settings are stored in `~/.genetinav/settings.json` and can be edited through the in-app Settings screen (`/settings`) or directly.
|
|
148
|
+
The local database lives at `~/.genetinav/genetinav.db`.
|
|
149
|
+
|
|
150
|
+
| Setting | Default | Description |
|
|
151
|
+
|-----------------------|-------------------|---------------------------------------------|
|
|
152
|
+
| `theme` | `obsidian_helix` | Active colour theme |
|
|
153
|
+
| `history_enabled` | `true` | Record search history |
|
|
154
|
+
| `cache_enabled` | `true` | Cache Ensembl API responses locally |
|
|
155
|
+
| `default_window_size` | `60` | Sequence viewer window size (bases) |
|
|
156
|
+
| `default_species` | `human` | Default species for lookups |
|
|
157
|
+
| `ruler_interval` | `10` | Spacing between ruler tick labels |
|
|
158
|
+
|
|
159
|
+
## Available Themes
|
|
160
|
+
|
|
161
|
+
Ten dark, biologically-themed palettes, each defining both the UI chrome and the DNA base colours used by the sequence viewer:
|
|
162
|
+
|
|
163
|
+
- obsidian_helix
|
|
164
|
+
- midnight_genome
|
|
165
|
+
- carbon_strand
|
|
166
|
+
- void_polymer
|
|
167
|
+
- deep_cell
|
|
168
|
+
- nucleic_night
|
|
169
|
+
- graphene_dark
|
|
170
|
+
- helix_abyss
|
|
171
|
+
- synthetic_strand
|
|
172
|
+
- black_helix_neon
|
|
173
|
+
|
|
174
|
+
List them at any time with `/themes`, or switch instantly with `/theme`.
|
|
175
|
+
|
|
176
|
+
## Data Source
|
|
177
|
+
|
|
178
|
+
Gene metadata and sequence data are retrieved from the Ensembl REST API (`https://rest.ensembl.org/`) using public, unauthenticated endpoints.
|
|
179
|
+
GenetiNav is not affiliated with Ensembl.
|
|
180
|
+
|
|
181
|
+
## Screenshots
|
|
182
|
+
|
|
183
|
+
*Add screenshots or terminal recordings of GenetiNav below.*
|
|
184
|
+
|
|
185
|
+
| Home Screen | Result Screen | Sequence Viewer |
|
|
186
|
+
|--------------------------|----------------------------|------------------------------|
|
|
187
|
+
| Home screen placeholder | Result screen placeholder | Sequence viewer placeholder |
|
|
188
|
+
|
|
189
|
+
## Technologies
|
|
190
|
+
|
|
191
|
+
| Library | Purpose |
|
|
192
|
+
|-----------|--------------------------------------------------------|
|
|
193
|
+
| Textual | Terminal UI framework (screens, widgets, event loop) |
|
|
194
|
+
| Typer | CLI argument parsing and subcommands |
|
|
195
|
+
| httpx | HTTP client for the Ensembl REST API |
|
|
196
|
+
| SQLite | Local persistence for cache, history, and favourites |
|
|
197
|
+
|
|
198
|
+
## Roadmap
|
|
199
|
+
|
|
200
|
+
Potential future directions, not yet implemented:
|
|
201
|
+
|
|
202
|
+
- [ ] Wire up reserved settings (high contrast, monochrome, animation toggles) to live Settings controls
|
|
203
|
+
- [ ] Persist CLI `--theme` / `--species` overrides back to `settings.json`
|
|
204
|
+
- [ ] Automatic retry/backoff for Ensembl API rate limiting and transient network errors
|
|
205
|
+
- [ ] Configurable export destination directory
|
|
206
|
+
- [ ] Disk-persisted sequence and overlap caches for faster cold starts
|
|
207
|
+
- [ ] Broader species support beyond human, mouse, rat, and zebrafish
|
|
208
|
+
|
|
209
|
+
## License
|
|
210
|
+
|
|
211
|
+
Custom Source-Available License 1.0 – Copyright © 2026 BIOWESS.
|
|
212
|
+
You may view, clone, run, and modify this software for personal or educational use, and share non-commercial educational derivatives with attribution. Commercial use, resale, rebranding, or hosting as a paid service is not permitted without prior written permission. See [LICENSE](https://github.com/biowess/genetinav/blob/main/LICENSE) for the full terms.
|
|
213
|
+
|
|
214
|
+
## Credits & Acknowledgements
|
|
215
|
+
|
|
216
|
+
Gene and sequence data courtesy of the Ensembl project.
|
|
217
|
+
Built with Textual and Typer by Textualize.
|
|
218
|
+
Nucleotide colour convention inspired by IGV and the UCSC Genome Browser.
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "genetinav"
|
|
3
|
+
version = "0.1.0"
|
|
4
|
+
description = "GenetiNav — navigational genomics toolkit"
|
|
5
|
+
requires-python = ">=3.10"
|
|
6
|
+
license = { file = "LICENSE" }
|
|
7
|
+
readme = "README.md"
|
|
8
|
+
keywords = ["genomics", "bioinformatics", "terminal", "cli", "ensembl"]
|
|
9
|
+
classifiers = [
|
|
10
|
+
"Development Status :: 4 - Beta",
|
|
11
|
+
"Environment :: Console",
|
|
12
|
+
"Intended Audience :: Science/Research",
|
|
13
|
+
"License :: Other/Proprietary License",
|
|
14
|
+
"Natural Language :: English",
|
|
15
|
+
"Operating System :: OS Independent",
|
|
16
|
+
"Programming Language :: Python :: 3",
|
|
17
|
+
"Programming Language :: Python :: 3.10",
|
|
18
|
+
"Programming Language :: Python :: 3.11",
|
|
19
|
+
"Programming Language :: Python :: 3.12",
|
|
20
|
+
"Topic :: Scientific/Engineering :: Bio-Informatics",
|
|
21
|
+
"Topic :: Terminals",
|
|
22
|
+
]
|
|
23
|
+
dependencies = [
|
|
24
|
+
"typer",
|
|
25
|
+
"httpx",
|
|
26
|
+
"textual",
|
|
27
|
+
]
|
|
28
|
+
|
|
29
|
+
[project.urls]
|
|
30
|
+
Homepage = "https://github.com/biowess/genetinav"
|
|
31
|
+
Documentation = "https://github.com/biowess/genetinav#readme"
|
|
32
|
+
Repository = "https://github.com/biowess/genetinav"
|
|
33
|
+
"Bug Tracker" = "https://github.com/biowess/genetinav/issues"
|
|
34
|
+
|
|
35
|
+
[project.scripts]
|
|
36
|
+
genetinav = "genetinav.cli:main"
|
|
37
|
+
|
|
38
|
+
[tool.hatch.build.targets.wheel]
|
|
39
|
+
packages = ["src/genetinav"]
|
|
40
|
+
|
|
41
|
+
[tool.hatch.build.targets.sdist]
|
|
42
|
+
include = [
|
|
43
|
+
"src/",
|
|
44
|
+
"README.md",
|
|
45
|
+
"LICENSE",
|
|
46
|
+
"pyproject.toml",
|
|
47
|
+
]
|
|
48
|
+
|
|
49
|
+
[build-system]
|
|
50
|
+
requires = ["hatchling"]
|
|
51
|
+
build-backend = "hatchling.build"
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.1.0"
|