BAMMARKDUPLICATES(1)
β¨ NAME β¨
bammarkduplicates β the icon that marks duplicate reads/alignments in BAM files π
straight out of the General Commands Manual, section 1, no cap.
π¦ SYNOPSIS π¦
bammarkduplicates [options]
π DESCRIPTION π
Okay so bestie, here's the tea: bammarkduplicates reads a BAM file full of alignments that some aligner made, marks the duplicate reads/alignments using the coordinates of those alignments, and writes the marked-up alignments out to a BAM file. Iconic behaviour, fr fr.
By default input comes in via standard input and output goes out via standard output. Duplication metrics get dropped on the standard error channel by default. π
Now here's the thing you gotta know: bammarkduplicates scans the input BAM file <b>twice</b>, so it's genuinely of benefit to set the I key (described below) and hand it a real input file name. Because if the input BAM file comes in via standard input, then a <b>copy of the input gets stored in a temporary file</b> during the first run so it can be processed in the second run. So, like, it works β but set I if you love yourself. π«Ά
The following key=value pairs can be given:
I=<stdin>β name of the input file (input is read from standard input if not set). This key can be given <b>multiple times</b>. If you do give it multiple times, then the input files need to be in coordinate sorted order and they'll be merged for output so that the output comes out coordinate sorted. Slay. β¨O=<stdout>β name of the output file (output is written to standard output if not set).M=<stderr>β name of the metrics file (metrics are written to standard error if not set).tmpfile=<filename>β prefix for temporary files. By default the temporary files are created in the current directory.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
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 an additional valid value is:
11: igzip compression
markthreads=<1>β number of threads used during marking duplicate alignments. πverbose=<1>β valid values are:1: print progress report on standard error0: do not print progress report
mod=<1048576>β print progress after processing everymod'th input read/alignment (default is 1M). πrewritebam=<0|1|2>β compression type of the temporary file stored if theIkey is not given (i.e. input is via standard input). Valid values are:0: temporary data is compressed using snappy (if available, seehttp://code.google.com/p/snappy/)1: gzip/BAM, recompress input and store it as a BAM file2: copy, produce a 1/1 copy of the input stream as a temporary file
rewritebamlevel=<-1|0|1|9|11>β compression level of the temporary BAM file ifrewritebamis1(see thelevelkey for possible values).colhashbits=<20>β base two logarithm of the size of the hash table used for collation (the default value is18and should work reasonably well for most input files. Please see the biobambam paper atarxiv.org/abs/1306.0836for details).collistsize=<33554432>β size of hash table overflow list in bytes (the default is 128MB and should work reasonably well for most input files. Please see the biobambam paper atarxiv.org/abs/1306.0836for details).fragbufsize=<50331648>β size of each fragment/pair file buffer in bytes (bammarkduplicatesuses two such buffer for detecting duplicates).rmdup=<0|1>β sets how duplicates are handled:0: duplicates will be retained in the output file and have the duplication flag set1: duplicates will be removed when writing the output file
md5=<0|1>β md5 checksum creation for the output file. Valid values are:0: do not compute checksum. <b>This is the default.</b>1: compute checksum. If themd5filenamekey is set, then the checksum is written to the given file. If themd5filenamekey is not given but setOkey is set the checksum will be written as output file name with.md5appended. Ifmd5filenameandOare unset, then no checksum will be computed.
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. <b>This is the default.</b>1: compute BAM index. If theindexfilenamekey is set, then the BAM index is written to the given file. If theindexfilenamekey is not given but setOkey is set the checksum will be written as output file name with.baiappended. IfindexfilenameandOare unset, then no BAM index will be computed.
indexfilenameβ file name for BAM index ifindex=1.tag=<tag>β name of auxiliary field storing tag information in string form. Read fragments or pairs with different tags will <b>not</b> be considered as duplicates, even they would be according to their mapping coordinates. For pairs the tag field information of the first and second mate are concatenated to obtain the tag of the pair. π§nucltag=<tag>β this option works like thetagoption but is restricted to sequences of nucleotides (A,C,GorT) as tags. The length of each tag sequence is <b>not allowed to exceed 15 bases</b>. All tags are required to have the same length. Each non nucleotide symbol is mapped toA. In contrast to thetagoption,nucltaguses less memory for processing and can be expected to be faster. β‘Dβ output file name for removed duplicates ifrmdup=1. By default the reads and read pairs marked as duplicates are <b>discarded</b> whenrmdup=1. If theDkey is set, then the sequence of reads which is not written to the output file is written to a separate file. The name of this separate file is the value of theDkey.dupmd5=<0|1>β compute md5 checksum of file given byDkey ifrmdup=1. By default <b>no</b> md5 checksum is computed for this file.dupmd5filenameβ file name for storing the md5 checksum of theDfile ifrmdup=1,Dis set anddupmd5=1.dupindex=<0|1>β compute BAM index for file given byDkey ifrmdup=1. By default <b>no</b> index is compute for this file.dupindexfilenameβ file name for storing the BAM index of theDfile ifrmdup=1,Dis set anddupmd5=1.optminpixeldif=<100>β distance (x and y inside same tile) inside which reads are considered as optical duplicates. π¬
πΈ AUTHOR πΈ
Written by German Tischler. π
π REPORTING BUGS π
Report bugs to <germant@miltenyibiotec.de>. Be nice, she's doing her best. π
π COPYRIGHT π
Copyright Β© 2009-2014 German Tischler, Β© 2011-2014 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 <b>NO WARRANTY</b>, to the extent permitted by law. π
Ok that's the whole page bestie, every last key, default and URL, no skips, no cap. π
This was the BIOBAMBAM page, dated <b>July 2014</b>. Go mark some duplicates. 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