Skill Tracer
Skills › Scientific Agent Skills › geniml

geniml

skill · 354 lines · MIT · skills/geniml/SKILL.md

The facts

Its description

Supports audited local Geniml genomic-interval workflows: validate BED and universe contracts, plan Region2Vec or scEmbed runs, inspect model/tokenizer compatibility, and assess consensus universes.

The description the agent reads to decide when to use it.

From its settingsline 3

Tools it may use, or may not

allowed-tools: Read Write Edit Bash Glob

Tools it may use while it runs without asking you first.

From its settingsline 6

Starts other agents

1 line mentions starting other agents

Lines in the file that mention starting another agent. Found by matching words, so treat them as pointers.

Found by matching wordsline 24

Runs scripts

python skills/geniml/scripts/bed_validator.py, python skills/geniml/scripts/model_artifact_inspector.py, python skills/geniml/scripts/tokenizer_compatibility.py, python skills/geniml/scripts/corpus_auditor.py (first 5 of 7 lines)

Scripts the text names. Found by matching words, so treat them as pointers.

Found by matching wordsline 117 line 248 line 251 line 296 line 301

Files it mentions

references/region2vec.md, references/scembed.md, references/bedspace.md, references/consensus_peaks.md, references/utilities.md (first 5 of 11 lines)

Files the text names, such as ones to read or write. Found by matching words, so treat them as pointers.

Found by matching wordsline 172 line 183 line 191 line 209 line 210

Licence

MIT, from the skill file

The terms its author shares it under, which let it be shown here.

From its settingsline 4 licence text

Other settings

compatibility: Requires Python 3.12 and uv for the tested geniml 0.8.4 / gtars 0.10.0 stack; scEmbed needs AnnData 0.12.19 with Zarr 2.18.7 and the listed ML packages. Bundled planners and inspectors are dependency-free, local-only, and make no network requests. metadata: version: "1.4" skill-author: "K-Dense Inc." upstream-version: "0.8.4" last-reviewed: "2026-10-01"

More settings at the top of the file, shown as written.

From its settingsline 5 line 7
Other files in this skill (13) Close

The text

Open on GitHub

Most marks come from matching words in the file, so treat them as pointers.

1---
2name: geniml
3description: "Supports audited local Geniml genomic-interval workflows: validate BED and universe contracts, plan Region2Vec or scEmbed runs, inspect model/tokenizer compatibility, and assess consensus universes."
4license: MIT
5compatibility: Requires Python 3.12 and uv for the tested geniml 0.8.4 / gtars 0.10.0 stack; scEmbed needs AnnData 0.12.19 with Zarr 2.18.7 and the listed ML packages. Bundled planners and inspectors are dependency-free, local-only, and make no network requests.
6allowed-tools: Read Write Edit Bash Glob
7metadata:
8 version: "1.4"
9 skill-author: "K-Dense Inc."
10 upstream-version: "0.8.4"
11 last-reviewed: "2026-10-01"
12---
14# Geniml
16Use Geniml for machine learning and statistical workflows over genomic interval
17sets. Treat coordinates, assemblies, token vocabularies, model artifacts, and
18sample grouping as explicit contracts. The bundled scripts validate or plan;
19they do not import Geniml, contact services, deserialize models, or execute
20training.
22`Bash` is declared only for explicit, user-approved `uv`, Python, Geniml,
23Gtars, Git, and native CLI commands shown in this guide; bundled Python helpers
24do not spawn subprocesses. Example paths under `data/`, `refs/`, `work/`, and
25`models/` are user-provided project placeholders, not missing bundled files.

Geniml

Use Geniml for machine learning and statistical workflows over genomic interval sets. Treat coordinates, assemblies, token vocabularies, model artifacts, and sample grouping as explicit contracts. The bundled scripts validate or plan; they do not import Geniml, contact services, deserialize models, or execute training.

Bash is declared only for explicit, user-approved uv, Python, Geniml, Gtars, Git, and native CLI commands shown in this guide; bundled Python helpers do not spawn subprocesses. Example paths under data/, refs/, work/, and models/ are user-provided project placeholders, not missing bundled files.

