BAMMASKFLAGS(1)

πŸ’… bammaskflags β€” bestie edition

ok so welcome to the manual for bammaskflags, from the General Commands Manual section (section 1, obvi, it's a command). grab a boba, we're doing flags today. πŸ§‹βœ¨


✨ NAME ✨

bammaskflags β€” remove flags from alignments πŸ’…

like, it takes flags OFF. snip snip. not adding, not editing, just removing. it's giving "you're not invited to the alignment anymore" energy.


🌸 SYNOPSIS 🌸

bammaskflags [options]

no positional args bestie, it's all about the [options]. it reads from stdin and writes to stdout, so pipe it like you mean it. 🫢


πŸ¦‹ DESCRIPTION πŸ¦‹

okay so here's the whole vibe: bammaskflags reads a BAM file from standard input, does a bit wise and with the flags field of every single read/alignment, and then writes the resulting data to standard output in BAM format. that's it. that's the whole job. iconic. πŸ‘‘

the following key=value pairs can be given:

  • level=<-1|0|1|9|11> β€” set the compression level of the output BAM file. valid values are:
    • -1 β€” zlib/gzip default compression level
    • 0 β€” uncompressed (raw, naked, zero chill)
    • 1 β€” zlib/gzip level 1 (fast) compression ⚑
    • 9 β€” zlib/gzip level 9 (best) compression 🐌✨

and IF libmaus has been compiled with support for igzip (see the Intel article on igzip), then there's one more valid value, bestie:

  • 11 β€” igzip compression πŸ”₯
  • maskneg=<0> β€” the mask of flags to be removed. here's the tea: a bit wise and gets computed between the bit complement of this number and the flags field of the reads/alignments in the input BAM file. you can build this value by adding up the following flag values:
    • 1 β€” PAIRED (paired in sequencing)
    • 2 β€” PROPER_PAIR (mapped as a proper pair)
    • 4 β€” UNMAP (unmapped)
    • 8 β€” MUNMAP (mate unmapped)
    • 16 β€” REVERSE (mapped to the reverse strand)
    • 32 β€” MREVERSE (mate mapped to the reverse strand)
    • 64 β€” READ1 (first read of pair)
    • 128 β€” READ2 (second read of pair)
    • 256 β€” SECONDARY (secondary alignment)
    • 512 β€” QCFAIL (failed quality control) 😭
    • 1024 β€” DUP (duplicate)
    • 2048 β€” SUPPLEMENTARY (supplementary)
  • tmpfile=<filename> β€” prefix for temporary files. by default the temporary files are created in the current directory πŸ“
  • md5=<0|1> β€” md5 checksum creation for the 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. (so setting md5=1 alone is giving nothing, bestie. you need the filename too. πŸ’€)
  • md5filename β€” file name for md5 checksum if md5=1.
  • index=<0|1> β€” compute BAM index for the 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 situation as md5, ok? filename or it didn't happen πŸ™ˆ)
  • indexfilename β€” file name for BAM index if index=1.
  • auxexists=[taglist] β€” only mask records containing any of the given aux field tags. taglist is a comma separated list of aux field names. the flag fields of records are only filtered if the respective records contain any of the aux fields mentioned in this list. by default all records are filtered. so like, if you do auxexists=AS, then only the flag fields of records containing an AS aux field get masked. selective queen behavior πŸ‘‘

πŸŽ€ AUTHOR πŸŽ€

written by German Tischler. thank you king 🫑


😀 REPORTING BUGS 😀

found a bug? report it 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. (like, zero. none. don't come for me. πŸ’€)


okay bestie that's the whole page, you're officially certified in flag-removal πŸ’…βœ¨

this cutie came from BIOBAMBAM, dated July 2013 β€” yes she's vintage, yes she still slays, periodt. πŸŽ€πŸ¦‹πŸŒΈ