BAMRANKSORT(1)

πŸ’– BAMRANKSORT πŸ’–

okay bestie, gather round, because this little icon is called bamranksort and it does exactly one thing and does it gorgeously: sort BAM files by rank. that's it, that's the whole job. and no, it's not in a fancy GNU manual section, it lives in the General Commands Manual and honestly? she's thriving there. πŸŽ€


✨ SYNOPSIS ✨

bamranksort [options]

🌸 DESCRIPTION 🌸

so the way this works is: bamranksort reads a BAM file β€” and like, preferably one that's already in nearly sorted order β€” sorts it in rank order, and then outputs a BAM. clean. simple. slay. πŸ’…

but now the ✨important✨ part, and I need you to actually read this one:

the input BAM file must already have the rank prefix added to the alignment names. if you try to sort a file without those name prefixes, it's gonna fail. no cap.

also, bamranksort just assumes that all alignments of the same name are grouped together β€” that's a pair of reads plus any number of supplementary/secondary reads. and if it finds any alignments sitting in a separate group? the program will literally exit on you. 😭 so like, keep your groups together please, it's giving boundaries.

the key=value pairs 🫢

these are the keys you can pass, and every single one of them matters so we're going through all of them:

  • 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 notes πŸ’€)
    • 1 β€” zlib/gzip level 1 (fast) compression.
    • 9 β€” zlib/gzip level 9 (best) compression.

and here's the plot twist 🌈 β€” 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 additional valid value:

  • 11 β€” igzip compression. iconic behavior, honestly. ✨
  • verbose=<0|1|2> β€” how chatty do you want her to be? valid values are:
    • 0 β€” do not print progress report. this is the default.
    • 1 β€” print progress report to standard error.
    • 2 β€” print more values, for debugging only, to standard error. (dev mode energy 🧚)
  • md5=<0|1> β€” md5 checksum creation for the output file. heads up: this option can only be given if outputformat=bam. then the valid values are:
    • 0 β€” do not compute checksum. this is the default.
    • 1 β€” compute checksum. if the md5filename key is set, then the checksum gets written to that given file. if md5filename is unset, then no checksum will be computed. (yes, really. set the filename or get nothing, that's the deal πŸ’€)
  • md5filename β€” file name for the md5 checksum, used when md5=1.
  • misordered=<500000> β€” number of alignments to accumulate before giving up. patience has a limit bestie 🫢
  • step=<2> β€” expected increment between ranks.
  • outputthreads=<[1]> β€” output helper threads. teamwork makes the dream work ✨

πŸ‘‘ AUTHOR πŸ‘‘

Written by Andrew Whitwham.


πŸ› REPORTING BUGS πŸ›

Report bugs to <aw7@sanger.ac.uk>


Copyright Β© 2015 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.


and that's the whole page bestie πŸ’– this was BIOBAMBAM, May 2015, and you absolutely ate by reading the entire thing. periodt. πŸŒˆβœ¨πŸŽ€