4.5.3 Offset table
Offset tables define how read positions are shifted to assign RNA-seq or Ribo-seq signal to transcript coordinates.
For Ribo-seq, accurate P-site offsets are essential for 3-nt periodicity, codon-level analysis, pausing analysis, and smORF evidence evaluation. RNA-seq normally uses a constant offset table.
rna_Offset
Function
rna_Offset creates a simple RNA-seq offset table by assigning a constant offset to all read lengths in a specified range.
| Input |
Description |
| Read length range |
Minimum and maximum read lengths used to construct the table. |
| Expected offset |
Constant offset applied to each retained read length. |
| Output prefix |
Prefix used to generate <prefix>_offset.txt. |
Parameters
| Parameter |
Required |
Description |
-o |
Yes |
Output prefix. The output table is <prefix>_offset.txt. |
-m |
No |
Minimum read length to keep. Default is 25. |
-M |
No |
Maximum read length to keep. Default is 151. |
-e |
No |
Expected constant offset. Default is 12. |
Output files
| Output |
Description |
<prefix>_offset.txt |
RNA-seq offset table. |
<prefix>.log |
Running log if redirected by the user. |
Example
rna_Offset \
-m 25 \
-M 150 \
-e 12 \
-o RNA \
&> RNA.log
rpf_Offset
Function
rpf_Offset predicts Ribo-seq P-site offsets from transcriptome BAM files. The command outputs start/stop codon-based offsets and ribosome-structure-based offsets.
| Input |
Description |
| BAM file |
Filtered transcriptome BAM file generated by rpf_Check. |
| Transcript annotation |
Normalized transcript annotation file, usually gene.norm.txt. |
| Expected RPF length |
Dominant footprint length used by the RSBM offset model. |
| Output prefix |
Sample-specific prefix. |
Parameters
| Parameter |
Required |
Description |
-t |
Yes |
Input transcript annotation file in TXT format. |
-b |
Yes |
Input BAM file. |
-o |
Yes |
Output prefix. |
-a |
No |
Alignment region used for offset detection. Choices are both, tis, and tts. Default is both. |
-l |
No |
Retain only the transcript with the longest CDS for each gene. Disabled by default. |
-m |
No |
Minimum read length to keep. Default is 27. |
-M |
No |
Maximum read length to keep. Default is 33. |
-p |
No |
Expected RPF length fitted to ribosome structure. Default is 30. |
-s |
No |
P-site shift for different RPF lengths. Default is 2. |
--silence |
No |
Suppress warning information. Disabled by default. |
-d |
No |
Output detailed offset end profiles. Disabled by default. |
Output files
| Output |
Description |
<prefix>_SSCBM_offset.txt |
Start/stop codon-based offset table. |
<prefix>_SSCBM_offset.pdf / <prefix>_SSCBM_offset.png |
SSCBM offset plot. |
<prefix>_SSCBM_offset_scale.pdf / <prefix>_SSCBM_offset_scale.png |
Scaled SSCBM offset plot. |
<prefix>_RSBM_offset.txt |
Ribosome-structure-based offset table. |
<prefix>_RSBM_offset.pdf / <prefix>_RSBM_offset.png |
RSBM offset plot. |
<prefix>_tis_5end.txt |
TIS-aligned 5' end distribution when -d is used. |
<prefix>_tis_3end.txt |
TIS-aligned 3' end distribution when -d is used. |
<prefix>_tts_5end.txt |
TTS-aligned 5' end distribution when -d is used. |
<prefix>_tts_3end.txt |
TTS-aligned 3' end distribution when -d is used. |
<prefix>.log |
Running log if redirected by the user. |
Example
for bam in ../01.check/*.bam
do
prefix_name=$(basename ${bam} .bam)
rpf_Offset \
-b ${bam} \
-t ../../../1.reference/norm/gene.norm.txt \
-o ${prefix_name} \
-m 27 \
-M 33 \
-p 30 \
-d \
&> ${prefix_name}.log
done
merge_offset
Merge SSCBM or RSBM offset tables from multiple samples.
| Parameter |
Required |
Description |
-l / --list |
Yes |
Input offset files, such as *_SSCBM_offset.txt or *_RSBM_offset.txt. Multiple files can be provided. |
-o |
Yes |
Output prefix. The output table is <prefix>_offset.txt. |
merge_offset \
-l *_SSCBM_offset.txt \
-o RIBO_SSCBM
merge_offset \
-l *_RSBM_offset.txt \
-o RIBO_RSBM
merge_offset_detail
Merge detailed TIS/TTS end-profile files generated with rpf_Offset -d.
| Parameter |
Required |
Description |
-l / --list |
Yes |
Input detailed offset end files, such as *_tis_5end.txt, *_tis_3end.txt, *_tts_5end.txt, and *_tts_3end.txt. |
-o |
Yes |
Output prefix. The output table is <prefix>_offset_end.txt. |
merge_offset_detail \
-l *_tis_5end.txt *_tis_3end.txt *_tts_5end.txt *_tts_3end.txt \
-o RIBO
Notes
rpf_Offset currently calculates both SSCBM and RSBM outputs; the older --mode option is commented out in the script.
- A reliable offset table should show a stable dominant P-site offset for biologically meaningful read lengths.
- Weak or flat TIS/TTS profiles may indicate poor periodicity, low read depth, or poor library quality.