BAMRECALCULATECIGAR(1)
π BAMRECALCULATECIGAR π
okay bestie, so the manual name is bamrecalculatecigar β it lives in the General Commands Manual section, and it's about to fix up your CIGAR strings for you. let's go π
β¨ NAME β¨
bamrecalculatecigar β concatenate BAM files
(yes, that's literally what it says up there in the original, and I am not the one who wrote it, so we keep it fr fr π)
π SYNOPSIS π
bamrecalculatecigar [options]
πΈ DESCRIPTION πΈ
So here's the vibe: bamrecalculatecigar reads a SAM/BAM/CRAM file, and for every aligned read it rewrites the CIGAR string, swapping out the M operations for = and X operations. Then it writes all of that out to a SAM/BAM/CRAM file. β¨
Reads that aren't aligned? They get left alone. Not touched. Not changed. They're minding their own business, we're minding ours. π«Ά
Rewriting the CIGAR strings requires a reference in FastA format, no cap. You gotta hand over the path to that FastA file using the reference key. And heads up: your alignment input file needs to be sorted by coordinate. π
The following key=value pairs can be given:
level=<-1|0|1|9|11>β set the compression level of the output BAM file. the 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 there's one more valid value, and it's:
11β igzip compression
verbose=<1>β the valid values are:1β print progress report on standard error0β do not print progress report
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.
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. 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.
indexfilenameβ file name for BAM index ifindex=1.inputformat=<bam>β input file format. all versions of bamsort come with support for the BAM input format. if the program in addition is linked to the io_lib package, then the following options are valid:bamβ BAM (see http://samtools.sourceforge.net/SAM1.pdf)samβ SAM (see http://samtools.sourceforge.net/SAM1.pdf)cramβ CRAM (see http://www.ebi.ac.uk/ena/about/cram_toolkit)
outputformat=<bam>β output file format. all versions of bamsort come with support for the BAM output format. if the program in addition is linked to the io_lib package, then the following options are valid:bamβ BAM (see http://samtools.sourceforge.net/SAM1.pdf)samβ SAM (see http://samtools.sourceforge.net/SAM1.pdf)cramβ CRAM (see http://www.ebi.ac.uk/ena/about/cram_toolkit). this format is not advisable for data sorted by query name π©
I=<[stdin]>β input filename, standard input if unset.O=<[stdout]>β output filename, standard output if unset.inputthreads=<[1]>β input helper threads, only valid forinputformat=bam.outputthreads=<[1]>β output helper threads, only valid foroutputformat=bam.reference=<[]>β reference FastA file forinputformat=cramandoutputformat=cram. an index file (.fai) is required. π
π AUTHOR π
Written by German Tischler.
π REPORTING BUGS π
Report bugs to <germant@miltenyibiotec.de>
π¦ COPYRIGHT π¦
Copyright Β© 2009-2016 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.
okay that's the whole thing bestie, and lemme just say β this page came from BIOBAMBAM, dated February 2016, and honestly? iconic. 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