Raw lines 1 to 26
Starts an agent spawn :24
27## Verified release snapshot
29- Latest stable PyPI release on 2026-10-01: `geniml==0.8.4` (2026-01-14).
30- PyPI does not declare `Requires-Python`; its classifiers list Python
31 3.10-3.14. The current recipes below were tested on Python 3.12.
32- `geniml==0.8.4` accepts `gtars>=0.2.5`; the verified base smoke used current
33 `gtars==0.10.0` (2026-09-05, Python >=3.10).
34- Extras are `ml` and `test`. The base install omits Torch, Gensim, Scanpy,
35 Hugging Face Hub, pyBigWig, and HMM dependencies.
36- Upstream documentation contains stale examples. Release source and installed
37 `--help` output take precedence where they conflict.

Verified release snapshot

  • Latest stable PyPI release on 2026-10-01: geniml==0.8.4 (2026-01-14).
  • PyPI does not declare Requires-Python; its classifiers list Python 3.10-3.14. The current recipes below were tested on Python 3.12.
  • geniml==0.8.4 accepts gtars>=0.2.5; the verified base smoke used current gtars==0.10.0 (2026-09-05, Python >=3.10).
  • Extras are ml and test. The base install omits Torch, Gensim, Scanpy, Hugging Face Hub, pyBigWig, and HMM dependencies.
  • Upstream documentation contains stale examples. Release source and installed --help output take precedence where they conflict.
Raw lines 27 to 38
39## Install reproducibly
41Use a separate project environment. The tested CPU stack uses Python 3.12:
43```bash
44uv venv --python 3.12
45uv pip install "geniml==0.8.4" "gtars==0.10.0"
46```
48For the Region2Vec/scEmbed recipes tested here, add only their required libraries:
50```bash
51uv pip install "torch==2.14.1" "gensim==4.4.0" "huggingface-hub==2.0.0" \
52 "scanpy==1.12.4" "anndata==0.12.19" "zarr==2.18.7"
53```
55For the consensus recipes, also install `pyBigWig==0.3.26` and
56`hmmlearn==0.3.3`. For a durable project, use the same requirements with
57`uv add` and retain `uv.lock`.
59Geniml requires Zarr <3. AnnData 0.13 requires Zarr >=3, so current AnnData
60cannot share this environment. Keep AnnData 0.12.19 here; transfer H5AD files
61between separate environments when newer AnnData features are needed. Never
62force an incompatible installation with `--no-deps`.
64The full `geniml[ml]==0.8.4` extra includes additional, older pinned components.
65Its resolution was checked with `anndata==0.12.19` and `gtars==0.10.0`, but
66that full stack was not executed; it selected Scanpy 1.11.5 and Transformers
674.57.6. It is unnecessary for the workflows above.
69Do not install an unpinned Git branch. Record Python, OS/architecture, the
70resolved lockfile, and the PyPI artifact digest. Geniml itself is BSD-2-Clause;
71the `MIT` frontmatter value licenses this skill's content.

Install reproducibly

Use a separate project environment. The tested CPU stack uses Python 3.12:

uv venv --python 3.12
uv pip install "geniml==0.8.4" "gtars==0.10.0"

For the Region2Vec/scEmbed recipes tested here, add only their required libraries:

uv pip install "torch==2.14.1" "gensim==4.4.0" "huggingface-hub==2.0.0" \
  "scanpy==1.12.4" "anndata==0.12.19" "zarr==2.18.7"

For the consensus recipes, also install pyBigWig==0.3.26 and hmmlearn==0.3.3. For a durable project, use the same requirements with uv add and retain uv.lock.

Geniml requires Zarr <3. AnnData 0.13 requires Zarr >=3, so current AnnData cannot share this environment. Keep AnnData 0.12.19 here; transfer H5AD files between separate environments when newer AnnData features are needed. Never force an incompatible installation with --no-deps.

The full geniml[ml]==0.8.4 extra includes additional, older pinned components. Its resolution was checked with anndata==0.12.19 and gtars==0.10.0, but that full stack was not executed; it selected Scanpy 1.11.5 and Transformers 4.57.6. It is unnecessary for the workflows above.

Do not install an unpinned Git branch. Record Python, OS/architecture, the resolved lockfile, and the PyPI artifact digest. Geniml itself is BSD-2-Clause; the MIT frontmatter value licenses this skill's content.

