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. 🫢
  • -T FILE β€” provides the padded reference file. and okay, important: without this, the @SQ line lengths will be incorrect, so for most use cases this option is basically considered mandatory. not optional-optional. mandatory-ish. πŸ™
  • -o FILE β€” 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 @PG line 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 πŸ¦‹


πŸ’€ reminder bestie: skip -T and your @SQ line 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