Skip to content

rpf_Shuffle

rpf_Shuffle generates shuffled RPF density tables that can be used as random controls for downstream analyses.

Function

Use this command to randomize RPF density values within transcript-level density records while keeping the RiboParser density-table structure. This is useful for building background controls for frame, codon, or positional analyses.

Input

The input should be a merged RPF density table generated by RiboParser, usually from rpf_Merge. The optional gene list should contain one transcript/gene ID per line.

Parameters

Parameter Required Meaning
-r yes Input merged RPF density file in TXT/TSV format.
-o yes Output prefix. The output file is written as <prefix>_shuffle.txt.
-l no Transcript/gene ID list file. If provided, only listed records are shuffled.
-s no Random seed. Default: 0. Use a fixed seed for reproducible shuffled controls.
-i no Shuffle RPF density independently for each sample. Default: disabled.

Output

The command writes one shuffled RPF density table:

<prefix>_shuffle.txt

The output keeps the standard RiboParser merged-density layout so it can be reused by downstream commands that accept merged RPF density tables.

Examples

Shuffle all transcripts with the default seed:

rpf_Shuffle \
  -r RIBO_merged.txt \
  -o RIBO

Shuffle selected transcripts only:

rpf_Shuffle \
  -r RIBO_merged.txt \
  -l target_gene_ids.txt \
  -s 123 \
  -o RIBO.targets

Shuffle each sample independently:

rpf_Shuffle \
  -r RIBO_merged.txt \
  -l gene.norm.txt \
  -s 0 \
  -i \
  -o RIBO.individual

Notes

  • Use the same -s value when you need exactly reproducible shuffled controls.
  • Use -i when each sample should have its own independent randomization.
  • Without -i, the command performs the default transcript-level shuffling strategy implemented by RiboParser.
  • The shuffled table is a control dataset; it should not replace the original RPF density table in biological interpretation.