samtools-depad(1)
π samtools-depad β like, the padded-to-unpadded BAM glow-up β¨
okay so real quick: this is a page from the samtools manual (yes, that samtools, the bioinformatics icon π), and it's all about samtools depad. buckle up bestie π
πΈ NAME πΈ
samtools depad β converts a padded BAM into an unpadded BAM. that's it, that's the whole vibe. no cap. π¦
β¨ SYNOPSIS β¨
samtools depad [-SsCu1] [-T ref.fa] [-o output] in.bam
look at her go. she's compact, she's iconic, she takes exactly one input file and she's not sorry about it π
π§ DESCRIPTION π§
so here's the tea π β this bad boy converts a BAM that was aligned against a padded reference into a BAM aligned against the depadded reference. glow-down of the reference, glow-up of your data, iykyk.
the padded reference may contain literal "*" bases sittin' in it, but here's the plot twist π β those "*" bases still get counted in the reference numbering. so a sequence base-call that's aligned against a reference "*" is treated as a cigar match operator ("M" or "X") β but only if the base-call is "A", "C", "G" or "T". like, it has to actually be a real base, bestie. π
then, after depadding, those reference "*" bases get deleted, and any sequence base-calls aligned to them become insertions. and the same kind of transformation applies to deletions and to padding cigar operations. it's giving "everything shifts, nothing is lost." π₯
π OPTIONS π
-Sβ lowkey ignored, bestie. it's just here for compatibility with previous samtools versions. back in the day you needed this if your input was in SAM format, but now the correct format gets detected automatically by peeking at the first few characters of the input. so she stays, but she does nothing. main character energy that goes nowhere π-sβ output in SAM format. the default is BAM, jsyk.-Cβ output in CRAM format. again, default is BAM. choose your fighter β-uβ don't compress the output. works for either BAM or CRAM output format. no notes.-1β enable the fastest compression level. only works for BAM or CRAM output, so don't come for her if you're doing SAM. π«Ά-TFILEβ provides the padded reference file. and okay, important: without this, the@SQline lengths will be incorrect, so for most use cases this option is basically considered mandatory. not optional-optional. mandatory-ish. π-oFILEβ specifies the output filename. by default the output just goes to stdout, which is fine, but like, name your files, bestie π--no-PGβ do not add a@PGline to the header of the output file. that's the whole thing. simple queen.
π AUTHOR π
written by Heng Li from the Sanger Institute, with extensions by Peter Cock from the James Hutton Institute. legends, both of them πβ¨
π¦ SEE ALSO π¦
samtools(1)- Samtools website: <http://www.htslib.org/>
π reminder bestie: skip-Tand your@SQline lengths are gonna be wrong. don't do that to yourself.
okay that's the whole page π§΅ and for the sign-off: this was samtools-1.24, dated 9 July 2026 β so mark your calendar, screenshot the version, and go depad something gorgeous. mwah ππΈβ¨
π¦ where this page comes from
- epel 10: samtools 1.24-2.el10_3 Β· MIT
- nixpkgs unstable: samtools 1.24
- Copyright (C) 2008-2011, 2013-2018 Genome Research Ltd
- copyright (C) 2010, 2011 Broad Institute
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms