samtools-dict(1)

🌸 samtools-dict(1) β€” bestie's guide to sequence dictionaries 🌸

ok so real talk, this is a page from the Bioinformatics tools manual set, and it's called samtools-dict(1). yes the title is literally the command name with a (1) glued on, that's just how manpages do. anyway. sit down, grab a boba, we're making a dictionary πŸ“–βœ¨


✨ NAME ✨

samtools dict β€” it creates a sequence dictionary file from a fasta file. that's the whole job. it's giving "one task, done flawlessly." πŸ‘‘


πŸ¦‹ SYNOPSIS πŸ¦‹

samtools dict ref.fasta|ref.fasta.gz

so you hand it a fasta file, or a gzipped fasta file, and it hands you back a dictionary. no cap, that's it. the | in there means either one, not a pipe you type. πŸ’…


πŸŽ€ DESCRIPTION πŸŽ€

Create a sequence dictionary file from a fasta file.

(ok the original literally says that in one line, but like β€” to be clear β€” you give it the fasta, it makes the dictionary file. main character behavior, honestly. it's not doing side quests.) πŸ”₯


πŸ’– OPTIONS πŸ’–

  • -a, --assembly STR β€” sets the assembly, and it goes into the AS tag. yes the tag is literally called AS. iconic naming tbh.
  • -A, --alias, --alternative-name β€” adds an AN tag whose value is the same as the SN tag, with one lil twist: a β€œchr” prefix gets removed if SN has one, or added if it does not. and for mitochondria β€” that's when SN is β€œM” or β€œMT”, with or without a β€œchr” prefix β€” it also adds the remaining combinations of β€œchr/M/MT” to the AN tag. mito gets the full set, fr fr. 🧬
  • -H, --no-header β€” do not print the @HD header line. sometimes you just don't want the header, and that's valid. πŸ™ˆ
  • -l, --alt FILE β€” adds an AH tag to each sequence listed in the specified bwa(1)-style .alt file. these files use SAM records to represent alternate locus sequences (as named in the QNAME field) and their mappings to the primary assembly. so yes, QNAME field, that's where the names live. πŸ”
  • -o, --output FILE β€” output to FILE. defaults to [stdout], so if you forget it, stuff just spills onto your terminal. classic.
  • -s, --species STR β€” specify the species for the SP tag. tell it what organism you're dealing with. 🌱
  • -u, --uri STR β€” specify the URI for the UR tag. it defaults to the absolute path of ref.fasta, unless you're reading from stdin β€” in which case, no absolute path to speak of. 😭

🫢 AUTHOR 🫢

Written by Shane McCarthy from the Sanger Institute. ty Shane, we appreciate you πŸ’œ


🌈 SEE ALSO 🌈

Samtools website: <http://www.htslib.org/>

File format specification of SAM/BAM,CRAM,VCF/BCF: <http://samtools.github.io/hts-specs>

Samtools latest source: <https://github.com/samtools/samtools>

HTSlib latest source: <https://github.com/samtools/htslib>

Bcftools website: <http://samtools.github.io/bcftools>


ok that's the whole page babes, go make some dictionaries πŸ’…βœ¨

sign-off szn: this lil masterpiece is from samtools-1.24, dated 9 July 2026 β€” so when you're citing it, that's the version and that's the date. periodt. πŸŽ€πŸ¦‹πŸ’–

πŸ“¦ where this page comes from