Skill Tracer
Skills › Scientific Agent Skills › gtars › refget.md

refget.md

381 lines · skills/gtars/references/refget.md at 5f2bc03

Open on GitHub

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

1# Refget, sequence digests, stores, and BEDbase
2
3Local synthetic FASTA/store tests on **2026-10-01** used Python `gtars==0.10.0`,
4with bundled refget 0.10.0. CLI 0.10.0 and direct Rust refget 0.11.0
5were source reviewed, not compiled or executed.
6

Refget, sequence digests, stores, and BEDbase

Local synthetic FASTA/store tests on 2026-10-01 used Python gtars==0.10.0, with bundled refget 0.10.0. CLI 0.10.0 and direct Rust refget 0.11.0 were source reviewed, not compiled or executed.

Raw lines 1 to 6
7## Digest terminology
8
9Current Python functions:
11```python
12from gtars.refget import (
13 compute_fai,
14 digest_fasta,
15 digest_sequence,
16 load_fasta,
17 md5_digest,
18 sha512t24u_digest,
21digest = sha512t24u_digest("ACGT")
22assert digest == "aKF498dAxcJAqme6QYQ7EZ07-fiw8Kw2"
23assert md5_digest("ACGT") == "f1f8f4bf413b16ad135722aa4591043e"
24```
26Gtars returns the 32-character unprefixed `sha512t24u` value. The preferred
27GA4GH refget sequence identifier adds `SQ.`:
29```text
30SQ.aKF498dAxcJAqme6QYQ7EZ07-fiw8Kw2
31```
33MD5 is retained for legacy lookup and is not a collision-resistant provenance
34hash. Keep an independent SHA-256 for artifact integrity.
36`digest_sequence(data: bytes, name=None, description=None)` uppercases sequence
37bytes and returns a `SequenceRecord` containing metadata and data.
38`digest_fasta(path)` computes a `SequenceCollection`; `load_fasta(path)` loads
39sequence data into memory. `compute_fai(path)` is for uncompressed FASTA.
41GA4GH refget normalizes sequence content before computing its sequence
42identifier. Do not hash raw FASTA bytes and call that a sequence digest: headers,
43line wrapping, compression, and sequence normalization are different layers.

Digest terminology

Current Python functions:

from gtars.refget import (
    compute_fai,
    digest_fasta,
    digest_sequence,
    load_fasta,
    md5_digest,
    sha512t24u_digest,
)

digest = sha512t24u_digest("ACGT")
assert digest == "aKF498dAxcJAqme6QYQ7EZ07-fiw8Kw2"
assert md5_digest("ACGT") == "f1f8f4bf413b16ad135722aa4591043e"

Gtars returns the 32-character unprefixed sha512t24u value. The preferred GA4GH refget sequence identifier adds SQ.:

SQ.aKF498dAxcJAqme6QYQ7EZ07-fiw8Kw2

MD5 is retained for legacy lookup and is not a collision-resistant provenance hash. Keep an independent SHA-256 for artifact integrity.

digest_sequence(data: bytes, name=None, description=None) uppercases sequence bytes and returns a SequenceRecord containing metadata and data. digest_fasta(path) computes a SequenceCollection; load_fasta(path) loads sequence data into memory. compute_fai(path) is for uncompressed FASTA.

GA4GH refget normalizes sequence content before computing its sequence identifier. Do not hash raw FASTA bytes and call that a sequence digest: headers, line wrapping, compression, and sequence normalization are different layers.

Raw lines 7 to 44
45## Current Python store class
47The runtime class is `RefgetStore`, not the older tutorial name
48`GlobalRefgetStore`:
50```python
51from gtars.refget import RefgetStore
52```
54Verified constructors:
56```text
57RefgetStore.in_memory()
58RefgetStore.on_disk(cache_path)
59RefgetStore.open_local(path)
60RefgetStore.open_remote(cache_path, remote_url)
61RefgetStore.store_exists(path)
62```

Current Python store class

The runtime class is RefgetStore, not the older tutorial name GlobalRefgetStore:

