rpf_Retrieve¶
rpf_Retrieve retrieves selected transcript/gene records from a merged RPF density table and optionally filters, normalizes, reshapes, or splits the result.
Function¶
Use this command when you want to:
- keep only transcripts listed in a gene/transcript ID file;
- keep only transcripts with enough RPF counts;
- convert raw RPF counts to RPM;
- convert frame-specific columns into a longer table;
- export one retrieved file per gene/transcript.
Input¶
The input file should be a merged RPF density table generated by RiboParser, usually from rpf_Merge. The table is expected to contain the annotation columns followed by sample frame columns:
The optional gene list should be a plain text file with 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 main output is written as <prefix>_retrieve.txt. In the current implementation, provide this argument to avoid an empty output prefix. |
-l |
no | Transcript/gene ID list file. Each line should contain one ID. If omitted, filtering is only controlled by -m. |
-m |
no | Minimum total RPF count used to retain transcripts. Default: 0. |
-n |
no | Normalize RPF counts to RPM. Default: disabled. |
-f |
no | Convert frame-specific columns such as sample_f0, sample_f1, and sample_f2 into a longer table with frame information. Default: disabled. |
-s |
no | Split retrieved results into one TXT file per gene/transcript. Default: disabled. |
Output¶
When -s is not used, the command writes:
When -s is used, the command writes one file per gene/transcript:
If -n is enabled, the output values are RPM-normalized. If -f is enabled, the table is converted from frame-specific wide columns to a longer format that is easier to use for plotting or downstream summaries.
Examples¶
Retrieve transcripts with at least 50 RPF counts:
Retrieve a selected gene/transcript list:
Retrieve selected genes and normalize counts to RPM:
Convert the retrieved table to a longer frame-aware format:
Split retrieved transcripts into separate files:
Notes¶
- The command works on RiboParser merged RPF density tables, not directly on BAM files.
- Use
-lwhen you need a specific gene set, and use-mwhen you need expression/count-based filtering. -fis useful before drawing gene-level density profiles or combining frame information in downstream scripts.- In split mode, the per-gene output file names are based on gene/transcript IDs rather than the
-oprefix.