optimize_sequence
Run the DnaChisel optimizer over the subject with real constraints/objectives (GC window, pattern avoidance, translation enforcement, …).
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "optimize_sequence"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| seed | No | base seed for the alternatives — the same seed returns the same set. 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. | |
| _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. | |
| candidates | No | how many alternative solutions to produce (1 = a single solve). Candidate 1 is the plain unseeded answer; the rest run at seed+1, seed+2, …, so a listed alternative can be asked for again. Max 12. | |
| objectives | No | DnaChisel objective specs — soft goals the solver maximises. Same `kind` values as constraints: EnforceTranslation, AvoidPattern, EnforceGCContent, AvoidHairpins, AvoidRareCodons, UniquifyAllKmers, CodonOptimize, EnforceSequence, AvoidChanges, EnforceChoice, EnforcePatternOccurence, AvoidStopCodons, EnforceMeltingTemperature, EnforceChanges, EnforceTerminalGCContent, SequenceLengthBounds, EnforceRbsStrength, AvoidHeterodimerization, AllowPrimer, EnforceRegionsCompatibility, AvoidMatches, AvoidBlastMatches. | |
| constraints | No | DnaChisel constraint specs, e.g. [{"kind":"EnforceGCContent","mini":0.4,"maxi":0.6,"window":50}] — hard requirements the solution must satisfy. Valid `kind` values: EnforceTranslation, AvoidPattern, EnforceGCContent, AvoidHairpins, AvoidRareCodons, UniquifyAllKmers, CodonOptimize, EnforceSequence, AvoidChanges, EnforceChoice, EnforcePatternOccurence, AvoidStopCodons, EnforceMeltingTemperature, EnforceChanges, EnforceTerminalGCContent, SequenceLengthBounds, EnforceRbsStrength, AvoidHeterodimerization, AllowPrimer, EnforceRegionsCompatibility, AvoidMatches, AvoidBlastMatches. | |
| randomization_threshold | No | DnaChisel `randomization_threshold` (default 10000). LOWER it to force the stochastic search: an objective-driven problem is deterministic, so without this every candidate comes back identical. Advanced. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| nEdits | Yes | nucleotides changed | |
| record | Yes | the optimized sequence as a record | |
| gcAfter | Yes | GC fraction after optimization | |
| success | Yes | all hard constraints satisfied | |
| caiAfter | Yes | CAI after optimization, or null when not computable (no codon table to score against): a 0 would read as the worst possible adaptation | |
| distinct | Yes | how many of the candidates are DIFFERENT sequences — 1 means the problem has a single answer, not that the run failed. The engine omits it for a single-candidate run, where it is 1 by definition | |
| sequence | Yes | the optimized sequence | |
| gcProfile | Yes | windowed GC before and after, at each window's centre: the stretches the solver moved, which the two whole-sequence GC numbers average away | |
| candidates | Yes | every alternative solution: its seed, sequence, edit count, GC and CAI — compare them before choosing. Empty unless `candidates` asks for more than one |