4.7 Codon-level analysis¶
Codon-level analysis summarizes ribosome profiling signal at codon resolution. These modules are useful for studying codon pausing, codon occupancy, codon decoding time, codon selection time, coverage-dependent variation, local meta-codon profiles, and differential codon enrichment between experimental groups.
Required upstream results¶
Before running codon-level analysis, make sure that the upstream Ribo-seq results have passed the basic quality-control steps:
- A reliable offset table has been generated and used for RPF density construction.
- The selected reads show clear 3-nt periodicity.
- CDS enrichment is reasonable.
- The merged RPF density table has enough reads for the selected genes.
- Biological replicates show acceptable reproducibility.
Most codon-level modules use the merged density table generated by rpf_Merge, for example:
For CDT and CST analysis, a matched RNA-seq density table is also required:
Submodules¶
| Section | Command | Purpose |
|---|---|---|
| 4.7.1 codon pausing scores | rpf_Pausing |
Calculate relative codon pausing scores from codon-level RPF density. |
| 4.7.2 codon occupancy | rpf_Occupancy |
Calculate absolute and relative codon occupancy. |
| 4.7.3 codon decoding time | rpf_CDT |
Estimate codon decoding time by combining Ribo-seq and RNA-seq density. |
| 4.7.4 codon selection time | rpf_CST |
Estimate codon selection time using iterative Ribo-seq/RNA-seq codon-level calculations. |
| 4.7.5 coefficient of variation | rpf_CoV |
Quantify coefficient of variation across CDS regions. |
| 4.7.6 cumulative CoV | rpf_Cumulative_CoV |
Quantify cumulative coefficient of variation along the CDS. |
| 4.7.7 codon metaplot | rpf_Meta_Codon |
Extract and plot local RPF density around selected codons or codon motifs. |
| 4.7.8 codon odd ratio | rpf_Odd_Ratio |
Compare codon-associated RPF enrichment between control and treatment samples. |
| 4.7.9 codon pause site | rpf_PSplot |
Visualize the detected local pause sites on the raw RPF profiles. |
Suggested directory structure¶
The codon-level modules are organized under sce/4.ribo-seq/5.riboparser/ (see the project layout in 3 New project). Sub-directories 01.qc to 10.quantification are created by the quality-control and gene-level modules; create the codon-level ones (11–19, matching the 4.7.1–4.7.9 sections above) as follows:
mkdir -p 11.pausing_score 12.codon_occupancy 13.codon_decoding_time \
14.codon_selection_time 15.coefficient_of_variation 16.cumulative_of_cov \
17.meta_codon 18.odd_ratio 19.pause_site_plot
Input dependency¶
Most codon-level modules consume the merged RPF density matrix produced by rpf_Merge in 05.merge (see 4.5.5 Merge density); only rpf_CDT and rpf_CST additionally require a matched merged RNA density matrix from the RNA-seq branch. The per-module input and output are summarized below:
| Section | Main input | Main output |
|---|---|---|
| Pausing | merged RPF density (-r) |
relative codon pausing scores; per-sample tables and figures |
| Occupancy | merged RPF density (-r) |
absolute and relative codon occupancy tables |
| CDT | merged RPF density (--rpf) + merged RNA density (--rna) |
codon decoding-time tables, sample correlation, heatmaps, and rank plots |
| CST | merged RPF density + merged RNA density | codon selection-time tables and figures |
| CoV | merged RPF density (-r); optional sample-group table (-g) |
transcript CoV tables, group comparison/fitting tables, and plots |
| Cumulative CoV | merged RPF density (-r); optional transcript list (-l) |
meta cumulative-CoV tables, meta/support curves, and per-transcript figures |
| Codon metaplot | merged RPF density (-r); optional codon/motif list (-c) |
per-motif meta density and sequence-context tables and line plots |
| Odd ratio | merged RPF density (-r) + control and treatment sample names (-c/-t) |
site-level local-pause table, codon-level summary, and figures |
| Pause-site plot | rpf_Odd_Ratio site table (-i) + merged RPF density (-r); optional target gene list (--target-list) |
per-gene, per-sample PSplot figures; optional pause-metrics table (--export-metrics) |
Note that rpf_PSplot depends on the site-level table written by rpf_Odd_Ratio, so run section 4.7.8 before 4.7.9. For modules that support two input formats, both the compact JSONL/JSONL.GZ file (for example sce_rpf_merged.jsonl.gz) and the plain TXT table are accepted.
Notes¶
- Use the same offset and frame-selection strategy across modules when results need to be compared.
- For high-quality Ribo-seq data, frame
0is commonly used after offset correction, butallcan be useful during exploratory analysis. - Parameters such as
--tis,--tts, and--stophelp avoid start/stop-proximal artifacts. - Codon-level statistics are sensitive to low coverage, so choose
-mcarefully according to sequencing depth and study design.