codon_usage_analysis
Codon-usage analysis of an in-frame CDS: CAI / expression stats, GC, and every rare-codon occurrence for the chosen organism (pydna port), plus the two bias measures that need NO reference table — ENC (Wright 1990) and RCBS (Roymondal 2009), which are therefore computable for any organism.
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": "codon_usage_analysis"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| table | No | score CAI and rare codons against a codon-usage table this project holds, BY NAME, as the Codon Usage panel lists it — any organism, not just the two pydna curates. Takes precedence over `organism`, and switches the rare-codon call from pydna's curated list to `rare_threshold`. Leave unset for the curated pydna report, which is the only arm carrying start/stop weights and the N-end half-life. | |
| _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. | |
| feature | No | score this annotated CDS or gene by NAME instead of the selection (the panel's "A CDS / feature…" mode). Its own strand is used unless `reverse` says otherwise. | |
| reverse | No | read the region as the reverse complement. Leave unset to take the strand from the annotation when the selection is exactly an annotated CDS or gene, which is what the panel does. | |
| _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. | |
| organism | No | reference organism for CAI weights + rare codons. Only some organisms carry CAI weights; the rest still get the rare-codon scan + GC. | sce |
| enc_pairs | No | count codon PAIRS rather than single codons for ENC (k-mer 2) — bias in the junctions rather than in the codons. | |
| rcbs_mean | No | how the per-codon RCBS weights are averaged. Roymondal 2009 uses the geometric mean. Values: geometric (Geometric (Roymondal 2009)), arithmetic (Arithmetic). | geometric |
| rare_threshold | No | a codon is rare when its relative adaptiveness w = f/f_max falls below this. 0.30 is GenScript GenRCA's CFD cutoff, a convention rather than a measurement, so retune it per host. Only applies when table is set. | |
| rcbs_directional | No | RCBS weights taken as max(observed/expected, expected/observed), so under-use counts as bias too rather than only over-use. | |
| enc_bg_correction | No | correct ENC for the sequence's own base composition (Novembre 2002). Off is Wright's 1990 ENC, which reads GC-rich genes as more biased than they are. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| gc | Yes | GC fraction (0–1) | |
| cai | Yes | Codon Adaptation Index, or null when nothing could be scored — check `caiAvailable` before comparing it, and `referenceTable` before comparing two runs | |
| enc | Yes | effective number of codons, 20 (one per residue) to 61 (uniform) — needs no reference table | |
| rcbs | Yes | relative codon bias vs the sequence's own base composition; 0 = as predicted — needs no reference table | |
| codons | Yes | number of codons | |
| region | Yes | what was actually measured — the selection when there is one, otherwise the whole record, naming the STRAND and where it came from | |
| report | Yes | the full codon report | |
| codonMap | Yes | how often each of the 64 codons occurs in the measured region, laid out as the genetic-code chart: rows are the first two bases, columns the third | |
| rareHits | Yes | every rare-codon occurrence with its position | |
| rareBasis | Yes | `curated` (pydna's published low-usage list for this organism — `rare_threshold` did not apply) or `threshold` (relative adaptiveness below `rare_threshold`). Rare counts from the two are different claims and do not compare | |
| caiAvailable | Yes | whether a CAI could be computed at all. FALSE means `cai` is null because there was no reference to score against, NOT that adaptation is poor | |
| rareFraction | Yes | fraction of codons that are rare (0–1) | |
| strandSource | Yes | `explicit` (you passed `reverse`), `feature` (taken from the annotation the selection matches) or `default` (forwards, nothing said otherwise) | |
| referenceTable | Yes | the project table CAI was scored against, or empty when the curated pydna organism answered |