BAMSPLIT(1)

πŸ’– BAMSPLIT(1) β€” general commands manual, but make it cute πŸ’–

okay bestie, pull up a chair, because this one is genuinely iconic. it's bamsplit, from the General Commands Manual section, and it does exactly one thing and does it flawlessly. let's get into it πŸ’…


✨ NAME ✨

bamsplit β€” split BAM files. that's it, that's the whole job, and she ate πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

bamsplit [options]

no positional args, no drama, just vibes and options 🫢


🌸 DESCRIPTION 🌸

so here's the tea β˜• β€” bamsplit reads a BAM file via standard input and then creates a whole little family of output files, where each one has at most a given number of alignments in it. like a girl dividing up her friend group for a group chat, except every single one of them is still in the same lore πŸ’–

and the slay part? if you concatenate all those output files back together using bamcat, you get the exact same sequence of alignments as the original input file. nothing lost, nothing reordered, full restoration, main character energy πŸ‘‘

⚠️ okay but real talk β€” the splitting does not consider read pairs. meaning the two ends of a pair can absolutely end up in separate files. she does not care. she will not be checking. 😭

now, the following key=value pairs can be given:

  • n=<65536> β€” how many alignments go into each output file. that's the magic number, bestie πŸ’«
  • prefix=<filename> β€” the prefix for the files she creates. the files she makes will be named ${prefix}_000000.bam, ${prefix}_000001.bam, etc. so like, numbered, sequential, organized, very type A of her πŸŽ€
  • level=<-1|0|1|9|11> β€” sets the compression level of the output BAM file. valid values are:
    • -1 β€” zlib/gzip default compression level
    • 0 β€” uncompressed (raw, unfiltered, no filter, just her being her πŸ’€)
    • 1 β€” zlib/gzip level 1 (fast) compression
    • 9 β€” zlib/gzip level 9 (best) compression

and here's the extra part πŸ‘€ β€” if libmaus has been compiled with support for igzip (see https://software.intel.com/en-us/articles/igzip-a-high-performance-deflate-compressor-with-optimizations-for-genomic-data), then there's one more valid value:

  • 11 β€” igzip compression ⚑
  • verbose=<1> β€” valid values are:
    • 1 β€” print progress report on standard error
    • 0 β€” do not print progress report

so if you want the little running commentary, keep it at 1. if you want peace and quiet, 0. iykyk 🌈


πŸ‘‘ AUTHOR πŸ‘‘

Written by German Tischler. periodt. πŸ’œ


πŸ’€ REPORTING BUGS πŸ’€

found a bug? do not suffer in silence, bestie. Report bugs to <germant@miltenyibiotec.de> πŸ“©


Copyright Β© 2009-2013 German Tischler, Β© 2011-2013 Genome Research Limited. License GPLv3+: GNU GPL version 3 <http://gnu.org/licenses/gpl.html>

This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. (yes she's free, yes she's generous, no she will not be held liable, no cap πŸ™ˆ)


and that's the whole page, babes ✨ this was BIOBAMBAM, October 2013 β€” yeah she's vintage, she's a classic, she's still serving πŸ’…πŸŽ€πŸ’–