abyss-db-cli 0.1.0__py3-none-any.whl
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.
- abyss_cli.py +1518 -0
- abyss_db_cli-0.1.0.data/data/share/abyss/data/DATA_VERSION +1 -0
- abyss_db_cli-0.1.0.data/data/share/abyss/data/capsule/kaptive_all.tsv.gz +0 -0
- abyss_db_cli-0.1.0.data/data/share/abyss/data/gene_annotations/amr_all.tsv.gz +0 -0
- abyss_db_cli-0.1.0.data/data/share/abyss/data/gene_annotations/plasmid_all.tsv.gz +0 -0
- abyss_db_cli-0.1.0.data/data/share/abyss/data/gene_annotations/vfdb_all.tsv.gz +0 -0
- abyss_db_cli-0.1.0.data/data/share/abyss/data/master/abyss_all.tsv.gz +0 -0
- abyss_db_cli-0.1.0.data/data/share/abyss/data/master/abyss_manifest.json +13 -0
- abyss_db_cli-0.1.0.data/data/share/abyss/data/mlst/mlst_all.tsv.gz +0 -0
- abyss_db_cli-0.1.0.dist-info/METADATA +493 -0
- abyss_db_cli-0.1.0.dist-info/RECORD +15 -0
- abyss_db_cli-0.1.0.dist-info/WHEEL +5 -0
- abyss_db_cli-0.1.0.dist-info/entry_points.txt +2 -0
- abyss_db_cli-0.1.0.dist-info/licenses/LICENSE +21 -0
- abyss_db_cli-0.1.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
1.0.0
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"dataset": "abyss",
|
|
3
|
+
"schema": "v2",
|
|
4
|
+
"generated": "2026-11-25 15:41:39",
|
|
5
|
+
"rows": 59166,
|
|
6
|
+
"columns": 44,
|
|
7
|
+
"sha256": "48f1cabc1332a4ee44010aa672c6a9311d7e4fece032845e1ba6e5d9358cce5c",
|
|
8
|
+
"source_files": {
|
|
9
|
+
"/home/ds-zoofood/abyss-cli/data/mlst/mlst_all.tsv": "d6a7afa13996488096c666a8b2b12849c26954c2d251bb5ac28268a85d4c157a",
|
|
10
|
+
"/home/ds-zoofood/abyss-cli/data/capsule/kaptive_all.tsv": "a1ce14e41b92d75022aedbc78ed7b9494adf8c54d48a37ffbdc02ff2e221ea8a",
|
|
11
|
+
"/home/ds-zoofood/abyss-cli/data/metadata/abyss_metadata.tsv": "f884fd28fc36dd4c5418ddf42ce5b04d6765dac621bf494317fa5dc377054ae7"
|
|
12
|
+
}
|
|
13
|
+
}
|
|
Binary file
|
|
@@ -0,0 +1,493 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: abyss-db-cli
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Command-line interface for querying the ABYSS Acinetobacter baumannii genomic surveillance database
|
|
5
|
+
Author-email: Brown Beckley <brownbeckley94@gmail.com>
|
|
6
|
+
Maintainer-email: Brown Beckley <brownbeckley94@gmail.com>
|
|
7
|
+
License-Expression: MIT
|
|
8
|
+
Project-URL: Homepage, https://abyss-db.org/
|
|
9
|
+
Project-URL: Documentation, https://github.com/bbeckley-hub/abyss-db-cli
|
|
10
|
+
Project-URL: Repository, https://github.com/bbeckley-hub/abyss-db-cli
|
|
11
|
+
Project-URL: Bug Tracker, https://github.com/bbeckley-hub/abyss-db-cli/issues
|
|
12
|
+
Project-URL: Changelog, https://github.com/bbeckley-hub/abyss-db-cli/blob/main/CHANGELOG.md
|
|
13
|
+
Keywords: bioinformatics,genomics,acinetobacter-baumannii,carbapenem-resistance,crab,amr,antimicrobial-resistance,surveillance,genomic-epidemiology,mlst,kaptive,oxa,argus,eskape,cli,reproducible-research
|
|
14
|
+
Classifier: Development Status :: 4 - Beta
|
|
15
|
+
Classifier: Environment :: Console
|
|
16
|
+
Classifier: Intended Audience :: Science/Research
|
|
17
|
+
Classifier: Intended Audience :: Healthcare Industry
|
|
18
|
+
Classifier: Natural Language :: English
|
|
19
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
20
|
+
Classifier: Operating System :: MacOS
|
|
21
|
+
Classifier: Programming Language :: Python :: 3
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
23
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
24
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
25
|
+
Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
|
|
26
|
+
Classifier: Topic :: Scientific/Engineering :: Medical Science Apps.
|
|
27
|
+
Requires-Python: >=3.9
|
|
28
|
+
Description-Content-Type: text/markdown
|
|
29
|
+
License-File: LICENSE
|
|
30
|
+
Requires-Dist: pandas>=1.5.0
|
|
31
|
+
Provides-Extra: dev
|
|
32
|
+
Requires-Dist: build>=1.0; extra == "dev"
|
|
33
|
+
Requires-Dist: twine>=5.0; extra == "dev"
|
|
34
|
+
Requires-Dist: pytest>=7.0; extra == "dev"
|
|
35
|
+
Dynamic: license-file
|
|
36
|
+
|
|
37
|
+
# ABYSS-CLI
|
|
38
|
+
|
|
39
|
+
**Command-line access to the ABYSS *Acinetobacter baumannii* genomic surveillance database.**
|
|
40
|
+
|
|
41
|
+
[](https://pypi.org/project/abyss-db-cli/)
|
|
42
|
+
[](https://hub.docker.com/r/bbeckleyhub/abyss-db-cli)
|
|
43
|
+
[](https://github.com/bbeckley-hub/argus-data/releases/tag/abyss-data-v1.0.0)
|
|
44
|
+
[](https://opensource.org/licenses/MIT)
|
|
45
|
+
|
|
46
|
+
ABYSS-CLI queries a master table of **59,166** *Acinetobacter baumannii* genomes with **44 fields** per genome: Pasteur and Oxford MLST, international clones (IC1 to IC9), Kaptive K and OC loci, intrinsic OXA variants, acquired carbapenemases, AMR, virulence and plasmid genes, CheckM quality, and geographic and clinical metadata, directly from your terminal. It exports accession lists, BioSample and BioProject identifiers for direct integration with NCBI `datasets`.
|
|
47
|
+
|
|
48
|
+
The dataset ships bundled inside every distribution (data release v1.0.0; 9 files, 23.2 MB extracted, 20 MB wheel, gz-compressed). After installation, queries run locally with no downloads, no API keys, and no network access.
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## Two ways to access ABYSS
|
|
53
|
+
|
|
54
|
+
| Resource | Package | When to use |
|
|
55
|
+
|---|---|---|
|
|
56
|
+
| [abyss-db.org](https://abyss-db.org/) | Web interface | Interactive exploration, one-off queries, verifying a genotype |
|
|
57
|
+
| **ABYSS-CLI** (this package) | `pip install abyss-db-cli` | Repeated queries, scripted pipelines, offline work, pinned data versions |
|
|
58
|
+
|
|
59
|
+
Both read the same data and return the same numbers. Pick the tool that matches your workflow.
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
## What's in v0.1.0
|
|
64
|
+
|
|
65
|
+
- **The full ABYSS dataset bundled** - 59,166 genomes, 44 columns, gz-compressed, shipped in the wheel and the Docker image; queries run offline
|
|
66
|
+
- **Boolean query layer** - comma = OR within one flag, AND across flags, and a `--not-*` exclusion twin for every filter field
|
|
67
|
+
- **Combined typing flags** - `--combo` (ST-KL:OCL), `--ksk` (ST-KL) and `--kso` (ST-OCL) with 3,404 unique combined types in data v1.0.0
|
|
68
|
+
- **`abyss init`** - installs or refreshes the data bundle from the [argus-data](https://github.com/bbeckley-hub/argus-data) releases, SHA256-verified, with offline `-f/--from-file` installs
|
|
69
|
+
- **65-check self-test suite** - every golden count recomputed from the local data (tests/abyss_selftest.sh)
|
|
70
|
+
- **Docker build gate** - the image build asserts the bundled-data smoke count (`--ic IC2` = 33,164), so a wheel carrying stale data fails the build
|
|
71
|
+
|
|
72
|
+
Full changelog: [CHANGELOG.md](CHANGELOG.md)
|
|
73
|
+
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
## Installation
|
|
77
|
+
|
|
78
|
+
Choose whichever fits your workflow. All methods deliver the same CLI and the same bundled data.
|
|
79
|
+
|
|
80
|
+
### pip
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
pip install abyss-db-cli
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
### uv (fastest)
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
uv tool install abyss-db-cli
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
### pipx (isolated environment)
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
pipx install abyss-db-cli
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
### Docker
|
|
99
|
+
|
|
100
|
+
```bash
|
|
101
|
+
docker pull bbeckleyhub/abyss-db-cli:latest
|
|
102
|
+
docker run --rm bbeckleyhub/abyss-db-cli:latest --version
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
Verify the installation:
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
abyss --version
|
|
109
|
+
# ABYSS-CLI v0.1.0 - University of Ghana Medical School, Accra, Ghana
|
|
110
|
+
# Data version: 1.0.0 (/home/user/.abyss/data)
|
|
111
|
+
|
|
112
|
+
abyss --ic IC2 --count
|
|
113
|
+
# Expected: 33,164
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
---
|
|
117
|
+
|
|
118
|
+
## Quick Start
|
|
119
|
+
|
|
120
|
+
The most common workflow is **filter, export, download**:
|
|
121
|
+
|
|
122
|
+
```bash
|
|
123
|
+
# 1. Filter
|
|
124
|
+
abyss --crab --continent Europe --source blood --count
|
|
125
|
+
|
|
126
|
+
# 2. Export accessions
|
|
127
|
+
abyss --crab --continent Europe --source blood -o crab_europe_blood.txt
|
|
128
|
+
|
|
129
|
+
# 3. Download assemblies from NCBI
|
|
130
|
+
datasets download genome accession --inputfile crab_europe_blood.txt --filename crab_europe_blood.zip
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
BioSample and BioProject lists for the same selection come out with one flag:
|
|
134
|
+
|
|
135
|
+
```bash
|
|
136
|
+
abyss --crab --continent Europe --format biosample,bioproject -o crab_europe
|
|
137
|
+
# writes crab_europe_biosamples.txt and crab_europe_bioprojects.txt
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
---
|
|
141
|
+
EOF
|
|
142
|
+
awk 'END{print NR}' ~/abyss-db-cli/README.md # expect 104
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
Chunk 2, append (gate must read 211):
|
|
146
|
+
|
|
147
|
+
```bash
|
|
148
|
+
cat >> ~/abyss-db-cli/README.md <<'EOF'
|
|
149
|
+
## Core Usage
|
|
150
|
+
|
|
151
|
+
### Typing flags
|
|
152
|
+
|
|
153
|
+
| Flag | Description | Example |
|
|
154
|
+
|---|---|---|
|
|
155
|
+
| `--st` | MLST Pasteur sequence type | `--st 2` or `--st ST2` |
|
|
156
|
+
| `--oxford-st` | MLST Oxford sequence type | `--oxford-st 208` |
|
|
157
|
+
| `--ic` | International clone (IC1 to IC9) | `--ic IC2` |
|
|
158
|
+
| `--kl` | Kaptive K locus (capsule) | `--kl KL2` |
|
|
159
|
+
| `--ocl` | OC locus | `--ocl OCL1` |
|
|
160
|
+
| `--oxa` | Intrinsic OXA variant | `--oxa OXA-66`; acquired carbapenemases go through `--amr` |
|
|
161
|
+
| `--lineage` | Predefined lineage shortcut | `--lineage GC2` |
|
|
162
|
+
|
|
163
|
+
### Combined typing (ST-KL:OCL)
|
|
164
|
+
|
|
165
|
+
The master table carries three precomputed combined typing strings (3,404 unique ST-KL:OCL values in data v1.0.0):
|
|
166
|
+
|
|
167
|
+
| Flag | String | Example |
|
|
168
|
+
|---|---|---|
|
|
169
|
+
| `--combo` | ST-KL:OCL | `--combo ST2-KL2:OCL1` |
|
|
170
|
+
| `--ksk` | ST-KL | `--ksk ST1013-KL171` |
|
|
171
|
+
| `--kso` | ST-OCL | `--kso ST1013-OCL4` |
|
|
172
|
+
|
|
173
|
+
All three accept comma-separated OR lists and lowercase input (`--combo st2-kl2:ocl1` resolves to `ST2-KL2:OCL1`). Browse valid values with `abyss --list combo` (also `ksk`, `kso`).
|
|
174
|
+
|
|
175
|
+
### Epidemiological metadata
|
|
176
|
+
|
|
177
|
+
| Flag | Description | Example |
|
|
178
|
+
|---|---|---|
|
|
179
|
+
| `--country` | Country of origin | `--country Brazil` |
|
|
180
|
+
| `--continent` | Continent | `--continent Europe` |
|
|
181
|
+
| `--region` | Region or sub-country location | `--region "Sao Paulo"` |
|
|
182
|
+
| `--source` | Isolation source | `--source blood` |
|
|
183
|
+
| `--host` | Host species | `--host "Homo sapiens"` |
|
|
184
|
+
| `--year` | Collection year or range | `--year 2019` or `--year 2015-2023` |
|
|
185
|
+
| `--super-group` | Super-group label | `--super-group ICU` |
|
|
186
|
+
|
|
187
|
+
### Gene content
|
|
188
|
+
|
|
189
|
+
| Flag | Description | Example |
|
|
190
|
+
|---|---|---|
|
|
191
|
+
| `--amr` | AMR gene(s), comma-separated | `--amr blaOXA-23` |
|
|
192
|
+
| `--vfdb` | Virulence gene(s), comma-separated | `--vfdb <gene>` |
|
|
193
|
+
| `--plasmid` | Plasmid replicon(s), comma-separated | `--plasmid IncP1` |
|
|
194
|
+
| `--any` | Match ANY of the given genes (default is ALL) | `--amr blaOXA-23,blaOXA-24 --any` |
|
|
195
|
+
| `--crab` | Carbapenem resistant: carries any acquired carbapenemase (OXA-23, OXA-24/40, OXA-58, NDM, KPC) | `--crab` |
|
|
196
|
+
|
|
197
|
+
Gene names are matched against the static gene-annotation tables shipped with the data release (AMR, VFDB, PlasmidFinder).
|
|
198
|
+
|
|
199
|
+
### Quality filters
|
|
200
|
+
|
|
201
|
+
| Flag | Description |
|
|
202
|
+
|---|---|
|
|
203
|
+
| `--complete-only` | Only complete genomes |
|
|
204
|
+
| `--min-completeness N` | Minimum CheckM completeness (genomes without CheckM are excluded) |
|
|
205
|
+
| `--max-contamination N` | Maximum CheckM contamination (genomes without CheckM are excluded) |
|
|
206
|
+
| `--has-kl` | Only genomes with a Kaptive KL result |
|
|
207
|
+
| `--has-oxa` | Only genomes with an OXA variant called |
|
|
208
|
+
|
|
209
|
+
### Boolean logic
|
|
210
|
+
|
|
211
|
+
Filters combine with **AND**. A comma inside one flag means **OR**:
|
|
212
|
+
|
|
213
|
+
```bash
|
|
214
|
+
abyss --ic IC1,IC2 --count # 34,709 (IC1 1,545 + IC2 33,164)
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
Every filter has a `--not-` twin that drops genomes matching ANY listed value:
|
|
218
|
+
|
|
219
|
+
```bash
|
|
220
|
+
abyss --ic IC2 --not-amr blaNDM --count
|
|
221
|
+
abyss --crab --not-continent Europe --count
|
|
222
|
+
abyss --not-combo ST1013-KL171:OCL4 --count # 59,165 (all but the single matching genome)
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
The identities hold by construction and the suite recomputes them on your machine: `X + not-X = total`, and `--crab --not-crab` is always 0.
|
|
226
|
+
|
|
227
|
+
### Output formats
|
|
228
|
+
|
|
229
|
+
| Format | Extension | Feeds into |
|
|
230
|
+
|---|---|---|
|
|
231
|
+
| `accession` | `.txt` | NCBI `datasets download genome accession` |
|
|
232
|
+
| `biosample` | `_biosamples.txt` | Metadata lookups, `fastq-dl --group-by-sample` |
|
|
233
|
+
| `bioproject` | `_bioprojects.txt` | Study-level bulk downloads |
|
|
234
|
+
| `tsv` | `.tsv` | Excel, R, pandas |
|
|
235
|
+
| `csv` | `.csv` | Collaborators, spreadsheets |
|
|
236
|
+
| `json` | `.json` | Web apps, `jq`, archival |
|
|
237
|
+
|
|
238
|
+
Request multiple formats in one command:
|
|
239
|
+
|
|
240
|
+
```bash
|
|
241
|
+
abyss --ic IC2 --format tsv,accession,biosample -o ic2
|
|
242
|
+
# writes ic2.tsv, ic2.txt, ic2_biosamples.txt
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
### Output options
|
|
246
|
+
|
|
247
|
+
| Flag | Description | Default |
|
|
248
|
+
|---|---|---|
|
|
249
|
+
| `--count` | Print only the number of matching genomes | Off |
|
|
250
|
+
| `--format` | Output format(s), comma-separated | `accession` |
|
|
251
|
+
| `--output`, `-o` | Output base path (extension added per format) | `stdout` |
|
|
252
|
+
| `--quiet`, `-q` | Suppress banner and footer (useful for scripts) | Off |
|
|
253
|
+
| `--debug` | Show row counts after each filter | Off |
|
|
254
|
+
|
|
255
|
+
---
|
|
256
|
+
EOF
|
|
257
|
+
awk 'END{print NR}' ~/abyss-db-cli/README.md # expect 211
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
Chunk 3, append (gate 305):
|
|
261
|
+
|
|
262
|
+
```bash
|
|
263
|
+
cat >> ~/abyss-db-cli/README.md <<'EOF'
|
|
264
|
+
## Updating the data
|
|
265
|
+
|
|
266
|
+
The CLI and the data are versioned independently. The wheel bundles a snapshot at build time; `abyss init` upgrades the data without touching the code. Data releases are published in the dedicated [argus-data](https://github.com/bbeckley-hub/argus-data) repository under the tag prefix `abyss-data-` (currently `abyss-data-v1.0.0`), each carrying the bundle zip and a SHA256 checksum sidecar.
|
|
267
|
+
|
|
268
|
+
```bash
|
|
269
|
+
# Install the latest data release
|
|
270
|
+
abyss init
|
|
271
|
+
|
|
272
|
+
# Pin a specific data version for reproducibility
|
|
273
|
+
abyss init -v 1.0.0
|
|
274
|
+
|
|
275
|
+
# Install from a local zip (offline, air-gapped HPC) - requires the .sha256 sidecar
|
|
276
|
+
abyss init -f abyss_data.zip
|
|
277
|
+
|
|
278
|
+
# Explicitly install unverified (not recommended); a checksum mismatch is always fatal
|
|
279
|
+
abyss init -f abyss_data.zip --allow-unverified
|
|
280
|
+
|
|
281
|
+
# Install to a custom location / force overwrite
|
|
282
|
+
abyss init -o /shared/abyss_data
|
|
283
|
+
abyss init --force
|
|
284
|
+
```
|
|
285
|
+
|
|
286
|
+
`abyss init` verifies the SHA256 checksum of every download and writes a `DATA_VERSION` file; `abyss --version` reports the active data release.
|
|
287
|
+
|
|
288
|
+
### Where the data lives
|
|
289
|
+
|
|
290
|
+
The CLI searches the following locations in priority order (highest wins):
|
|
291
|
+
|
|
292
|
+
| Priority | Location | Use case |
|
|
293
|
+
|---|---|---|
|
|
294
|
+
| 1 | `--data-dir <path>` | Per-command override |
|
|
295
|
+
| 2 | `$ABYSS_DATA_DIR` | Docker volumes, HPC scratch, shared cluster installs |
|
|
296
|
+
| 3 | `~/.abyss/data` | Default user install (created by `abyss init`) |
|
|
297
|
+
| 4 | `~/.local/share/abyss` | Alternative user install |
|
|
298
|
+
| 5 | `./data` | Development checkouts |
|
|
299
|
+
| 6 | `sys.prefix/share/abyss/data` | Bundled inside pip/Docker |
|
|
300
|
+
|
|
301
|
+
### Reproducible queries with config files
|
|
302
|
+
|
|
303
|
+
For recurring surveillance tasks, save your query as a JSON file:
|
|
304
|
+
|
|
305
|
+
```json
|
|
306
|
+
{
|
|
307
|
+
"ic": "IC2",
|
|
308
|
+
"continent": "Europe",
|
|
309
|
+
"format": "tsv,accession",
|
|
310
|
+
"output": "ic2_europe"
|
|
311
|
+
}
|
|
312
|
+
```
|
|
313
|
+
|
|
314
|
+
Run it with `abyss --config query.json`. Any command-line flag overrides the corresponding config value, so you can reuse a config with a one-off change (`abyss --config query.json --source blood`). Unknown config keys are fatal rather than silently ignored.
|
|
315
|
+
|
|
316
|
+
---
|
|
317
|
+
|
|
318
|
+
## Examples Gallery
|
|
319
|
+
|
|
320
|
+
All counts are for data release v1.0.0.
|
|
321
|
+
|
|
322
|
+
### Global Clone 2
|
|
323
|
+
|
|
324
|
+
```bash
|
|
325
|
+
abyss --ic IC2 --count # 33,164
|
|
326
|
+
abyss --lineage GC2 --source blood -o gc2_blood.txt
|
|
327
|
+
```
|
|
328
|
+
|
|
329
|
+
### Carbapenem resistance
|
|
330
|
+
|
|
331
|
+
```bash
|
|
332
|
+
abyss --crab --count # 29,145
|
|
333
|
+
abyss --crab --continent Europe --count # 1,744
|
|
334
|
+
abyss --amr blaOXA-23 --continent Asia --count # 8,329
|
|
335
|
+
```
|
|
336
|
+
|
|
337
|
+
### Capsule, MLST and quality
|
|
338
|
+
|
|
339
|
+
```bash
|
|
340
|
+
abyss --kl KL2 --count # 7,119
|
|
341
|
+
abyss --oxford-st 208 --count # 261
|
|
342
|
+
abyss --complete-only --count # 1,877 complete genomes
|
|
343
|
+
```
|
|
344
|
+
|
|
345
|
+
### Combined typing
|
|
346
|
+
|
|
347
|
+
```bash
|
|
348
|
+
abyss --combo ST2-KL2:OCL1 --count # 5,883 (most common combo)
|
|
349
|
+
abyss --combo ST499-KL18:OCL3 --count # 2,046
|
|
350
|
+
abyss --combo ST1013-KL171:OCL4 --count # 1
|
|
351
|
+
abyss --kso ST1013-OCL4 --count # 22
|
|
352
|
+
```
|
|
353
|
+
|
|
354
|
+
### Debugging a query that returns zero
|
|
355
|
+
|
|
356
|
+
```bash
|
|
357
|
+
abyss --st 2 --kl KL49 --debug --count
|
|
358
|
+
```
|
|
359
|
+
|
|
360
|
+
The `--debug` output prints the row count after each filter, so you can see exactly where a query collapsed. Run `abyss --examples` for the full gallery inside your terminal.
|
|
361
|
+
|
|
362
|
+
---
|
|
363
|
+
EOF
|
|
364
|
+
awk 'END{print NR}' ~/abyss-db-cli/README.md # expect 305
|
|
365
|
+
```
|
|
366
|
+
|
|
367
|
+
Chunk 4, append (gate 427):
|
|
368
|
+
|
|
369
|
+
```bash
|
|
370
|
+
cat >> ~/abyss-db-cli/README.md <<'EOF'
|
|
371
|
+
## Docker Usage
|
|
372
|
+
|
|
373
|
+
The Docker image bundles the full dataset and a data-aware entrypoint.
|
|
374
|
+
|
|
375
|
+
```bash
|
|
376
|
+
# Count genomes (zero setup, uses bundled data)
|
|
377
|
+
docker run --rm bbeckleyhub/abyss-db-cli:0.1.0 --ic IC2 --count
|
|
378
|
+
# 33,164
|
|
379
|
+
|
|
380
|
+
# Export to the host directory
|
|
381
|
+
docker run --rm -v "$PWD:/work" bbeckleyhub/abyss-db-cli:0.1.0 \
|
|
382
|
+
--crab --continent Europe -o crab_europe
|
|
383
|
+
```
|
|
384
|
+
|
|
385
|
+
### Persistent data with a volume
|
|
386
|
+
|
|
387
|
+
Use a volume to persist `abyss init` updates across container restarts:
|
|
388
|
+
|
|
389
|
+
```bash
|
|
390
|
+
# First run: the entrypoint seeds /data from the bundled dataset
|
|
391
|
+
docker run --rm -v abyss_data:/data bbeckleyhub/abyss-db-cli:0.1.0 --ic IC2 --count
|
|
392
|
+
|
|
393
|
+
# Update the data in the same volume
|
|
394
|
+
docker run --rm -v abyss_data:/data bbeckleyhub/abyss-db-cli:0.1.0 init --force
|
|
395
|
+
|
|
396
|
+
# Subsequent runs use the updated data
|
|
397
|
+
docker run --rm -v abyss_data:/data bbeckleyhub/abyss-db-cli:0.1.0 --version
|
|
398
|
+
```
|
|
399
|
+
|
|
400
|
+
The entrypoint automatically sets `ABYSS_DATA_DIR=/data` when a volume is mounted, so all queries and updates use the persistent location. Full Docker Hub README: https://hub.docker.com/r/bbeckleyhub/abyss-db-cli
|
|
401
|
+
|
|
402
|
+
---
|
|
403
|
+
|
|
404
|
+
## HPC Deployment
|
|
405
|
+
|
|
406
|
+
For clusters where users share a data directory, install once and export the path:
|
|
407
|
+
|
|
408
|
+
```bash
|
|
409
|
+
# Admin: install to shared scratch (once)
|
|
410
|
+
mkdir -p /scratch/abyss
|
|
411
|
+
ABYSS_DATA_DIR=/scratch/abyss abyss init
|
|
412
|
+
chmod -R a+r /scratch/abyss
|
|
413
|
+
|
|
414
|
+
# Users: point at the shared copy
|
|
415
|
+
export ABYSS_DATA_DIR=/scratch/abyss
|
|
416
|
+
abyss --crab --count
|
|
417
|
+
```
|
|
418
|
+
|
|
419
|
+
---
|
|
420
|
+
|
|
421
|
+
## Data Requirements (Development)
|
|
422
|
+
|
|
423
|
+
If you clone the repository and install in editable mode (`pip install -e .`), the CLI reads from `./data/`. The distributed package bundles the data under `share/abyss/data/`. The versioned data bundle itself is published in the [argus-data](https://github.com/bbeckley-hub/argus-data) repository, not in this code repository.
|
|
424
|
+
|
|
425
|
+
```
|
|
426
|
+
data/
|
|
427
|
+
├── DATA_VERSION # Release tag (e.g., 1.0.0)
|
|
428
|
+
├── master/
|
|
429
|
+
│ ├── abyss_all.tsv.gz # Master TSV (all typing + metadata)
|
|
430
|
+
│ └── abyss_manifest.json # Build manifest (rows, columns, checksums)
|
|
431
|
+
├── metadata/
|
|
432
|
+
│ └── abyss_metadata.tsv.gz
|
|
433
|
+
├── gene_annotations/
|
|
434
|
+
│ ├── amr_all.tsv.gz
|
|
435
|
+
│ ├── vfdb_all.tsv.gz
|
|
436
|
+
│ └── plasmid_all.tsv.gz
|
|
437
|
+
├── capsule/
|
|
438
|
+
│ └── kaptive_all.tsv.gz
|
|
439
|
+
└── mlst/
|
|
440
|
+
└── mlst_all.tsv.gz
|
|
441
|
+
```
|
|
442
|
+
|
|
443
|
+
To rebuild the master TSV from the module tables: `python scripts/build_master_tsv.py`
|
|
444
|
+
|
|
445
|
+
## Testing
|
|
446
|
+
|
|
447
|
+
```bash
|
|
448
|
+
bash tests/abyss_selftest.sh # 65 checks, recomputes every golden count
|
|
449
|
+
```
|
|
450
|
+
|
|
451
|
+
The suite pins golden counts to the shipped data release and covers data integrity, regression goldens, Boolean identities, init, export formats, and error paths.
|
|
452
|
+
|
|
453
|
+
## Built-in Commands
|
|
454
|
+
|
|
455
|
+
| Command | Purpose |
|
|
456
|
+
|---|---|
|
|
457
|
+
| `abyss --examples` | Full gallery of example queries |
|
|
458
|
+
| `abyss --about` | Author, affiliation, citations, and links |
|
|
459
|
+
| `abyss --version` | CLI version and data version |
|
|
460
|
+
| `abyss --help` | Full flag reference |
|
|
461
|
+
| `abyss --list FIELD` | List unique values for any filter field |
|
|
462
|
+
| `abyss init` | Install or refresh the data bundle |
|
|
463
|
+
|
|
464
|
+
## Citation
|
|
465
|
+
|
|
466
|
+
If you use ABYSS-CLI or the ABYSS dataset in your research, please cite:
|
|
467
|
+
|
|
468
|
+
- The ABYSS typing pipeline (AcinetoScope): doi.org/10.1038/s41598-026-70189-y
|
|
469
|
+
- The source gene-annotation dataset (Shelenkov et al., *Data*): doi.org/10.3390/data9020022
|
|
470
|
+
|
|
471
|
+
The data release is published on GitHub: [abyss-data-v1.0.0](https://github.com/bbeckley-hub/argus-data/releases/tag/abyss-data-v1.0.0), SHA256 `84247fa8e729618a7ad7442ac70cbc7c8c89e6b4779f7b0221094ad6ad990e35`.
|
|
472
|
+
|
|
473
|
+
## Part of ARGUS
|
|
474
|
+
|
|
475
|
+
ABYSS-CLI is part of the ARGUS initiative, a family of open genomic surveillance tools covering the WHO priority ESKAPE pathogens.
|
|
476
|
+
|
|
477
|
+
- ARGUS umbrella: https://argus-db.org/
|
|
478
|
+
- ABYSS web resource: https://abyss-db.org/
|
|
479
|
+
- Data releases: https://github.com/bbeckley-hub/argus-data (tag prefix `abyss-data-`)
|
|
480
|
+
- Sibling CLI for *S. aureus*: https://github.com/bbeckley-hub/saurus-cli
|
|
481
|
+
|
|
482
|
+
## Contributing
|
|
483
|
+
|
|
484
|
+
Bug reports and feature requests: https://github.com/bbeckley-hub/abyss-db-cli/issues
|
|
485
|
+
|
|
486
|
+
## License
|
|
487
|
+
|
|
488
|
+
MIT License. See [LICENSE](LICENSE) for details.
|
|
489
|
+
|
|
490
|
+
---
|
|
491
|
+
|
|
492
|
+
**Author**: Brown Beckley, University of Ghana Medical School, Accra, Ghana. ORCID [0009-0005-5414-1305](https://orcid.org/0009-0005-5414-1305). Independent, not funded.
|
|
493
|
+
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
abyss_cli.py,sha256=UjZkk02hY0bVw1C88daSv-XoIIAwP7D3ZMM4_tG5lWA,60729
|
|
2
|
+
abyss_db_cli-0.1.0.data/data/share/abyss/data/DATA_VERSION,sha256=WYVJhIUxBN9cNT4vaBoV_HkkdC-aLkaMKa8kjc5FzgM,6
|
|
3
|
+
abyss_db_cli-0.1.0.data/data/share/abyss/data/capsule/kaptive_all.tsv.gz,sha256=NJCJu-tJ9RkbiUR9urUskInZ9K8LRF2DI4JAPD13yCU,319107
|
|
4
|
+
abyss_db_cli-0.1.0.data/data/share/abyss/data/gene_annotations/amr_all.tsv.gz,sha256=qT40aplW6TAMBo1-HvimplyDbPMSwdnk4ZDW-XeZ_Qo,1637140
|
|
5
|
+
abyss_db_cli-0.1.0.data/data/share/abyss/data/gene_annotations/plasmid_all.tsv.gz,sha256=N2Jxw9GP2JHkLJVEMEs2TIIlQHwQEjDonMnpYbBB1yQ,7574
|
|
6
|
+
abyss_db_cli-0.1.0.data/data/share/abyss/data/gene_annotations/vfdb_all.tsv.gz,sha256=WO1dozH8NrYHTUIVvddTv72KNUzZrg3ebf_q4ycKvf0,18121692
|
|
7
|
+
abyss_db_cli-0.1.0.data/data/share/abyss/data/master/abyss_all.tsv.gz,sha256=KBfdp6pICoEY_F79Q9jyDdxlKetwWa15FoZ0eHwtq1g,2254568
|
|
8
|
+
abyss_db_cli-0.1.0.data/data/share/abyss/data/master/abyss_manifest.json,sha256=icooWrRtfLFddcR1_atZhYeb-NWly5anrRh7wXfxoI0,610
|
|
9
|
+
abyss_db_cli-0.1.0.data/data/share/abyss/data/mlst/mlst_all.tsv.gz,sha256=wbX1psVUdd_QsFC08XqrhcPNECMxEhfACN8bOhpYAwM,373763
|
|
10
|
+
abyss_db_cli-0.1.0.dist-info/licenses/LICENSE,sha256=L-eJZ2eg2RHA4yFQImaSxLSPypoxlF8y7urMyCmBT_I,1070
|
|
11
|
+
abyss_db_cli-0.1.0.dist-info/METADATA,sha256=zb40Q4rcBJp897G28tqUUFzVqVzOWYZHLV5B6qTaN8M,17823
|
|
12
|
+
abyss_db_cli-0.1.0.dist-info/WHEEL,sha256=mOdXR9C3wMVov7cSY8PY-XCzo3SmmWCHvGQr5csJoao,91
|
|
13
|
+
abyss_db_cli-0.1.0.dist-info/entry_points.txt,sha256=W-ZNTSoPViFFuvS7mOu3NH5bV7AiAgv5zZ0CUmiMIIY,41
|
|
14
|
+
abyss_db_cli-0.1.0.dist-info/top_level.txt,sha256=tQHqlHqS9qzWFttE6r1vOCM3gtx1F1OLF_MJfgBFnFs,10
|
|
15
|
+
abyss_db_cli-0.1.0.dist-info/RECORD,,
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Brown Beckley
|
|
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 @@
|
|
|
1
|
+
abyss_cli
|