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 level0β 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 theflagsfield 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 themd5filenamekey is set, then the checksum is written to the given file. ifmd5filenameis unset, then no checksum will be computed. (so settingmd5=1alone is giving nothing, bestie. you need the filename too. π)
md5filenameβ file name for md5 checksum ifmd5=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 theindexfilenamekey is set, then the BAM index is written to the given file. ifindexfilenameis 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 ifindex=1.auxexists=[taglist]β only mask records containing any of the given aux field tags.taglistis 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 doauxexists=AS, then only the flag fields of records containing anASaux 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 β
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. ππ¦πΈ
π¦ 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