4.5.5 Merge density
Function
Single-sample density files generated by rna_Density or rpf_Density must be merged before most multi-sample downstream analyses.
This page documents two commands:
merge_dst_list: build the sample list required by rpf_Merge.
rpf_Merge: merge all density files listed in the sample list into one matrix-like file.
merge_dst_list
Function
merge_dst_list creates a three-column sample list containing sample name, density file path, and density type.
| Input |
Description |
| Density files |
Single-sample *_rpf.txt or *_rna.txt files. File names must end with _rpf.txt or _rna.txt so the command can infer the sample type. |
Parameters
| Parameter |
Required |
Description |
-l / --list |
Yes |
Input density files. Multiple files can be provided. |
-o |
No |
Output sample list file. If omitted, the command writes RPF.file.list for Ribo-seq input or RNA.file.list for RNA-seq input. |
Output files
| Output |
Description |
RPF.file.list or RNA.file.list |
Default output sample list file when -o is not provided. |
| User-defined list file |
Output sample list file when -o is provided. |
Example
merge_dst_list \
-l ../04.density/*_rpf.txt \
-o RIBO.file.list
merge_dst_list \
-l ../04.density/*_rna.txt \
-o RNA.file.list
Name File Type
sample1 /path/to/sample1_rpf.txt Ribo
sample2 /path/to/sample2_rpf.txt Ribo
rpf_Merge
Function
rpf_Merge merges single-sample density files into a multi-sample density matrix. The merged file is used by periodicity, metaplot, coverage, correlation, gene-level, codon-level, and smORF modules.
| Input |
Description |
| Density list |
Sample list generated by merge_dst_list. |
Parameters
| Parameter |
Required |
Description |
-l |
Yes |
Input sample list file in TXT/TSV format. |
-o |
Yes |
Output prefix. The output file is <prefix>_merged.txt. |
Output files
| Output |
Description |
<prefix>_merged.txt |
Merged RNA-seq or Ribo-seq density matrix. |
<prefix>.log |
Running log if redirected by the user. |
Example
rpf_Merge \
-l RIBO.file.list \
-o RIBO \
&> RIBO.log
rpf_Merge \
-l RNA.file.list \
-o RNA \
&> RNA.log
Notes
- Check that sample names in the list file are unique.
- The merged output file is always named
<prefix>_merged.txt.
rpf_Merge removes rows whose codon column contains N.