CONVERT...OR-RSEM(1)

πŸ“¦
version 1.3.3 Β· 5 versions
, in ubuntu noble, ubuntu resolute

πŸ’– 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-rsem is gonna write a BAM called output_file_name.bam (yes, it slaps .bam on 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 suffixes K/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