Skip to content

4.6.2 Gene coverage

Function

rpf_Coverage and rpf_Percent evaluate gene-body coverage from a merged density table.

rpf_Coverage rescales 5'UTR, CDS, and 3'UTR regions into fixed bin numbers and generates metagene coverage profiles. rpf_Percent calculates the percentage of covered positions for each gene and draws coverage distribution plots.

Input files

Input Required Description
Merged density table Yes RPF or RNA density table generated by rpf_Merge, usually RIBO_merged.txt or RNA_merged.txt.
Normalized transcript annotation Yes Transcript annotation file, usually gene.norm.txt, containing transcript IDs and region length information.

rpf_Coverage parameters

Parameter Required Description
-t Yes Input normalized transcript annotation file in TXT format.
-r Yes Input RPF or RNA density table in TXT format.
-o Yes Output prefix. Although the parser does not enforce this option, the current implementation uses it directly when writing files.
-f No Reading frame used for coverage calculation. Choices: 0, 1, 2, all. Default: all.
-m No Retain transcripts with more than this minimum number of RPFs. Default: 50.
-b No Comma-separated bin numbers for 5'UTR, CDS, and 3'UTR. Default: 30,100,30.
-n No Normalize read counts to RPM before coverage calculation. Disabled by default.
--thread No Number of worker processes used when filtering outliers. Default: 1.
--outlier No Replace outlier coverage values before calculating mean coverage. Disabled by default.
--set No Gene set strategy for 5'UTR/CDS/3'UTR filtering. Choices: intersect, union. Default: union.
--heat No Draw per-sample coverage heatmaps. Disabled by default.
--bar No Draw per-sample coverage percentage barplots. Disabled by default.

rpf_Coverage output files

Assuming -o RIBO and -b 10,150,10, the command writes:

Output Description
RIBO_utr5_cds_utr3_mean_coverage_density.txt Mean binned coverage density table across 5'UTR, CDS, and 3'UTR.
RIBO_<sample>_coverage_line_plot.pdf / .png Per-sample metagene coverage line plot.
RIBO_<sample>_10_150_10_coverage.txt Per-gene binned coverage matrix. Generated with --heat.
RIBO_<sample>_10_150_10_heat_plot.png Per-sample coverage heatmap. Generated with --heat.
RIBO_utr5_cds_utr3_mean_coverage_percentage.txt Mean percentage of covered genes in each bin. Generated with --bar.
RIBO_<sample>_coverage_bar_plot.pdf / .png Per-sample coverage percentage barplot. Generated with --bar.

rpf_Coverage example

rpf_Coverage \
    -t ../../../1.reference/norm/gene.norm.txt \
    -r ../05.merge/RIBO_merged.txt \
    -m 50 \
    -b 10,150,10 \
    -f all \
    -n \
    --outlier \
    --heat \
    --bar \
    -o RIBO \
    &> RIBO.coverage.log

rpf_Percent parameters

Parameter Required Description
-t Yes Input normalized transcript annotation file in TXT format.
-r Yes Input RPF or RNA density table in TXT format.
-o Yes Output prefix. Although the parser does not enforce this option, the current implementation uses it directly when writing files.
-f No Reading frame used for coverage percentage calculation. Choices: 0, 1, 2, all. Default: all.
-m No Retain transcripts with more than this minimum number of RPFs. Default: 50.
-n No Normalize read counts to RPM before calculating gene coverage percentage. Disabled by default.

rpf_Percent output files

Assuming -o RIBO, the command writes:

Output Description
RIBO_gene_coverage_percent.txt Per-gene coverage percentage table for each sample.
RIBO_<sample>_coverage_histogram.pdf / .png Histogram of gene coverage percentage and expression abundance for each sample.
RIBO_coverage_boxplot.pdf / .png Boxplots summarizing coverage percentage and expression abundance across samples.

rpf_Percent example

rpf_Percent \
    -t ../../../1.reference/norm/gene.norm.txt \
    -r ../05.merge/RIBO_merged.txt \
    -m 50 \
    -f all \
    -n \
    -o RIBO \
    &> RIBO.percent.log

Notes

  • rpf_Coverage is useful for checking global read distribution along transcript regions.
  • rpf_Percent is useful for identifying transcripts or samples with sparse or biased coverage.
  • Use the same frame and normalization settings across samples when comparing coverage profiles.

Use merge_coverage to merge mean coverage tables from multiple groups or batches:

Parameters

Parameter Required Description
-l, --list Yes One or more coverage files, for example *_mean_coverage.txt or *_mean_coverage_density.txt.
-o Yes Output prefix. The merged table is written as <prefix>_mean_coverage.txt.

Example

merge_coverage \
    -l *_utr5_cds_utr3_mean_coverage_density.txt \
    -o merged_coverage