esl-selectn(1)
β¨ esl-selectn β bestie edition β¨
okay so you want a random little handful of lines out of a big ol' file and you don't wanna load the whole thing into memory?? say less, this is literally the one. it's part of the Easel miniapplication family, it's giving tiny-but-mighty π
πΈ NAME πΈ
esl-selectn β select random subset of lines from file
π¦ SYNOPSIS π¦
esl-selectn [options] nlines filename
π DESCRIPTION π
okay bestie so esl-selectn picks nlines lines at random out of the file filename and prints them to stdout. that's it. that's the whole job. she's focused, she's efficient, she serves π«Ά
and if filename is just - (a single dash, yes literally just a dash), then the input gets read from stdin instead. classic.
now here's the part where she really ATE: she uses an efficient reservoir sampling algorithm that only needs
- a single pass through
filename, and - memory storage proportional to
nlines
and β and this is the important bit, do not skip this β NOT proportional to the size of the file filename itself. like, the file can be enormous, doesn't matter, she's unbothered π
so that means you can use esl-selectn to create large scale statistical sampling experiments, especially when you team her up with other Easel miniapplications. dream team fr fr β¨
π OPTIONS π
-hβ prints a brief help message, and yes she includes the version number plus a summary of all the options, expert options included. the whole menu, no secrets π--seed <d>β sets the random number seed to<d>, and<d>has to be an integer>= 0. the default is0, which means use a randomly selected seed. but if you set a seed> 0, you get reproducible identical samples from different runs of the same command. iykyk, that's the science-reproducibility slay π₯
π SEE ALSO π
π COPYRIGHT π
Copyright (C) 2020 Howard Hughes Medical Institute.
Freely distributed under the BSD open source license. periodt.
π AUTHOR π
ngl, go read the Easel docs, she's iconic and she deserves it π
okay that's the whole page!! this is Easel 0.48, dated Nov 2020, mwah π bye bestie, go sample something π¦β¨
π¦ where this page comes from
- fedora 43: hmmer-easel 3.3.2-11.fc43 Β· GPL-3.0-only
- fedora 44: hmmer-easel 3.3.2-12.fc44 Β· GPL-3.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms