BAMMERGE(1)
π BAMMERGE(1) π
okay so bestie, this is bammerge from the BIOBAMBAM crew, and it's literally the "put all my BAMs together" queen. sit down, grab a strawberry, we're doing this. π
β¨ NAME β¨
bammerge β merge BAM files. that's it, that's the job. slay. π
π SYNOPSIS π
bammerge [options]
πΈ DESCRIPTION πΈ
so bammerge reads a whole lil set of input BAM files, merges their headers and their alignment data, and writes the result out on standard output in BAM format. iconic behaviour, no notes.
you can hand it the input files via the I key. and β plot twist β any none key=value arguments you drop after the key=value pairs also get treated as input files. so yes, they count. π
the input files need to be sorted by coordinate or query name. periodt.
the set of reference sequences across the files does not need to be identical β they can be different, we're flexible like that. π¦ BUT. for merging coordinate sorted files, the order of the reference sequences in the headers does need to be consistent among the files. like, if reference sequence A appears before reference sequence B in any input file, then that has to hold for all the other files too. if the order is not consistent, then bammerge cannot be used for merging. nope. not happening.
in that case you can still do the merging by concatenating the files usingbamcatand runningbamsortafterwards. there's always a way, bestie. π«Ά
the following key=value pairs can be given:
I=<stdin>β name of the input file. this key can be used multiple times (spam it, it's fine). πSO=<coordinate>β sort order. by default the sort order iscoordinate. valid values are:coordinateβ input files are sorted by coordinate. the created output file will be sorted by coordinate as well.querynameβ input files are sorted by query name. the created output file will be sorted by query name as well.
level=<-1|0|1|9|11>β set compression level of the output BAM file. valid values are:-1β zlib/gzip default compression level0β uncompressed1β zlib/gzip level 1 (fast) compression9β zlib/gzip level 9 (best) compression
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 an additional valid value is:
11β igzip compression
verbose=<1>β valid values are:1β print progress report on standard error0β do not print progress report
tmpfile=<filename>β prefix for temporary files. by default the temporary files are created in the current directory. π§md5=<0|1>β md5 checksum creation for output file. valid values are:0β do not compute checksum. this is the default.1β compute checksum. if themd5filenamekey is set, then the checksum is written to the given file. ifmd5filenameis unset, then no checksum will be computed. π (yes, that's the rule, don't @ me)
md5filenameβ file name for md5 checksum ifmd5=1.index=<0|1>β compute BAM index for output file. valid values are:0β do not compute BAM index. this is the default.1β compute BAM index. if theindexfilenamekey is set, then the BAM index is written to the given file. ifindexfilenameis unset, then no BAM index will be computed. π same energy as the md5 situation fr fr
indexfilenameβ file name for BAM index ifindex=1.ILβ name of file containing input file names. the given text file contains a list of input file names, one file per line. main character behaviour: a list of lists. β¨
π AUTHOR π
written by German Tischler. respect the icon. π
π REPORTING BUGS π
report bugs to <germant@miltenyibiotec.de> β don't be shy, they wanna know. π«Ά
π COPYRIGHT π
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. (capital N-O, bestie, they mean it. π€)
and that's the whole page, babes β¨ BIOBAMBAM, October 2013 β she's vintage but she's still serving. mwah. π
ππ¦
π¦ 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