Raw lines 39 to 72
73## Start with the safety gate
75Before importing Geniml or running an external binary:
771. Work only with explicit local regular files. Reject URLs, FIFOs, devices,
78 and symlinks unless the user deliberately changes that policy.
792. Validate BED structure and the declared assembly against a trusted local
80 chromosome-sizes file.
813. Bound file count, bytes, rows, workers, epochs, and output size.
824. Separate train/validation/test by patient, donor, biological replicate, or
83 other independent unit—not by BED row or cell alone.
845. Inventory and checksum the universe, tokenizer, model, config, inputs,
85 metadata manifest, and native binaries.
866. Obtain explicit approval before any BEDbase or Hugging Face download. Never
87 infer approval from a model ID or BEDbase identifier.
887. Keep logs aggregate and bounded. BED filenames, sample IDs, phenotypes,
89 labels, barcodes, and genomic intervals may be sensitive.

Start with the safety gate

Before importing Geniml or running an external binary:

  1. Work only with explicit local regular files. Reject URLs, FIFOs, devices, and symlinks unless the user deliberately changes that policy.
  2. Validate BED structure and the declared assembly against a trusted local chromosome-sizes file.
  3. Bound file count, bytes, rows, workers, epochs, and output size.
  4. Separate train/validation/test by patient, donor, biological replicate, or other independent unit—not by BED row or cell alone.
  5. Inventory and checksum the universe, tokenizer, model, config, inputs, metadata manifest, and native binaries.
  6. Obtain explicit approval before any BEDbase or Hugging Face download. Never infer approval from a model ID or BEDbase identifier.
  7. Keep logs aggregate and bounded. BED filenames, sample IDs, phenotypes, labels, barcodes, and genomic intervals may be sensitive.
Raw lines 73 to 90
91## Coordinate and assembly contract
93BED intervals are normally **0-based, half-open** `[start, end)`: start is
94included, end is excluded, and length is `end - start`. Do not mix them with
951-based closed coordinates from VCF/GFF or user-facing genome browsers.
97For every corpus and artifact, record:
99- assembly and patch/accession where possible (for example GRCh38 versus
100 GRCh38.p14), plus the chromosome-sizes checksum;
101- contig naming convention (`chr1` versus `1`), alt/random/decoy policy, and
102 mitochondrial naming;
103- coordinate convention, sorting order, duplicate/overlap policy, and whether
104 BED strand is meaningful;
105- liftover tool, chain digest, source/target assemblies, unmapped fraction, and
106 post-liftover validation.
108Reject negative coordinates, `end <= start`, integer overflow, unknown
109contigs, ends beyond contig length, malformed columns, mixed assemblies, and
110silent contig renaming. Sorting and normalization never repair an assembly
111mismatch. BED3 has no strand; when column 6 is present, preserve `+`, `-`, or
112`.` unless the assay contract says otherwise.
114Run a bounded validation and normalization **plan** before analysis:
116```bash
117python skills/geniml/scripts/bed_validator.py \
118 --input data/peaks.bed \
119 --assembly GRCh38 \
120 --chrom-sizes refs/GRCh38.chrom.sizes
121```
123The validator reports proposed actions but never rewrites the BED file.

Coordinate and assembly contract

BED intervals are normally 0-based, half-open [start, end): start is included, end is excluded, and length is end - start. Do not mix them with 1-based closed coordinates from VCF/GFF or user-facing genome browsers.

For every corpus and artifact, record:

  • assembly and patch/accession where possible (for example GRCh38 versus GRCh38.p14), plus the chromosome-sizes checksum;
  • contig naming convention (chr1 versus 1), alt/random/decoy policy, and mitochondrial naming;
  • coordinate convention, sorting order, duplicate/overlap policy, and whether BED strand is meaningful;
  • liftover tool, chain digest, source/target assemblies, unmapped fraction, and post-liftover validation.

Reject negative coordinates, end <= start, integer overflow, unknown contigs, ends beyond contig length, malformed columns, mixed assemblies, and silent contig renaming. Sorting and normalization never repair an assembly mismatch. BED3 has no strand; when column 6 is present, preserve +, -, or . unless the assay contract says otherwise.

Run a bounded validation and normalization plan before analysis:

