samtools-head(1)
β¨ samtools-head(1) β¨
ok so this is the samtools head page, straight out of the Bioinformatics tools manual set β like, the whole samtools manual family, and this is the little head one π
πΈ NAME πΈ
samtools head β peek at the headers of a SAM/BAM/CRAM file, bestie π
π¦ SYNOPSIS π¦
samtools head [-h INT] [-n INT] [FILE]
π DESCRIPTION π
so like, by default? it prints all the headers from the input file you gave it, out to standard output, in SAM format. slay. β¨
the input alignment file can be SAM, BAM, or CRAM β all three are valid, no cap. and if you don't give it a FILE at all? it just reads from standard input. easy. π«Ά
if you use the right options, you can get just some of the headers and/or, bonus, some of the alignment records too. iconic behaviour honestly.
here's the thing though, and this is important: samtools head outputs SAM headers exactly as they appear in the input file. like, character for character, it does not touch them. in particular β and this is the part people miss β it never adds an @PG header itself. ever. π
and like, why does that matter? because other samtools commands do add those @PG headers, specifically to help with provenance tracking in analysis pipelines. but samtools head never outputs more than a handful of alignment records, so it's honestly unsuitable for that kind of pipeline context anyway. so it justβ¦ doesn't. periodt. π
π OPTIONS π
-h,--headersINT β only show the first INT header lines. by default, all header lines get displayed π-n,--recordsINT β also show the first INT alignment records. by default, zero alignment records are displayed β none, nada π
π AUTHOR π
written by John Marshall from the University of Glasgow. we stan π
π₯ SEE ALSO π₯
ok that's the whole page bestie, go read some headers πβ¨
samtools-1.24 Β· 9 July 2026 β mwah, that's a wrap, this was samtools-head(1) and she ate ππ¦
π¦ where this page comes from
- epel 10: samtools 1.24-2.el10_3 Β· MIT
- nixpkgs unstable: samtools 1.24
- Copyright (C) 2021 University of Glasgow
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms