hmmsim(1)
โจ hmmsim(1) โ the HMMER manual, but make it cute โจ
okay bestie, we're reading hmmsim(1) from the HMMER Manual today and honestly? it's a whole vibe. it's a research testbed, it's niche, it's giving "lab cryptid that only three people understand" ๐ง let's get into it.
๐ NAME ๐
hmmsim โ collect profile score distributions on random sequences ๐
๐ธ SYNOPSIS ๐ธ
hmmsim [options] hmmfile
that's it. that's the whole incantation. one hmmfile, a pile of options, and off you go โจ
๐ฆ DESCRIPTION ๐ฆ
okay so the tea: hmmsim makes up random sequences, scores them with the model(s) sitting in hmmfile, and then prints out all sorts of histograms, plots, and fitted distributions based on those resulting scores. it's basically a score-machine that spawns fake sequences and then reads their fortune ๐ฎ
hmmsim is not a mainstream part of the HMMER package and most users would have literally zero reason to use it. ngl it's a specialist. it exists to develop and test the statistical methods that determine P-values and E-values in HMMER3. like, for real for real, it was used to generate most of the results in a 2008 paper on H3's local alignment statistics (PLoS Comp Bio 4:e1000069, 2008; http://www.ploscompbiol.org/doi/pcbi.1000069). iconic behavior, honestly ๐
because it's a research testbed, do not expect it to be as robust as other programs in the package. and that's not me being shady, that's the manual being shady. for example, options may interact in weird ways; they haven't tested nor tried to anticipate all different possible combinations. so like... vibe check your combos, bestie ๐ญ
the main task is to fit a maximum likelihood Gumbel distribution to Viterbi scores, or a maximum likelihood exponential tail to high-scoring Forward scores, and then to test that these fitted distributions obey the conjecture that lambda ~ log_2 for both the Viterbi Gumbel and the Forward exponential tail. that's the whole mission ๐
the output is a table of numbers, one row for each model. four different parametric fits to the score data are tested:
- maximum likelihood fits to both location (
mu/tau) and slope (lambda) parameters; - assuming
lambda=log_2, maximum likelihood fit to the location parameter only; - same but assuming an edge-corrected
lambda, using current procedures in H3 [Eddy, 2008]; and - using both parameters determined by H3's current procedures.
the standard simple, quick and dirty statistic for goodness-of-fit is E@10, the calculated E-value of the 10th ranked top hit, which we expect to be about 10. periodt ๐
๐ in detail, the columns of the output are ๐
nameโ Name of the model.tailpโ Fraction of the highest scores used to fit the distribution. For Viterbi, MSV, and Hybrid scores, this defaults to1.0(a Gumbel distribution is fitted to all the data). For Forward scores, this defaults to0.02(an exponential tail is fitted to the highest 2% scores).mu/tauโ Location parameter for the maximum likelihood fit to the data.lambdaโ Slope parameter for the maximum likelihood fit to the data.E@10โ The E-value calculated for the 10th ranked high score ('E@10') using the MLmu/tauandlambda. By definition, this expected to be about10, if E-value estimation were accurate.mufixโ Location parameter, for a maximum likelihood fit with a known (fixed) slope parameterlambdaoflog_2(0.693).E@10fixโ The E-value calculated for the 10th ranked score usingmufixand the expectedlambda = log_2 = 0.693.mufix2โ Location parameter, for a maximum likelihood fit with an edge-effect-correctedlambda.E@10fix2โ The E-value calculated for the 10th ranked score usingmufix2and the edge-effect-correctedlambda.pmuโ Location parameter as determined by H3's estimation procedures.plambdaโ Slope parameter as determined by H3's estimation procedures.pE@10โ The E-value calculated for the 10th ranked score usingpmu,plambda.
at the end of this table, one more line is printed, starting with # and summarizing the overall CPU time used by the simulations. ty for your service, CPU timer ๐ซถ
some of the optional output files are in xmgrace xy format. xmgrace is powerful and freely available graph-plotting software. go little plotter go ๐
โจ OPTIONS โจ
-hโ Help; print a brief reminder of command line usage and all available options. the classic "wait what was I doing" button ๐-aโ Collect expected Viterbi alignment length statistics from each simulated sequence. This only works with Viterbi scores (the default; see--vit). Two additional fields are printed in the output table for each model: the mean length of Viterbi alignments, and the standard deviation.-vโ (Verbose). Print the scores too, one score per line. it's giving "I want to see EVERYTHING" ๐-L <n>โ Set the length of the randomly sampled (nonhomologous) sequences to<n>. The default is100.-N <n>โ Set the number of randomly sampled sequences to<n>. The default is1000.--mpiโ Run under MPI control with master/worker parallelization (usingmpirun, for example, or equivalent). Only available if optional MPI support was enabled at compile-time.
It is parallelized at the level of sending one profile at a time to an MPI worker process, so parallelization only helps if you have more than one profile in the hmmfile, and you want to have at least as many profiles as MPI worker processes. basically: one profile per worker, so bring a crowd ๐ฏ
๐พ OPTIONS CONTROLLING OUTPUT ๐พ
-o <f>โ Save the main output table to a file<f>rather than sending it tostdout.--afile <f>โ When collecting Viterbi alignment statistics (the-aoption), for each sampled sequence, output two fields per line to a file<f>: the length of the optimal alignment, and the Viterbi bit score. Requires that the-aoption is also used. no-a, no--afile, that's the law ๐--efile <f>โ Output a rank vs. E-value plot in XMGRACE xy format to file<f>. The x-axis is the rank of this sequence, from highest score to lowest; the y-axis is the E-value calculated for this sequence. E-values are calculated using H3's default procedures (i.e. thepmu,plambdaparameters in the output table). You expect a rough match between rank and E-value if E-values are accurately estimated.--ffile <f>โ Output a "filter power" file to<f>: for each model, a line with three fields: model name, number of sequences passing the P-value threshold, and fraction of sequences passing the P-value threshold. See--pthreshfor setting the P-value threshold, which defaults to0.02(the default MSV filter threshold in H3). The P-values are as determined by H3's default procedures (thepmu,plambdaparameters in the output table). If all is well, you expect to see filter power equal to the predicted P-value setting of the threshold.--pfile <f>โ Output cumulative survival plots (P(S>x)) to file<f>in XMGRACE xy format. There are three plots: (1) the observed score distribution; (2) the maximum likelihood fitted distribution; (3) a maximum likelihood fit to the location parameter (mu/tau) while assuminglambda=log_2.--xfile <f>โ Output the bit scores as a binary array of double-precision floats (8 bytes per score) to file<f>. Programs like Easel'sesl-histplotcan read such binary files. This is useful when generating extremely large sample sizes. big data energy ๐ฅ
๐งฌ OPTIONS CONTROLLING MODEL CONFIGURATION (MODE) ๐งฌ
H3 only uses multihit local alignment (--fs mode), and this is where we believe the statistical fits. Unihit local alignment scores (Smith/Waterman; --sw mode) also obey our statistical conjectures. Glocal alignment statistics (either multihit or unihit) are still not adequately understood nor adequately fitted. so like... tread carefully with those, bestie ๐
--fsโ Collect multihit local alignment scores. This is the default. "fs" comes from HMMER2's historical terminology for multihit local alignment as 'fragment search mode'.--swโ Collect unihit local alignment scores. The H3Jstate is disabled. "sw" comes from HMMER2's historical terminology for unihit local alignment as 'Smith/Waterman search mode'.--lsโ Collect multihit glocal alignment scores. In glocal (global/local) alignment, the entire model must align, to a subsequence of the target. The H3 local entry/exit transition probabilities are disabled. 'ls' comes from HMMER2's historical terminology for multihit local alignment as 'local search mode'.--sโ Collect unihit glocal alignment scores. Both the H3Jstate and local entry/exit transition probabilities are disabled. 's' comes from HMMER2's historical terminology for unihit glocal alignment.
โก OPTIONS CONTROLLING SCORING ALGORITHM โก
--vitโ Collect Viterbi maximum likelihood alignment scores. This is the default. ๐--fwdโ Collect Forward log-odds likelihood scores, summed over alignment ensemble.--hybโ Collect 'Hybrid' scores, as described in papers by Yu and Hwa (for instance,Bioinformatics 18:864, 2002). These involve calculating a Forward matrix and taking the maximum cell value. The number itself is statistically somewhat unmotivated, but the distribution is expected be a well-behaved extreme value distribution (Gumbel).--msvโ Collect MSV (multiple ungapped segment Viterbi) scores, using H3's main acceleration heuristic.--fastโ For any of the above options, use H3's optimized production implementation (using SIMD vectorization). The default is to use the "generic" implementation (slow and non-vectorized). The optimized implementations sacrifice a small amount of numerical precision. This can introduce confounding noise into statistical simulations and fits, so when one gets super-concerned about exact details, it's better to be able to factor that source of noise out. iykyk ๐
๐ OPTIONS CONTROLLING FITTED TAIL MASSES FOR FORWARD ๐
In some experiments, it was useful to fit Forward scores to a range of different tail masses, rather than just one. These options provide a mechanism for fitting an evenly-spaced range of different tail masses. For each different tail mass, a line is generated in the output.
--tmin <x>โ Set the lower bound on the tail mass distribution. (The default is0.02for the default single tail mass.)--tmax <x>โ Set the upper bound on the tail mass distribution. (The default is0.02for the default single tail mass.)--tpoints <n>โ Set the number of tail masses to sample, starting from--tminand ending at--tmax. (The default is1, for the default0.02single tail mass.)--tlinearโ Sample a range of tail masses with uniform linear spacing. The default is to use uniform logarithmic spacing. pick your spacing, bestie ๐
and that's where part 1 wraps, but we are NOT done yet โ more parts are coming, so stay tuned ๐
โจ OPTIONS CONTROLLING H3 PARAMETER ESTIMATION METHODS โจ
Okay so H3 runs three lil short random-sequence simulations to estimate the location parameters for the expected score distributions of MSV scores, Viterbi scores, and Forward scores. These options let you tweak those simulations. ๐ซถ
--EmL <n>โ sets the sequence length in the simulation that estimates the location parametermufor MSV E-values. Default is200. ๐--EmN <n>โ sets the number of sequences in the simulation that estimates the location parametermufor MSV E-values. Default is200. โจ--EvL <n>โ sets the sequence length in the simulation that estimates the location parametermufor Viterbi E-values. Default is200. ๐--EvN <n>โ sets the number of sequences in the simulation that estimates the location parametermufor Viterbi E-values. Default is200. ๐ฆ--EfL <n>โ sets the sequence length in the simulation that estimates the location parametertaufor Forward E-values. Default is100. ๐ธ--EfN <n>โ sets the number of sequences in the simulation that estimates the location parametertaufor Forward E-values. Default is200. ๐--Eft <x>โ sets the tail mass fraction to fit in the simulation that estimates the location parametertaufor Forward evalues. Default is0.04. ๐ซถ
๐ DEBUGGING OPTIONS ๐
--stallโ for debugging the MPI master/worker version: pause after start, to enable the developer to attach debuggers to the running master and worker(s) processes. SendSIGCONTsignal to release the pause. (Undergdb:(gdb) signal SIGCONT) (Only available if optional MPI support was enabled at compile-time.) ๐--seed <n>โ set the random number seed to<n>. The default is0, which makes the random number generator use an arbitrary seed, so that different runs ofhmmsimwill almost certainly generate a different statistical sample. For debugging, it is useful to force reproducible results, by fixing a random number seed. ๐ฒ
๐งช EXPERIMENTAL OPTIONS ๐งช
These options were used in a small variety of different exploratory experiments. ๐ฌ
--bgflatโ set the background residue distribution to a uniform distribution, both for purposes of the null model used in calculating scores, and for generating the random sequences. The default is to use a standard amino acid background frequency distribution. ๐--bgcompโ set the background residue distribution to the mean composition of the profile. This was used in exploring some of the effects of biased composition. ๐งฌ--x-no-lengthmodelโ turn the H3 target sequence length model off. Set the self-transitions forN,C,Jand the null model to350/351instead; this emulates HMMER2. Not a good idea in general. This was used to demonstrate one of the main H2 vs. H3 differences. ๐--nu <x>โ set thenuparameter for the MSV algorithm -- the expected number of ungapped local alignments per target sequence. The default is2.0, corresponding to aE->Jtransition probability of0.5. This was used to test whether varyingnuhas significant effect on result (it doesn't seem to, within reason). This option only works if--msvis selected (it only affects MSV), and it will not work with--fast(because the optimized implementations are hardwired to assumenu=2.0). โ ๏ธ--pthresh <x>โ set the filter P-value threshold to use in generating filter power files with--ffile. The default is0.02(which would be appropriate for testing MSV scores, since this is the default MSV filter threshold in H3's acceleration pipeline). Other appropriate choices (matching defaults in the acceleration pipeline) would be0.001for Viterbi, and1e-5for Forward. ๐ฏ
๐ SEE ALSO ๐
See hmmer(1) for a master man page with a list of all the individual man pages for programs in the HMMER package. ๐
For complete documentation, see the user guide that came with your HMMER distribution (Userguide.pdf); or see the HMMER web page (http://hmmer.org/). ๐
๐ COPYRIGHT ๐
Copyright (C) 2023 Howard Hughes Medical Institute. ๐๏ธ
Freely distributed under the BSD open source license. ๐
For additional information on copyright and licensing, see the file called COPYRIGHT in your HMMER source distribution, or see the HMMER web page (http://hmmer.org/). ๐
๐ AUTHOR ๐
And that's the whole vibe, bestie โ this was HMMER 3.4, Aug 2023, hmmsim(1). Stay iconic. ๐โจ
๐ฆ where this page comes from
- debian trixie: hmmer 3.4+dfsg-2 ยท GPL-3.0-only
- nixos 26.05: hmmer 3.4
- nixpkgs unstable: hmmer 3.4
- ubuntu noble: hmmer 3.4+dfsg-2 ยท GPL-3.0-only
- ubuntu resolute: hmmer 3.4+dfsg-2 ยท GPL-3.0-only
- ubuntu stonking: hmmer 3.4+dfsg-3 ยท GPL-3.0-only
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms