@@ -122,6 +122,27 @@ def mount_bgen(vcz_url, mount_dir, basename, access_log_path, **kwargs):
122122 fixed-size blocks) so byte-range random access into the mounted
123123 ``.bgen`` is O(1).
124124
125+ BGEN tuning parameters:
126+
127+ \b
128+ * ``--total-string-length`` (default 64) is the combined byte budget
129+ per variant for the five BGEN string slots (varid + rsid + chrom +
130+ allele1 + allele2). Every variant block reserves exactly this many
131+ bytes for the string section, which is what makes the mounted
132+ ``.bgen`` byte-offset-addressable. The defaults are tuned for
133+ biobank biallelic SNP arrays where rsids, single-base alleles, and
134+ short contig names fit comfortably. Raise it when the input has
135+ long indel alleles, long contig names (e.g.
136+ ``chrUn_KI270742v1``), or non-rsid variant IDs that would
137+ otherwise overflow the budget — if any variant's actual string
138+ content sums past ``total_string_length - 1`` the encoder raises
139+ a ``ValueError`` at read time.
140+ * ``--pad-byte`` (default ``.``) fills the slack inside each
141+ variant's padding string after the leading ``.``. The default
142+ makes the padding indistinguishable from the leading delimiter;
143+ override it (e.g. ``--pad-byte X``) only when you want the
144+ boundary visible in a hex dump for debugging.
145+
125146 The mount runs in the foreground until interrupted with Ctrl-C.
126147 """
127148 opts = vcztools .ViewBgenOptions .from_click_kwargs (kwargs )
0 commit comments