design_free_codes
Generate INDEL-correcting barcodes — FREE divergence codes (Hawkins et al., PNAS 2018) — by reserving each codeword's error sphere over the whole 4^k space, so the guarantee survives an insertion or deletion rather than only a substitution. Or prune a set you already own down to a valid FREE code, and see which members' decode spheres collided. This is a different construction from design_barcodes' distance-based search, and answers a different question: a Levenshtein-distance set corrects indels between two barcodes, a FREE code corrects them in the read.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | generate a new code, or prune an existing set down to a valid one. Values: generate (Generate a code), prune (Prune a set to a valid code). | generate |
| limit | No | stop after this many codewords. 0 = take the whole code. Advanced. | |
| _files | No | The project: record references shaped like _subject. Their records become library documents a tool names in sequences/parts/document; a trace or alignment is found by file name. | |
| length | No | barcode length k. The search is over the whole 4^k space, so cost rises steeply with it. | |
| max_gc | No | reject a candidate above this GC fraction. 0 = no limit. Advanced. | |
| _subject | No | The record to act on: exactly one of sequence, accession (+source), sample (an id from list_samples) or file ({name, text} or {name, base64}); record_index picks one record of several. | |
| barcodes | No | the set to prune — required when `mode` is `prune`, ignored when generating. Only applies when mode is prune. | |
| reserved | No | codewords already in use, whose decode spheres are claimed BEFORE generation — this is how a code is EXTENDED rather than regenerated, so what comes back is compatible with the indexes a lab already owns. | |
| max_errors | No | how many insertions/deletions/substitutions each codeword must tolerate. Each extra error costs most of the code. | |
| max_homopolymer | No | reject a candidate with a run of this many identical bases. 0 = no limit. Advanced. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| count | Yes | how many codewords came back | |
| dropped | Yes | prune only: the codewords removed because their decode spheres collided — a user pruning their own set needs to know which indexes to stop using, not how many | |
| barcodes | Yes | the codewords — generated, or the ones that survived pruning |