Skip to content

4.5.9 Correlation

Function

rpf_Corr calculates sample correlation from a merged density file. It reports correlation at both gene level and nucleotide-position/RPF level, including frame-specific and frame-combined matrices.

This step is commonly used to evaluate replicate consistency and detect outlier samples.

Input files

Input Description
Merged density file Usually RIBO_merged.txt or RNA_merged.txt generated by rpf_Merge.
Output prefix Prefix used for correlation matrices and heatmaps.

Parameters

Parameter Required Description
-r Yes Input merged density file in TXT format.
-o Yes Output prefix.

Output files

Output Description
<prefix>_gene_corr_frame.txt Gene-level correlation matrix using all frames combined.
<prefix>_gene_corr_f0.txt Gene-level frame 0 correlation matrix.
<prefix>_gene_corr_f1.txt Gene-level frame 1 correlation matrix.
<prefix>_gene_corr_f2.txt Gene-level frame 2 correlation matrix.
<prefix>_gene_correlation_plot.pdf / <prefix>_gene_correlation_plot.png Gene-level correlation heatmap.
<prefix>_rpf_corr_frame.txt RPF-position-level correlation matrix using all frames combined.
<prefix>_rpf_corr_f0.txt RPF-position-level frame 0 correlation matrix.
<prefix>_rpf_corr_f1.txt RPF-position-level frame 1 correlation matrix.
<prefix>_rpf_corr_f2.txt RPF-position-level frame 2 correlation matrix.
<prefix>_rpf_correlation_plot.pdf / <prefix>_rpf_correlation_plot.png RPF-position-level correlation heatmap.
<prefix>.log Running log if redirected by the user.

Example

rpf_Corr \
    -r ../05.merge/RIBO_merged.txt \
    -o RIBO \
    &> RIBO.log

Notes

  • Biological replicates should usually show high correlation.
  • Low correlation may indicate batch effects, poor alignment, poor periodicity, low read depth, or strong biological heterogeneity.
  • Gene-level correlation summarizes CDS-level sample similarity, while RPF-position-level correlation is more sensitive to local density differences.