CONVERT...OR-RSEM(1)
π convert-sam-for-rsem β the glow-up your alignment file deserves π
okay bestie, so this is a page from the User Contributed Perl Documentation section of the manual, and it's literally about turning your aligner's messy little SAM/BAM/CRAM into a BAM that RSEM can actually read. it's giving β¨file format transformationβ¨ and honestly? iconic. π¦
πΈ NAME πΈ
convert-sam-for-rsem β make a RSEM compatible BAM file. that's the whole job. that's the vibe. π
β¨ SYNOPSIS β¨
convert-sam-for-rsem [options] <input.sam/input.bam/input.cram> output_file_name
π ARGUMENTS π
input.sam/input.bam/input.cramβ the SAM/BAM/CRAM file your aligner spit out. and listen, this file has to have a header section in it. no header, no service, periodt. πoutput_file_nameβ what you wanna name the converted file.convert-sam-for-rsemis gonna write a BAM calledoutput_file_name.bam(yes, it slaps.bamon the end itself, so don't do it for it, bestie π«Ά).
π OPTIONS π
-p/--num-threads <int>β tell it how many threads to use while converting. (default:1β like, one single thread, living its solo main character life π)--memory-per-thread <string>β sets the max memory allowed per thread. that<string>is a memory amount, and it accepts the suffixesK/M/G. (default:1G) π-h/--helpβ shows you the help info. when in doubt, ask for help, that's growth. πΈ
π¦ DESCRIPTION π¦
so here's the tea β β this program converts the SAM/BAM/CRAM file your aligner made into a BAM file that RSEM can process. easy enough, right?
but!! before you get comfy, you have to make sure your aligner used reference_name.idx.fa (the one generated by rsem-prepare-reference) as its references, and that it output header sections. no cap, both of those matter. π₯
once the conversion is done, this program calls rsem-sam-validator to validate the resulting BAM file. it checks its work, we love a queen with follow-through. π
lowkey important note: you do not need to run this script if rsem-sam-validator already reports that your SAM/BAM/CRAM file is valid. if it's valid, it's valid, bestie β go do something else with your day. π
π EXAMPLES π
say your input is input.sam and your output file name is output:
convert-sam-for-rsem input.sam output
boom. we will get a file called output.bam as the output. ate and left no crumbs. π
β¨
this lil page is from perl v5.38.2, dated 2024-04-14 β yeah she's been around a minute but she still eats πβ
π¦ where this page comes from
- ubuntu noble: rsem 1.3.3+dfsg-3build1 Β· GPL-3.0-only
- ubuntu resolute: rsem 1.3.3+dfsg-3build1 Β· GPL-3.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms