BAMSORMADUP(1)
π BAMSORMADUP π
okay bestie, welcome to bamsormadup from the BIOBAMBAM collection, a General Commands Manual page that has been waiting its whole life for you to read it. she sorts SAM/BAM files by coordinate and marks duplicates, OR sorts them by query name. two moods. one icon. let's go π¦
β¨ SYNOPSIS β¨
bamsormadup [options]
like, that's it. that's the whole summoning ritual. no positional args, no drama, just vibes and options.
πΈ DESCRIPTION πΈ
okay so bamsormadup has two modes of operation depending on the value of the SO parameter, and which one you get is literally the whole personality of your run.
Mode one, the main character mode: if SO=coordinate, or if the SO key is just⦠not given at all (no thoughts, head empty, default behaviour), then bamsormadup reads a name collated BAM or SAM file from standard input, runs a fix mate process, sorts the contained alignments by coordinate, marks duplicate alignments, and writes the sorted alignments to standard output in BAM format. and bestie, an alignment file is "name collated" if all the alignments for one read name appear consecutively in the file. that's the whole definition, no cap.
Mode two, the plot twist: if SO=queryname, then the program reads a BAM or SAM file from standard input, sorts it by queryname, and writes the sorted file on standard output in BAM format. no name-collation assumption, just pure sorting energy.
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, feral, zero bytes squeezed)1: zlib/gzip level 1 (fast) compression9: 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
inputformat=<bam>β set the input file format. This can be eitherbamorsam(seehttp://samtools.sourceforge.net/SAM1.pdf).threads=<[1]>β number of threads used. yes queen, go parallel.M=<stderr>β name of the metrics file for duplicate marking. metrics are written to standard error if this is not set.tmpfile=<bamsormadup_hostname_pid_starttime>β prefix for temporary files. by default the temporary files are created in the current directory. Settmpfile=mem:tmp_to store temporary files in RAM instead of on disk.
β οΈ note that this may require very large amounts of RAM depending on the input. like, terrifying amounts. proceed with caution bestie π
SO=<coordinate|queryname>β set the sort order. valid values are:coordinateβ sort alignments by coordinate. input is assumed to be name collated.querynameβ sort alignments by query name. no assumption is made on the order of the input. free spirit behaviour.
reference=<>β name of reference FastA file when writing CRAM. This file will be used for filling missingURandM5fields ofSQheader lines. It may refer to a local file or a file stored on an http or ftp server. The file is uncompressed on the fly if the file name ends on.gz. If theREF_CACHEenvironment variable is set to the name of an existing directory, then normalised cache files will be written to this directory for each reference sequence. The file names are constructed from the directory name and the MD5 checksum of each reference sequence. This writing of cached files is omitted however, if a previously existing file is found in the list of read only cache locations given by theREF_PATHenvironment variable. π§ (yes, that's two env vars and a whole caching policy, we love a lore drop)optminpixeldif=<100>β distance (x and y inside same tile) inside which reads are considered as optical duplicates. it's giving "how close is too close" πrcsupport==<0>β if1then creatercaux field (unclipped coordinate) for mapped reads when sorting from query to coordinate order.numerical==<>β store numerical index in the given file. By default numerical index is not stored.numericalindexmod=1024β use this block size for producing numerical index.fragmergepar=1β number of threads used for merging fragment lists in duplicate marking. The run-time will generally benefit from an increased number here, but parallel merging requires a large number of simultaneously open files, which will cause problems on some systems.
π«Ά real talk: crank it up for speed, but watch your file descriptor limits, because your OS will simply say no.
crammode=β CRAM encoding profile. See the documentation for thescrambleprogram for possible options.
π AUTHOR π
Written by German Tischler.
π REPORTING BUGS π
Report bugs to <germant@miltenyibiotec.de>
like, be nice about it, but also please do report them π
π COPYRIGHT π
Copyright Β© 2009-2015 German Tischler, Β© 2011-2015 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.
and that's the whole page, bestie!! β¨ this was BAMSORMADUP(1) from the BIOBAMBAM set, dated April 2015. go sort something gorgeous ππ
π¦ 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