Bowtie/RSEM helpers¶
Bowtie/RSEM helpers summarize alignment logs and merge quantification tables from external tools.
Command summary¶
| Command | Function | Main output |
|---|---|---|
merge_bwt_log |
Merge Bowtie mapping logs and calculate read counts/ratios for sequential databases. | <prefix>_mapping.txt. |
merge_rsem |
Merge selected columns from RSEM result files. | Expression matrix. |
Bowtie helper¶
merge_bwt_log¶
Function¶
Summarize reads mapped to multiple sequential Bowtie databases, such as rRNA, tRNA, ncRNA, mRNA, and genome indexes. The command parses Bowtie log files, extracts the total number of reads, the number of reads reported as mapped to each database, and calculates the remaining reads as Others.
Parameters¶
| Parameter | Meaning |
|---|---|
-l, --list |
Bowtie mapping log files. Shell wildcards such as *log can be used. |
-o |
Output prefix. The final file is <prefix>_mapping.txt. |
-n, --name |
Comma-separated database names in the same order as the mapping logs were generated. Default: rRNA,tRNA,ncRNA,mRNA,Genome. |
Example¶
Output file:
Output columns:
Typical use case¶
When reads are sequentially aligned to contaminant and target databases, the helper can be used to build a mapping summary table:
Notes for merge_bwt_log¶
- The database names supplied with
-nmust match the order represented in each Bowtie log file. Othersis calculated asTotal - sum(mapped reads in listed databases).- The sample name is inferred from the log file basename before the first period.
RSEM helper¶
merge_rsem¶
Function¶
Merge one selected expression column from multiple RSEM result files into one matrix. Supported columns are expected_count, TPM, and FPKM.
Parameters¶
| Parameter | Meaning |
|---|---|
-l, --list |
RSEM result files, for example *.genes.results or *.isoforms.results. |
-o |
Output merged matrix file. |
-c, --column |
Column to merge: expected_count, TPM, or FPKM. Default: expected_count. |
Examples¶
Merge expected counts:
Merge TPM values:
Merge FPKM values:
Notes for merge_rsem¶
- Input files are read as tab-delimited tables with the first column as the row index.
- The output matrix keeps the RSEM target IDs as rows.
- Column names in the output are inferred from the input file names. Rename RSEM result files before merging if cleaner sample names are needed.