python skills/geniml/scripts/bed_validator.py \
  --input data/peaks.bed \
  --assembly GRCh38 \
  --chrom-sizes refs/GRCh38.chrom.sizes

The validator reports proposed actions but never rewrites the BED file.

Raw lines 91 to 124
Runs code python skills/geniml/scripts/bed_validator.py :117
125## Current API map

Current API map

Raw lines 125 to 126
127### Region and tokenizer I/O
129Prefer Gtars for new interval/tokenizer code:
131```python
132from gtars.models import Region, RegionSet
133from gtars.tokenizers import Tokenizer
135regions = RegionSet("data/peaks.bed")
136tokenizer = Tokenizer.from_bed("refs/universe.bed")
137encoded = tokenizer(regions)
138input_ids = encoded["input_ids"]
139```
141`RegionSet` and `Tokenizer` also accept remote inputs in some constructors;
142this skill permits local paths only unless network access is explicitly
143approved. `geniml.io.RegionSet(regions, backed=False)` remains available as a
144legacy Python implementation; backed sets are iterable but not indexable.
145`geniml.io.Region` uses `stop`, while `gtars.models.Region` uses `end`.
147With gtars 0.10.0, seven special tokens are added to a BED vocabulary. Therefore
148`len(tokenizer)` is not simply the number of universe rows. Preserve universe
149row order and the exact special-token map.

Region and tokenizer I/O

Prefer Gtars for new interval/tokenizer code:

from gtars.models import Region, RegionSet
from gtars.tokenizers import Tokenizer

regions = RegionSet("data/peaks.bed")
tokenizer = Tokenizer.from_bed("refs/universe.bed")
encoded = tokenizer(regions)
input_ids = encoded["input_ids"]

RegionSet and Tokenizer also accept remote inputs in some constructors; this skill permits local paths only unless network access is explicitly approved. geniml.io.RegionSet(regions, backed=False) remains available as a legacy Python implementation; backed sets are iterable but not indexable. geniml.io.Region uses stop, while gtars.models.Region uses end.

With gtars 0.10.0, seven special tokens are added to a BED vocabulary. Therefore len(tokenizer) is not simply the number of universe rows. Preserve universe row order and the exact special-token map.

