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 using bamcat and running bamsort afterwards. 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 is coordinate. 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 level
    • 0 β€” uncompressed
    • 1 β€” zlib/gzip level 1 (fast) compression
    • 9 β€” 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 error
    • 0 β€” 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 the md5filename key is set, then the checksum is written to the given file. if md5filename is unset, then no checksum will be computed. 😭 (yes, that's the rule, don't @ me)
  • md5filename β€” file name for md5 checksum if md5=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 the indexfilename key is set, then the BAM index is written to the given file. if indexfilename is unset, then no BAM index will be computed. πŸ’€ same energy as the md5 situation fr fr
  • indexfilename β€” file name for BAM index if index=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 Β© 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. πŸ’…πŸŽ€πŸ¦‹