MASH-SKETCH(1)
π MASH-SKETCH(1) π
okay bestie, welcome to mash-sketch, the little glow-up machine that turns your sequences into sketches β¨ (and yes, a "sketch" here is a reduced representation of a sequence or a whole set of sequences, built out of min-hashes, so you can do fast distance estimations later β it's giving speed, it's giving efficiency, it's giving icon status π
).
πΈ NAME πΈ
mash-sketch β create sketches (reduced representations for fast operations). no cap, that's literally the whole job π«Ά
β¨ SYNOPSIS β¨
mash sketch [options] fast(a|q)[.gz] ...
π¦ DESCRIPTION π¦
So here's the tea β: you're making a sketch file, which is a reduced representation of a sequence or a whole set of sequences β based on min-hashes β and it exists so you can do fast distance estimations later. main character energy fr fr.
Your input can be fasta or fastq files, gzipped or not gzipped, whatever vibe they're on π. And if you pass - as an input, it'll read from standard input instead, iconic.
Input files can also be files that contain file names (basically a list-of-files situation β see -l for that one π).
For output: one sketch file gets generated. Just one. But bestie, it can hold multiple sketches inside it, split up by sequences or by files (see -i if that's your thing).
By default the output file name is just your first input file with a .msh extension slapped on, or stdin.msh if you went the standard-input route (see -o to take control π).
π OPTIONS π
-hβ Help. hi hello, it tells you stuff π-p <int>β Parallelism. This many threads will be spawned for processing. [1]
π Input π
-lβ List input. Each file contains a list of sequence files, one per line. very "here's my friends, go talk to them" energy.
π Output π
-o <path>β Output prefix (first input file used if unspecified). The suffix.mshwill be appended. so like, don't add the.mshyourself, she does it for you π
π§ Sketching π§
-k <int>β K-mer size. Hashes will be based on strings of this many nucleotides. Canonical nucleotides are used by default (see Alphabet options below). Valid range is (1-32). [21]-s <int>β Sketch size. Each sketch will have at most this many non-redundant min-hashes. [1000]-iβ Sketch individual sequences, rather than whole files. one sketch per sequence, we love a solo moment.-w <num>β Probability threshold for warning about low k-mer size. Range is (0-1). [0.01]-rβ Input is a read set. See Reads options below. Incompatible with-iβ so pick a lane, bestie π«
π Sketching (reads) π
-b <size>β Use a Bloom filter of this size (raw bytes or withK/M/G/T) to filter out unique k-mers. This is useful if exact filtering with-muses too much memory. However, some unique k-mers may pass erroneously, and copies cannot be counted beyond 2. Implies-r. (so it's a lil lossy, we accept that π)-m <int>β Minimum copies of each k-mer required to pass noise filter for reads. Implies-r. [1]-c <num>β Target coverage. Sketching will conclude if this coverage is reached before the end of the input file (estimated by average k-mer multiplicity). Implies-r. early exit slay β¨-g <size>β Genome size. If specified, will be used for p-value calculation instead of an estimated size from k-mer content. Implies-r.
π Sketching (alphabet) π
-nβ Preserve strand (by default, strand is ignored by using canonical DNA k-mers, which are alphabetical minima of forward-reverse pairs). Implied if an alphabet is specified with-aor-z.-aβ Use amino acid alphabet (A-Z, except BJOUXZ). Implies-n,-k 9.-z <text>β Alphabet to base hashes on (case ignored by default; see-Z). K-mers with other characters will be ignored. Implies-n.-Zβ Preserve case in k-mers and alphabet (case is ignored by default). Sequence letters whose case is not in the current alphabet will be skipped when sketching.
heads up bestie:-a,-zand-Zare all doing alphabet stuff, and the case rules are exactly what the text says β don't go assuming extra behaviour, iykyk π
π SEE ALSO π
mash(1)β the main one, go say hi
okay that's the whole page, mwah π this one's from 2019-12-13, part of the MASH-SKETCH(1) family β go forth and sketch, you absolute legend πβ¨
π¦ where this page comes from
- debian bookworm: mash 2.3+dfsg-3+b1 Β· BSD-3-Clause
- debian trixie: mash 2.3+dfsg-6+b2 Β· BSD-3-Clause
- ubuntu jammy: mash 2.3+dfsg-1build2 Β· BSD-3-Clause
- ubuntu noble: mash 2.3+dfsg-6 Β· BSD-3-Clause
- ubuntu questing: mash 2.3+dfsg-6build2
- ubuntu resolute: mash 2.3+dfsg-6build3 Β· BSD-3-Clause
- ubuntu stonking: mash 2.3+dfsg-6build4 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms