BAMFILTERFLAGS(1)

πŸ’– BAMFILTERFLAGS πŸ’–

okay bestie, welcome to the bamfilterflags page from the General Commands Manual β€” yes it's a section 1 manual, we love a classic ✨


🌸 NAME 🌸

bamfilterflags β€” remove entries from BAM files matching a given set of flags


✨ SYNOPSIS ✨

bamfilterflags [options]

πŸ¦‹ DESCRIPTION πŸ¦‹

so here's the vibe: bamfilterflags reads a BAM file from standard input, yeets out every alignment that matches the flag set you gave it, and writes whatever's left to a BAM file on the standard output stream. no cap, that's the whole job. πŸ’…

the following key=value pairs can be given:

  • level=<-1|0|1|9|11> β€” sets the compression level of the output BAM file. the valid values are, and i need you to read these carefully:
    • -1: zlib/gzip default compression level
    • 0: uncompressed
    • 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 https://software.intel.com/en-us/articles/igzip-a-high-performance-deflate-compressor-with-optimizations-for-genomic-data) then there's one more valid value on the menu:

  • 11: igzip compression
  • numthreads=<1> β€” number of additional threads used for rewriting if markthreads > 1, otherwise no parallelism will be employed. that's literally what it says, don't come for me.
  • exclude=<> β€” do not include reads in the output that have any of the given flags set. the flags are given separated by commas. the valid flags are:
    • PAIRED: read was paired in sequencing
    • PROPER_PAIR: read has been mapped as part of a proper pair
    • UNMAP: read was not mapped
    • MUNMAP: mate of read was not mapped
    • REVERSE: read was mapped to the reverse strand
    • MREVERSE: mate of read was mapped to the reverse strand
    • READ1: read was first read of a pair during sequencing
    • READ2: read was second read of a pair during sequencing
    • SECONDARY: alignment is secondary, i.e. an alternative mapping to the primary alignment in the same file
    • QCFAIL: read as marked as having failed quality control
    • DUP: read is marked as a duplicate of another read in the same file (see bammarkduplicates)
    • SUPPLEMENTARY: read is marked as supplementary alignment
  • tmpfile=<filename> β€” prefix for temporary files. by default the temporary files are created in the current directory. (yes, your cwd, right there, minding its own business 🫢)
  • 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.
  • 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.
  • indexfilename β€” file name for BAM index if index=1.

πŸ‘‘ AUTHOR πŸ‘‘

Written by German Tischler. icon behaviour honestly.


πŸ› REPORTING BUGS πŸ›

Report bugs to <germant@miltenyibiotec.de>. if something's cursed, tell them, not me 😭


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. (say it louder for the people in the back πŸ—£οΈ)

and that's the whole page bestie, you ate πŸ’…βœ¨ this little gem comes to you from BIOBAMBAM, dated August 2013, living its best life as BAMFILTERFLAGS(1) β€” go filter some flags, you've got this πŸ¦‹πŸ’–