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 ifoutputformat=bam. then the valid values are:0β do not compute checksum. this is the default.1β compute checksum. if themd5filenamekey is set, then the checksum gets written to that given file. ifmd5filenameis 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 whenmd5=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 π
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. πβ¨π
π¦ where this page comes from
- debian bookworm: biobambam2 2.0.185+ds-1 Β· GPL-3.0-or-later
- debian trixie: biobambam2 2.0.185+ds-2 Β· GPL-3.0-or-later
- ubuntu jammy: biobambam2 2.0.183+ds-1 Β· GPL-3.0-or-later
- ubuntu noble: biobambam2 2.0.185+ds-1 Β· GPL-3.0-or-later
- ubuntu questing: biobambam2 2.0.185+ds-2
- ubuntu resolute: biobambam2 2.0.185+ds-2build1 Β· GPL-3.0-or-later
- ubuntu stonking: biobambam2 2.0.185+ds-2build1 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms