From 578bfc37d4340b7c0860a2645928fbfe5d52f242 Mon Sep 17 00:00:00 2001 From: Wid-L-Hacker Date: Tue, 10 Nov 2026 13:51:26 -1000 Subject: [PATCH] Guide: note that numeric spellings of a sequence name share one GRI key --- docs/guide_gri.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/guide_gri.md b/docs/guide_gri.md index 747e0db..98a4f81 100644 --- a/docs/guide_gri.md +++ b/docs/guide_gri.md @@ -118,6 +118,8 @@ The three arguments following the table name tell the indexing procedure how to 2. The begin and end positions are read from named integer columns, or by computing simple arithmetic expressions thereof. 3. For example, if the table happens to have `beginPosition` and `featureLength` columns, the end position may be formulated `'beginPosition+featureLength'`. +**Note on text sequence names:** in the GRI, text names that spell the same number -- `'1'`, `'01'`, `'1.0'` -- are the same key, so a query for one spelling also returns rows filed under the others. Distinct sequences need names that are distinct as numbers too (the usual `'chr1'`-style names, or one consistent numeric spelling). Very long digit strings can likewise collide through floating-point rounding. Integer rid columns are unaffected: the column itself already stores such values as numbers. + **❗ The table name and expressions are textually pasted into a template SQL script. Take care to prevent SQL injection, if they're in any way determined by external input.** A last optional integer argument `floor` can be omitted or left at -1. GRI performance may be improved slightly by setting `floor` to a positive integer *F* if the following is true: the lengths of the indexed features are almost all >16*F*-1, with only very few outlier lengths ≤16*F*-1. For example, human exons are almost all >16nt; one may therefore set `floor=2` as a modest optimization for such data. YMMV