from gtars.refget import RefgetStore

Verified constructors:

RefgetStore.in_memory()
RefgetStore.on_disk(cache_path)
RefgetStore.open_local(path)
RefgetStore.open_remote(cache_path, remote_url)
RefgetStore.store_exists(path)
Raw lines 45 to 63
64### Local and in-memory modes
66```python
67from gtars.refget import RefgetStore
69store = RefgetStore.in_memory()
70metadata, was_new = store.add_sequence_collection_from_fasta(
71 "reviewed-reference.fa",
72 force=False,
73 namespaces=["refseq"],
74 collection_alias="local:reference",
77store.write_store_to_dir("approved-store")
78reopened = RefgetStore.open_local("approved-store")
79```
81Side effects:
83- `in_memory()` does not write.
84- `on_disk(path)` opens an existing store or creates a new disk-backed store.
85- `open_local(path)` reads store metadata/indexes and lazy-loads local sequence
86 data.
87- `write_store_to_dir` and `enable_persistence` create/write files.
88- `force=True` can replace existing collection/sequence entries.
90Use `store_exists(path)` before choosing create versus open. Refuse symlinks,
91unexpected files, output collisions, and unapproved stores.
93Batch import:
95```python
96report = store.add_sequence_collections_from_fastas(
97 ["ref-a.fa.gz", "ref-b.fa.gz"],
98 file_list=None,
99 jobs=1,
100 force=False,
101 namespaces=["refseq"],
103```
105In 0.10.0 the return is `ImportReport`: iterate `report.collections` for
106`(metadata, was_new)` results. `report.n_collections_new`,
107`report.n_sequences_written`, and `report.n_sequences_deduped` describe this
108import run. `len(report)` is the number of file results. The report itself is
109not a list or iterator. A skipped existing collection may contribute no sequence
110counters if the import short-circuits before reading it.
112`store.stats()` instead describes totals and current RAM residency. Its Python
113values are strings: convert counts with `int(...)`. The keys now include
114`n_sequences_in_memory`, `n_collections_in_memory`, and `logical_sequence_bytes`;
115old `*_loaded` names are removed. Logical sequence bytes are encoded data volume,
116not a measured cache-directory size.
118`collection_alias="namespace:alias"` applies to the single-FASTA method. An
119invalid syntax raises `ValueError`; alias conflicts require explicit resolution.
120Do not silently overwrite a reference assembly alias.
122`fastas` can also accept globs or directories and `jobs=0` means automatic
123concurrency. For controlled runs, enumerate reviewed files explicitly and set a
124positive bounded job count.

Local and in-memory modes

from gtars.refget import RefgetStore

store = RefgetStore.in_memory()
metadata, was_new = store.add_sequence_collection_from_fasta(
    "reviewed-reference.fa",
    force=False,
    namespaces=["refseq"],
    collection_alias="local:reference",
)

store.write_store_to_dir("approved-store")
reopened = RefgetStore.open_local("approved-store")

Side effects:

  • in_memory() does not write.
  • on_disk(path) opens an existing store or creates a new disk-backed store.
  • open_local(path) reads store metadata/indexes and lazy-loads local sequence data.
  • write_store_to_dir and enable_persistence create/write files.
  • force=True can replace existing collection/sequence entries.

Use store_exists(path) before choosing create versus open. Refuse symlinks, unexpected files, output collisions, and unapproved stores.

Batch import:

report = store.add_sequence_collections_from_fastas(
    ["ref-a.fa.gz", "ref-b.fa.gz"],
    file_list=None,
    jobs=1,
    force=False,
    namespaces=["refseq"],
)

In 0.10.0 the return is ImportReport: iterate report.collections for (metadata, was_new) results. report.n_collections_new, report.n_sequences_written, and report.n_sequences_deduped describe this import run. len(report) is the number of file results. The report itself is not a list or iterator. A skipped existing collection may contribute no sequence counters if the import short-circuits before reading it.