Raw lines 127 to 150
151### Region2Vec
153The modern class lives at a concrete module path:
155```python
156from geniml.region2vec.main import Region2VecExModel
157from geniml.region2vec.utils import Region2VecDataset
158from gtars.tokenizers import Tokenizer
160tokenizer = Tokenizer.from_bed("refs/universe.bed")
161dataset = Region2VecDataset("work/tokens.parquet", shuffle=True, convert_to_str=True)
162model = Region2VecExModel(tokenizer=tokenizer, embedding_dim=100)
163model.train(dataset, epochs=10, window_size=5, num_cpus=4, seed=42)
164```
166The Parquet input must contain one list-valued `tokens` column, one document
167per row. Record token frequencies and `min_count`: in the
168[0.8.4 training implementation](https://github.com/databio/geniml/blob/v0.8.4/geniml/region2vec/main.py),
169only Gensim-retained token IDs receive trained weights. Universe membership
170alone therefore does not prove a token has a learned embedding. Report the
171fraction of inference tokens excluded by training-frequency filtering and
172exclude or explicitly flag their embeddings in downstream comparisons. See [references/region2vec.md](references/region2vec.md) for export,
173encoding, legacy CLI, and evaluation details.

Region2Vec

The modern class lives at a concrete module path:

from geniml.region2vec.main import Region2VecExModel
from geniml.region2vec.utils import Region2VecDataset
from gtars.tokenizers import Tokenizer

tokenizer = Tokenizer.from_bed("refs/universe.bed")
dataset = Region2VecDataset("work/tokens.parquet", shuffle=True, convert_to_str=True)
model = Region2VecExModel(tokenizer=tokenizer, embedding_dim=100)
model.train(dataset, epochs=10, window_size=5, num_cpus=4, seed=42)

The Parquet input must contain one list-valued tokens column, one document per row. Record token frequencies and min_count: in the 0.8.4 training implementation, only Gensim-retained token IDs receive trained weights. Universe membership alone therefore does not prove a token has a learned embedding. Report the fraction of inference tokens excluded by training-frequency filtering and exclude or explicitly flag their embeddings in downstream comparisons. See references/region2vec.md for export, encoding, legacy CLI, and evaluation details.

Raw lines 151 to 174
Reads a file references/region2vec.md :172
175### scEmbed
177Import `ScEmbed` from `geniml.scembed.main`. AnnData `.var` must contain
178`chr`, `start`, and `end`; rows are cells and nonzero features identify
179accessible regions. The released `tokenize_anndata` and `ScEmbed.encode`
180fail with Gtars 0.10.0. Use the tested explicit Region construction and token
181projection in the scEmbed reference; preserve cell order and reject empty,
182unmatched, or untrained token sets. See
183[references/scembed.md](references/scembed.md).

scEmbed

Import ScEmbed from geniml.scembed.main. AnnData .var must contain chr, start, and end; rows are cells and nonzero features identify accessible regions. The released tokenize_anndata and ScEmbed.encode fail with Gtars 0.10.0. Use the tested explicit Region construction and token projection in the scEmbed reference; preserve cell order and reject empty, unmatched, or untrained token sets. See references/scembed.md.

Raw lines 175 to 184
Reads a file references/scembed.md :183
185### BEDspace
187BEDspace remains in 0.8.4 and invokes an external StarSpace executable.
188StarSpace is archived and upstream Geniml does not pin a compatible revision.
189Treat BEDspace as a legacy reproduction path, not the default for new systems.
190Its preprocessing also returns blank documents with Gtars 0.10.0 after
191catching a tokenizer API error. See [references/bedspace.md](references/bedspace.md)
192for the source contract and reproduction limitations.

BEDspace

BEDspace remains in 0.8.4 and invokes an external StarSpace executable. StarSpace is archived and upstream Geniml does not pin a compatible revision. Treat BEDspace as a legacy reproduction path, not the default for new systems. Its preprocessing also returns blank documents with Gtars 0.10.0 after catching a tokenizer API error. See references/bedspace.md for the source contract and reproduction limitations.

Raw lines 185 to 193
Reads a file references/bedspace.md :191
194### Consensus universes and assessment
196The installed 0.8.4 CLI uses:
198```text
199geniml build-universe {cc,ccf,ml,hmm} ...
200geniml assess-universe ...
201geniml eval {gdst,npt,ctt,rct,bin-gen} ...
202```
204CC/CCF/ML/HMM consume precomputed coverage bigWigs. Do not concatenate or
205generate coverage until all BED files pass the same assembly contract.
206Assessment and embedding metrics are distinct: `assess-universe` measures fit
207of a universe to interval collections, while `eval` implements CTT, RCT, GDST,
208and NPT for embeddings. See
209[references/consensus_peaks.md](references/consensus_peaks.md) and
210[references/utilities.md](references/utilities.md).

Consensus universes and assessment

The installed 0.8.4 CLI uses:

geniml build-universe {cc,ccf,ml,hmm} ...
geniml assess-universe ...
geniml eval {gdst,npt,ctt,rct,bin-gen} ...

CC/CCF/ML/HMM consume precomputed coverage bigWigs. Do not concatenate or generate coverage until all BED files pass the same assembly contract. Assessment and embedding metrics are distinct: assess-universe measures fit of a universe to interval collections, while eval implements CTT, RCT, GDST, and NPT for embeddings. See references/consensus_peaks.md and references/utilities.md.

Raw lines 194 to 211
Reads a file references/utilities.md :210
212## Important 0.8.4 migration notes
214- The 0.7.0 changelog moved new RegionSet/tokenizer work toward Gtars.
215- The 0.4.0 names `TreeTokenizer` and `AnnDataTokenizer` are historical; the
216 current Gtars API exposes `Tokenizer`.
217- In the 0.8.4 wheel, `geniml.region2vec` and `geniml.scembed` do not re-export
218 their modern classes/functions. Use the concrete module paths above.
219- `geniml tokenize` and `geniml region2vec` call names no longer exported by
220 their package `__init__` files; do not build new workflows around those CLI
221 paths without an installed-version smoke test.
222- `geniml scembed` parses legacy MatrixMarket options but its command body is a
223 no-op in 0.8.4. Use `geniml.scembed.main.ScEmbed`.
224- Official pages still show `geniml assess`; the release command is
225 `geniml assess-universe`.
226- `.gtok` remains present in legacy datasets, but upstream issue #14 proposes
227 deprecating many-file `.gtok` workflows. Prefer one bounded Parquet corpus.
228- Config key `embedding_size` is accepted only for backward compatibility;
229 use `embedding_dim`.

Important 0.8.4 migration notes

  • The 0.7.0 changelog moved new RegionSet/tokenizer work toward Gtars.
  • The 0.4.0 names TreeTokenizer and AnnDataTokenizer are historical; the current Gtars API exposes Tokenizer.
  • In the 0.8.4 wheel, geniml.region2vec and geniml.scembed do not re-export their modern classes/functions. Use the concrete module paths above.
  • geniml tokenize and geniml region2vec call names no longer exported by their package __init__ files; do not build new workflows around those CLI paths without an installed-version smoke test.
  • geniml scembed parses legacy MatrixMarket options but its command body is a no-op in 0.8.4. Use geniml.scembed.main.ScEmbed.
  • Official pages still show geniml assess; the release command is geniml assess-universe.
  • .gtok remains present in legacy datasets, but upstream issue #14 proposes deprecating many-file .gtok workflows. Prefer one bounded Parquet corpus.
  • Config key embedding_size is accepted only for backward compatibility; use embedding_dim.
Raw lines 212 to 230
231## Model and universe compatibility
233A Region2Vec/scEmbed inference bundle is valid only when these agree:
235- model `config.yaml` `vocab_size` and `embedding_dim`;
236- exact `universe.bed` bytes/order and assembly;
237- tokenizer implementation/version and special-token IDs;
238- checkpoint tensor shapes and pooling policy;
239- Geniml/Gtars versions and any tokenization parameters.
241Geniml 0.8.4 defaults to `checkpoint.pt`, `config.yaml`, and `universe.bed`.
242Its loader uses `torch.load(..., weights_only=True)`, but `.pt`, Gensim
243`.model`, pickle, joblib, and native binaries remain untrusted inputs. Inspect
244and checksum artifacts before loading; use an isolated environment and never
245load a checkpoint merely to discover its metadata.
247```bash
248python skills/geniml/scripts/model_artifact_inspector.py \
249 --model-dir models/region2vec
251python skills/geniml/scripts/tokenizer_compatibility.py \
252 --model-dir models/region2vec \
253 --universe refs/universe.bed \
254 --assembly GRCh38
255```
257`Region2VecExModel(model_path="org/repo")`, `ScEmbed(model_path="org/repo")`,
258and Gtars `Tokenizer.from_pretrained(...)` can download from Hugging Face.
259The Geniml classes' local `from_pretrained("models/local")` loads a bundle. Their
260constructors discard Hub `revision`, `cache_dir`, and `local_files_only`
261kwargs. For an authorized download, fetch the three files with
262`huggingface_hub.hf_hub_download` directly at a reviewed immutable revision,
263verify hashes, assemble a local bundle, then use the local classmethod. Do not
264pass a Hub ID to the constructor expecting offline or revision enforcement.

Model and universe compatibility

A Region2Vec/scEmbed inference bundle is valid only when these agree:

  • model config.yaml vocab_size and embedding_dim;
  • exact universe.bed bytes/order and assembly;
  • tokenizer implementation/version and special-token IDs;
  • checkpoint tensor shapes and pooling policy;
  • Geniml/Gtars versions and any tokenization parameters.

Geniml 0.8.4 defaults to checkpoint.pt, config.yaml, and universe.bed. Its loader uses torch.load(..., weights_only=True), but .pt, Gensim .model, pickle, joblib, and native binaries remain untrusted inputs. Inspect and checksum artifacts before loading; use an isolated environment and never load a checkpoint merely to discover its metadata.

python skills/geniml/scripts/model_artifact_inspector.py \
  --model-dir models/region2vec

python skills/geniml/scripts/tokenizer_compatibility.py \
  --model-dir models/region2vec \
  --universe refs/universe.bed \
  --assembly GRCh38

Region2VecExModel(model_path="org/repo"), ScEmbed(model_path="org/repo"), and Gtars Tokenizer.from_pretrained(...) can download from Hugging Face. The Geniml classes' local from_pretrained("models/local") loads a bundle. Their constructors discard Hub revision, cache_dir, and local_files_only kwargs. For an authorized download, fetch the three files with huggingface_hub.hf_hub_download directly at a reviewed immutable revision, verify hashes, assemble a local bundle, then use the local classmethod. Do not pass a Hub ID to the constructor expecting offline or revision enforcement.

Raw lines 231 to 265
Runs code python skills/geniml/scripts/model_artifact_inspector.py :248
Runs code python skills/geniml/scripts/tokenizer_compatibility.py :251
266## BEDbase downloads and caches
268`BBClient.load_bed`, `load_bedset`, and token-cache operations may contact
269`https://api.bedbase.org`. The default cache is
270`$BBCLIENT_CACHE` or `~/.bbcache`; `BEDBASE_API` changes the endpoint. Do not
271read unrelated environment variables. Set an explicit project cache, estimate
272size, approve identifiers/endpoints, and verify returned checksums before use.
273The token-cache download ignores the instance's `bedbase_api` and uses the
274import-time default. BEDset downloads are unbounded all-member downloads,
275without pagination in the checked server route. The exact GET routes and
276source-only/live-verification boundary are in the utilities reference.
278Local inspection commands are safer:
280```text
281geniml bbclient seek ID --cache-folder /absolute/project/cache
282geniml bbclient inspect-bedfiles --cache-folder /absolute/project/cache
283geniml bbclient inspect-bedsets --cache-folder /absolute/project/cache
284```
286The `cache-bed`, `cache-bedset`, and `cache-tokens` subcommands may use the
287network. Do not run them implicitly or include sensitive local BED files in an
288upload/cache workflow.

BEDbase downloads and caches

BBClient.load_bed, load_bedset, and token-cache operations may contact https://api.bedbase.org. The default cache is $BBCLIENT_CACHE or ~/.bbcache; BEDBASE_API changes the endpoint. Do not read unrelated environment variables. Set an explicit project cache, estimate size, approve identifiers/endpoints, and verify returned checksums before use. The token-cache download ignores the instance's bedbase_api and uses the import-time default. BEDset downloads are unbounded all-member downloads, without pagination in the checked server route. The exact GET routes and source-only/live-verification boundary are in the utilities reference.

Local inspection commands are safer:

geniml bbclient seek ID --cache-folder /absolute/project/cache
geniml bbclient inspect-bedfiles --cache-folder /absolute/project/cache
geniml bbclient inspect-bedsets --cache-folder /absolute/project/cache

The cache-bed, cache-bedset, and cache-tokens subcommands may use the network. Do not run them implicitly or include sensitive local BED files in an upload/cache workflow.

Raw lines 266 to 289
290## Local audit and planning CLIs
292All scripts are standard-library-only and default to redacted JSON:
294```bash
295# Audit manifest paths, checksums, assemblies, and patient/donor leakage
296python skills/geniml/scripts/corpus_auditor.py \
297 --manifest data/manifest.tsv --assembly-column assembly \
298 --group-column patient_id --split-column split
300# Plan tokenizer/model compatibility checks
301python skills/geniml/scripts/tokenizer_compatibility.py \
302 --model-dir models/r2v --universe refs/universe.bed --assembly GRCh38
304# Plan consensus construction; does not execute Geniml or coverage tools
305python skills/geniml/scripts/consensus_plan.py \
306 --manifest data/manifest.tsv --chrom-sizes refs/GRCh38.chrom.sizes \
307 --assembly GRCh38 --method cc --output-dir work/consensus
309# Plan an embedding run; does not import ML libraries
310python skills/geniml/scripts/embedding_plan.py \
311 --mode region2vec --data work/tokens.parquet \
312 --universe refs/universe.bed --output-dir work/r2v \
313 --assembly GRCh38
314```
316Use `--help` for resource limits and explicit path-disclosure controls.

Local audit and planning CLIs

All scripts are standard-library-only and default to redacted JSON:

# Audit manifest paths, checksums, assemblies, and patient/donor leakage
python skills/geniml/scripts/corpus_auditor.py \
  --manifest data/manifest.tsv --assembly-column assembly \
  --group-column patient_id --split-column split

# Plan tokenizer/model compatibility checks
python skills/geniml/scripts/tokenizer_compatibility.py \
  --model-dir models/r2v --universe refs/universe.bed --assembly GRCh38

# Plan consensus construction; does not execute Geniml or coverage tools
python skills/geniml/scripts/consensus_plan.py \
  --manifest data/manifest.tsv --chrom-sizes refs/GRCh38.chrom.sizes \
  --assembly GRCh38 --method cc --output-dir work/consensus

# Plan an embedding run; does not import ML libraries
python skills/geniml/scripts/embedding_plan.py \
  --mode region2vec --data work/tokens.parquet \
  --universe refs/universe.bed --output-dir work/r2v \
  --assembly GRCh38

Use --help for resource limits and explicit path-disclosure controls.

Raw lines 290 to 317
Runs code python skills/geniml/scripts/corpus_auditor.py :296
Runs code python skills/geniml/scripts/tokenizer_compatibility.py :301
Runs code python skills/geniml/scripts/consensus_plan.py :305
Runs code python skills/geniml/scripts/embedding_plan.py :310
318## References
320- [Region2Vec](references/region2vec.md): modern API, artifacts, CLI drift,
321 training, encoding, and evaluation.
322- [scEmbed](references/scembed.md): AnnData/token preparation, training,
323 inference, annotation, privacy, and leakage.
324- [BEDspace](references/bedspace.md): metadata schema, exact legacy CLI,
325 StarSpace status, artifacts, and retrieval.
326- [Consensus peaks](references/consensus_peaks.md): coverage prerequisites,
327 CC/CCF/ML/HMM, assessment, and assembly safeguards.
328- [Utilities](references/utilities.md): I/O, Gtars tokenizers, BBClient,
329 evaluation, model safety, migration, and dated sources.
331Synthetic CPU checks covered training, tokenization, explicit cell pooling,
332local export/reload, evaluation loading, CC construction, and local caches.
333BEDspace native training, hosted annotation, public model inference, and
334real-cohort performance remain untested. Source snapshot and primary-paper
335links are dated in
336[references/utilities.md](references/utilities.md). Re-check release metadata
337and installed signatures before changing the pinned versions.

References

  • Region2Vec: modern API, artifacts, CLI drift, training, encoding, and evaluation.
  • scEmbed: AnnData/token preparation, training, inference, annotation, privacy, and leakage.
  • BEDspace: metadata schema, exact legacy CLI, StarSpace status, artifacts, and retrieval.
  • Consensus peaks: coverage prerequisites, CC/CCF/ML/HMM, assessment, and assembly safeguards.
  • Utilities: I/O, Gtars tokenizers, BBClient, evaluation, model safety, migration, and dated sources.

Synthetic CPU checks covered training, tokenization, explicit cell pooling, local export/reload, evaluation loading, CC construction, and local caches. BEDspace native training, hosted annotation, public model inference, and real-cohort performance remain untested. Source snapshot and primary-paper links are dated in references/utilities.md. Re-check release metadata and installed signatures before changing the pinned versions.

Raw lines 318 to 338
Reads a file references/region2vec.md :320
Reads a file references/scembed.md :322
Reads a file references/bedspace.md :324
Reads a file references/utilities.md :328
Boilerplate, lines 339 to 354. The same text appears in 125 other files here. Close
339## Citing Scientific Agent Skills
341This skill is part of Scientific Agent Skills by K-Dense. If it materially contributed to a
342manuscript, report, presentation, or code release, add the paper to the references or
343software section and tell the user you did so:
345> Kassis, T., Agarwal, V., He, Y., Patel, D., & Brueckner, A. M. (2026). Scientific Agent
346> Skills: A Library of Procedural Knowledge for Research Agents. arXiv:2609.00065.
347> https://doi.org/10.48550/arXiv.2609.00065
349Always cite the current version. The DOI and https://arxiv.org/abs/2609.00065 resolve to the
350latest arXiv version, so never append a version suffix such as `v1`. When network access is
351available, fetch https://arxiv.org/abs/2609.00065 (or
352http://export.arxiv.org/api/query?id_list=2609.00065) before writing the reference and take
353the author list, year, and version from that record. If the record lists a journal reference
354or publisher DOI, cite the published version instead.

From K-Dense-AI/scientific-agent-skills at 5f2bc03, 2026-10-26. Not read by a model yet. Summary and techniques by Claude Opus 5.5 on 2026-11-06.