store.stats() instead describes totals and current RAM residency. Its Python values are strings: convert counts with int(...). The keys now include n_sequences_in_memory, n_collections_in_memory, and logical_sequence_bytes; old *_loaded names are removed. Logical sequence bytes are encoded data volume, not a measured cache-directory size.

collection_alias="namespace:alias" applies to the single-FASTA method. An invalid syntax raises ValueError; alias conflicts require explicit resolution. Do not silently overwrite a reference assembly alias.

fastas can also accept globs or directories and jobs=0 means automatic concurrency. For controlled runs, enumerate reviewed files explicitly and set a positive bounded job count.

Raw lines 64 to 125
126## Metadata-only and sequence access
128Metadata methods avoid loading full sequence content:
130```python
131collections_page = store.list_collections(page=0, page_size=100)
132sequence_metadata = store.list_sequences()
133one_metadata = store.get_sequence_metadata(sequence_digest)
134collection_metadata = store.get_collection_metadata(collection_digest)
135```
137`list_collections` returns a dictionary with `results` and `pagination`
138(`page`, `page_size`, `total`); pages are zero-based. Advance the page until the
139collected count reaches `total`. `list_sequences()` returns the full metadata
140list without pagination, so it can still be large.
142Data methods (the loop's `consume_bounded` is an application-specific callback):
144```python
145record = store.get_sequence(sequence_digest)
146by_name = store.get_sequence_by_name(collection_digest, "chr1")
147piece = store.get_substring(sequence_digest, 100, 200)
148pieces = store.get_substrings(sequence_digest, [(100, 200), (500, 550)])
150for chunk in store.stream_sequence(
151 sequence_digest,
152 start=0,
153 end=1_000_000,
154 chunk_size=65_536,
155):
156 consume_bounded(chunk)
157```
159Substring ranges are 0-based half-open. Validate `0 <= start <= end <= length`.
160`stream_sequence` bounds peak result memory, but downstream accumulation can
161still defeat streaming.
163The 0.10.0 runtime also exposes `load_sequence`, `load_collection`,
164`load_all_sequences`, and `load_all_collections`. These materialize more data;
165do not call an all-load method without an explicit byte/RAM budget.

Metadata-only and sequence access

Metadata methods avoid loading full sequence content:

collections_page = store.list_collections(page=0, page_size=100)
sequence_metadata = store.list_sequences()
one_metadata = store.get_sequence_metadata(sequence_digest)
collection_metadata = store.get_collection_metadata(collection_digest)

list_collections returns a dictionary with results and pagination (page, page_size, total); pages are zero-based. Advance the page until the collected count reaches total. list_sequences() returns the full metadata list without pagination, so it can still be large.

Data methods (the loop's consume_bounded is an application-specific callback):

record = store.get_sequence(sequence_digest)
by_name = store.get_sequence_by_name(collection_digest, "chr1")
piece = store.get_substring(sequence_digest, 100, 200)
pieces = store.get_substrings(sequence_digest, [(100, 200), (500, 550)])

for chunk in store.stream_sequence(
    sequence_digest,
    start=0,
    end=1_000_000,
    chunk_size=65_536,
):
    consume_bounded(chunk)

Substring ranges are 0-based half-open. Validate 0 <= start <= end <= length. stream_sequence bounds peak result memory, but downstream accumulation can still defeat streaming.

The 0.10.0 runtime also exposes load_sequence, load_collection, load_all_sequences, and load_all_collections. These materialize more data; do not call an all-load method without an explicit byte/RAM budget.

Raw lines 126 to 166
167## Remote stores require an approval gate
169```python
170# Network + cache side effects: do not call before approval.
171remote = RefgetStore.open_remote(
172 approved_cache_path,
173 approved_https_base_url,
175```
177`open_remote` takes only a cache path and base URL. It fetches remote metadata,
178creates/uses local cache state, and enables persistence by default. In 0.10.0:
180- `get_substring` can issue remote byte-range reads without downloading the
181 whole sequence;
182- `stream_sequence` can stream remote ranges;
183- `load_sequence` is the whole-sequence path and can persist it.
185This URL is the base of a **Gtars static store**, not an arbitrary GA4GH
186`/sequence` REST endpoint. Source reads `rgstore.json`, referenced index files,
187`collections/<digest>.rgsi`, and sequence files specified by the store manifest.
188Substring requests use HTTP `Range` over encoded storage bytes, not genomic
189coordinates in the URL; a range response must be HTTP 206. These methods expose
190no auth-header argument. Source review covered this request contract; no public
191remote store was exercised in this audit.
193Calling `disable_persistence()` after opening does not undo metadata/cache work
194already performed. There is no constructor parameter for revision, endpoint
195allowlist, checksum manifest, byte quota, or offline mode.
197Before `open_remote`:
1991. obtain explicit approval for exact HTTPS host/path and cache directory;
2002. reject credentials in URLs and unreviewed redirects;
2013. pin an immutable server/store revision or content-addressed identifier;
2024. record expected collection/sequence digests and independent SHA-256 where
203 applicable;
2045. cap metadata, per-range, total transfer, sequence length, cache, retries,
205 concurrency, and time;
2066. disclose that request coordinates/digests and network metadata leave the
207 environment;
2087. validate returned lengths and digests before scientific use.
210Custom/patient-specific assemblies and requested ranges can be sensitive even
211when a public reference genome is not.

Remote stores require an approval gate

# Network + cache side effects: do not call before approval.
remote = RefgetStore.open_remote(
    approved_cache_path,
    approved_https_base_url,
)

open_remote takes only a cache path and base URL. It fetches remote metadata, creates/uses local cache state, and enables persistence by default. In 0.10.0:

  • get_substring can issue remote byte-range reads without downloading the whole sequence;
  • stream_sequence can stream remote ranges;
  • load_sequence is the whole-sequence path and can persist it.

This URL is the base of a Gtars static store, not an arbitrary GA4GH /sequence REST endpoint. Source reads rgstore.json, referenced index files, collections/<digest>.rgsi, and sequence files specified by the store manifest. Substring requests use HTTP Range over encoded storage bytes, not genomic coordinates in the URL; a range response must be HTTP 206. These methods expose no auth-header argument. Source review covered this request contract; no public remote store was exercised in this audit.

Calling disable_persistence() after opening does not undo metadata/cache work already performed. There is no constructor parameter for revision, endpoint allowlist, checksum manifest, byte quota, or offline mode.

Before open_remote:

  1. obtain explicit approval for exact HTTPS host/path and cache directory;
  2. reject credentials in URLs and unreviewed redirects;
  3. pin an immutable server/store revision or content-addressed identifier;
  4. record expected collection/sequence digests and independent SHA-256 where applicable;
  5. cap metadata, per-range, total transfer, sequence length, cache, retries, concurrency, and time;
  6. disclose that request coordinates/digests and network metadata leave the environment;
  7. validate returned lengths and digests before scientific use.

Custom/patient-specific assemblies and requested ranges can be sensitive even when a public reference genome is not.

Raw lines 167 to 212
213## Read-only concurrent stores
215`into_readonly()` converts a mutable store into `ReadonlyRefgetStore` for
216concurrent reads. It consumes/replaces the mutable store and cannot lazy-load
217collections that were not prepared. Load only the bounded data required before
218conversion; do not use `load_all_*` reflexively.

Read-only concurrent stores

into_readonly() converts a mutable store into ReadonlyRefgetStore for concurrent reads. It consumes/replaces the mutable store and cannot lazy-load collections that were not prepared. Load only the bounded data required before conversion; do not use load_all_* reflexively.

Raw lines 213 to 219
220## CLI store build
222CLI 0.10.0 supports local store construction, export, and writer-lock status.
223The following templates were checked against source, not executed:
225```bash
226gtars refget build reference.fa reference-alt.fa.gz \
227 --output approved-store \
228 --jobs 1
229```
231Options:
233- `--file-list/-f PATH`: file of paths/globs/directories;
234- `--output/-o DIR`: required;
235- `--jobs/-j N`: concurrent FASTA files, default `0` (auto);
236- `--raw`: raw instead of default alphabet-dependent encoded storage;
237- `--force`: overwrite existing entries;
238- `--collection-alias NAMESPACE:ALIAS`: name one input FASTA's collection;
239- `--lock-timeout SECONDS`: bounded wait for writer contention (default 1800).
241```bash
242gtars refget lock-status approved-store
243gtars refget export --store approved-store --collection local:reference \
244 --names chr1 --output chr1.fa.gz --line-width 80
245```
247Export defaults to the sole collection when `--collection` is omitted and
248otherwise accepts a digest or alias. It loads selected sequences into RAM;
249restrict `--names`, account for sequence bytes, and refuse an existing output.
250The output extension `.gz` enables gzip. `--force-unlock` can break an active
251writer's protection; inspect lock status and confirm the holder is gone before
252using the recovery operation. `--force-alias` replaces conflicting aliases.
254There is no current `gtars refget digest` or `verify` CLI matching the old skill.
255Use the Python digest functions, direct Rust API, or a local store build after
256preflight.

CLI store build

CLI 0.10.0 supports local store construction, export, and writer-lock status. The following templates were checked against source, not executed:

gtars refget build reference.fa reference-alt.fa.gz \
  --output approved-store \
  --jobs 1

Options:

  • --file-list/-f PATH: file of paths/globs/directories;
  • --output/-o DIR: required;
  • --jobs/-j N: concurrent FASTA files, default 0 (auto);
  • --raw: raw instead of default alphabet-dependent encoded storage;
  • --force: overwrite existing entries;
  • --collection-alias NAMESPACE:ALIAS: name one input FASTA's collection;
  • --lock-timeout SECONDS: bounded wait for writer contention (default 1800).
gtars refget lock-status approved-store
gtars refget export --store approved-store --collection local:reference \
  --names chr1 --output chr1.fa.gz --line-width 80

Export defaults to the sole collection when --collection is omitted and otherwise accepts a digest or alias. It loads selected sequences into RAM; restrict --names, account for sequence bytes, and refuse an existing output. The output extension .gz enables gzip. --force-unlock can break an active writer's protection; inspect lock status and confirm the holder is gone before using the recovery operation. --force-alias replaces conflicting aliases.

There is no current gtars refget digest or verify CLI matching the old skill. Use the Python digest functions, direct Rust API, or a local store build after preflight.

Raw lines 220 to 257
258## Offline metadata/digest plan
260The bundled helper accepts a conservative local policy manifest:
262```json
264 "schema_version": "1.0",
265 "assembly": "GRCh38.p14",
266 "coordinate_system": "0-based-half-open",
267 "collection_digest": "<32-char sha512t24u-like value>",
268 "sequences": [
269 {
270 "name": "chr1",
271 "length": 248956422,
272 "sha512t24u": "<32-char digest>",
273 "md5": "<32 lowercase hex>"
274 }
275 ]
277```
279This is a **skill policy manifest**, not an upstream refget wire schema. Validate
280it and optionally recompute sequence-level digests from local FASTA:
282```bash
283python3 -B scripts/refget_digest_plan.py \
284 --metadata refget-metadata.json \
285 --fasta reference.fa.gz \
286 --assembly GRCh38.p14
287```
289The helper does not recompute the sequence-collection digest; it validates its
290shape and verifies each listed local sequence's length, sha512t24u, and MD5.
291Use Gtars' pinned collection implementation for final seqcol verification.

Offline metadata/digest plan

The bundled helper accepts a conservative local policy manifest:

{
  "schema_version": "1.0",
  "assembly": "GRCh38.p14",
  "coordinate_system": "0-based-half-open",
  "collection_digest": "<32-char sha512t24u-like value>",
  "sequences": [
    {
      "name": "chr1",
      "length": 248956422,
      "sha512t24u": "<32-char digest>",
      "md5": "<32 lowercase hex>"
    }
  ]
}

This is a skill policy manifest, not an upstream refget wire schema. Validate it and optionally recompute sequence-level digests from local FASTA:

python3 -B scripts/refget_digest_plan.py \
  --metadata refget-metadata.json \
  --fasta reference.fa.gz \
  --assembly GRCh38.p14

The helper does not recompute the sequence-collection digest; it validates its shape and verifies each listed local sequence's length, sha512t24u, and MD5. Use Gtars' pinned collection implementation for final seqcol verification.

Raw lines 258 to 292
Runs code scripts/refget_digest_plan.py :283
293## BEDbase and `bbcache`
295BEDbase caching is separate from refget. In CLI 0.10.0:
297```text
298gtars bbcache cache-bed
299gtars bbcache cache-bedset
300gtars bbcache seek
301gtars bbcache inspect-bedfiles
302gtars bbcache inspect-bedsets
303gtars bbcache rm
304```
306Defaults from tagged source:
308- API: `BEDBASE_API`, otherwise `https://api.bedbase.org`;
309- cache: `BBCLIENT_CACHE`, otherwise `$HOME/.bbcache/` (or `/tmp/.bbcache/`);
310- cached BEDs: `bedfiles/<first>/<second>/<id>.bed.gz`;
311- BED sets: `bedsets/<first>/<second>/<id>.txt`;
312- cache metadata includes SQLite state through the cache dependency.
314Constructing `BBClient` creates the root and BED/BED-set subdirectories, even for
315inspection/seek. `cache-bed` accepts a local file/directory, URL, or intended
316BEDbase identifier; `cache-bedset` accepts a local directory/list or intended
317BEDbase ID. `rm` deletes files and cache records and can remove member BEDs for a
318BED set.
320Important source finding: the 0.10.0 release's `BBClient.load_bed(id)` delegates a bare ID
321to `RegionSet::try_from`, while the core source has the bare-BEDbase-ID fallback
322commented out. Therefore, ID-only `cache-bed`/BED-set downloads may fail in this
323release even though the public docs claim support. Do not work around this with
324guessed URLs. Verify the installed help/behavior on a non-sensitive approved
325test, or resolve an explicit official file URL through reviewed BEDbase metadata.
327The `gtars-bbcache 0.5.4` source requests
328`GET /v1/bedset/{bedset_id}/bedfiles`, without authentication headers, query
329parameters, or a request body; it extracts string IDs from JSON `results[].id`.
330It neither checks pagination nor follows another page, and malformed member
331records are filtered out. Thus a returned list must not be assumed complete.
332The live OpenAPI probe was blocked (HTTP 403); current server pagination and
333response compatibility were not independently exercised. Consult the
334[official API guide](https://docs.bedbase.org/bedbase/user/bedbase-api-user-guide/)
335for record/object distinctions and resolve explicit file URLs before local use.
337The bbcache source does not expose an expected SHA-256/revision parameter. Treat
338downloads as untrusted:
340- approve and allowlist `api.bedbase.org` and any exact data host separately;
341- record BEDbase record ID, API response revision/time, explicit file URL,
342 expected identifier/digest, and SHA-256;
343- use an explicit quota-limited cache folder;
344- validate BED assembly/bounds/content before indexing;
345- never rely on a successful cache write as integrity proof.

BEDbase and bbcache

BEDbase caching is separate from refget. In CLI 0.10.0:

gtars bbcache cache-bed
gtars bbcache cache-bedset
gtars bbcache seek
gtars bbcache inspect-bedfiles
gtars bbcache inspect-bedsets
gtars bbcache rm

Defaults from tagged source:

  • API: BEDBASE_API, otherwise https://api.bedbase.org;
  • cache: BBCLIENT_CACHE, otherwise $HOME/.bbcache/ (or /tmp/.bbcache/);
  • cached BEDs: bedfiles/<first>/<second>/<id>.bed.gz;
  • BED sets: bedsets/<first>/<second>/<id>.txt;
  • cache metadata includes SQLite state through the cache dependency.

Constructing BBClient creates the root and BED/BED-set subdirectories, even for inspection/seek. cache-bed accepts a local file/directory, URL, or intended BEDbase identifier; cache-bedset accepts a local directory/list or intended BEDbase ID. rm deletes files and cache records and can remove member BEDs for a BED set.

Important source finding: the 0.10.0 release's BBClient.load_bed(id) delegates a bare ID to RegionSet::try_from, while the core source has the bare-BEDbase-ID fallback commented out. Therefore, ID-only cache-bed/BED-set downloads may fail in this release even though the public docs claim support. Do not work around this with guessed URLs. Verify the installed help/behavior on a non-sensitive approved test, or resolve an explicit official file URL through reviewed BEDbase metadata.

The gtars-bbcache 0.5.4 source requests GET /v1/bedset/{bedset_id}/bedfiles, without authentication headers, query parameters, or a request body; it extracts string IDs from JSON results[].id. It neither checks pagination nor follows another page, and malformed member records are filtered out. Thus a returned list must not be assumed complete. The live OpenAPI probe was blocked (HTTP 403); current server pagination and response compatibility were not independently exercised. Consult the official API guide for record/object distinctions and resolve explicit file URLs before local use.

The bbcache source does not expose an expected SHA-256/revision parameter. Treat downloads as untrusted:

  • approve and allowlist api.bedbase.org and any exact data host separately;
  • record BEDbase record ID, API response revision/time, explicit file URL, expected identifier/digest, and SHA-256;
  • use an explicit quota-limited cache folder;
  • validate BED assembly/bounds/content before indexing;
  • never rely on a successful cache write as integrity proof.
Raw lines 293 to 346
347## Rust pin
349For the newer direct Rust component (source-reviewed; not compiled here):
351```toml
352[dependencies]
353gtars-refget = "=0.11.0"
354```
356For the 0.10.0 wrapper release set:
358```toml
359[dependencies]
360gtars = { version = "=0.10.0", default-features = false, features = ["refget"] }
361```
363These are different minor versions. In direct refget 0.11.0,
364`list_sequences()` returns `Result<Vec<_>>`; handle its error. It also adds Zstd
365storage and changes loading behavior. Do not substitute the direct 0.11 API for
366the Python 0.10 wheel contract. The wrapper uses compatible dependency ranges;
367retain Cargo.lock to record actual component versions.

Rust pin

For the newer direct Rust component (source-reviewed; not compiled here):

[dependencies]
gtars-refget = "=0.11.0"

For the 0.10.0 wrapper release set:

[dependencies]
gtars = { version = "=0.10.0", default-features = false, features = ["refget"] }

These are different minor versions. In direct refget 0.11.0, list_sequences() returns Result<Vec<_>>; handle its error. It also adds Zstd storage and changes loading behavior. Do not substitute the direct 0.11 API for the Python 0.10 wheel contract. The wrapper uses compatible dependency ranges; retain Cargo.lock to record actual component versions.

Raw lines 347 to 368
369## Official sources (accessed 2026-10-01)
371- [Direct refget 0.11.0 release](https://github.com/databio/gtars/releases/tag/gtars-refget-v0.11.0)
372- [Python refget 0.10.0 stubs](https://github.com/databio/gtars/blob/gtars-python-v0.10.0/gtars-python/py_src/gtars/refget/__init__.pyi)
373- [Python 0.10.0 release](https://github.com/databio/gtars/releases/tag/gtars-python-v0.10.0)
374- [gtars-refget 0.11.0 crate](https://crates.io/crates/gtars-refget)
375- [Gtars refget module guide](https://docs.bedbase.org/gtars/refget/)
376- [Gtars Python refget API](https://docs.bedbase.org/gtars/python/refget-api/)
377- [CLI refget parser](https://github.com/databio/gtars/blob/gtars-v0.10.0/gtars-cli/src/refget/cli.rs)
378- [BEDbase cache source](https://github.com/databio/gtars/tree/gtars-v0.10.0/gtars-bbcache)
379- [BEDbase caching guide](https://docs.bedbase.org/gtars/bbcache/)
380- [GA4GH refget sequences v2](https://ga4gh.github.io/refget/sequences)
381- [GA4GH refget sequence collections](https://ga4gh.github.io/refget/seqcols/)