Debian Codegraph @

hmmer/documentation/man/hmmsim.man.in

raw
1 .TH "hmmsim" 1 "@HMMER_DATE@" "HMMER @HMMER_VERSION@" "HMMER Manual"
2
3 .SH NAME
4 hmmsim \- collect profile score distributions on random sequences
5
6 .SH SYNOPSIS
7 .B hmmsim
8 [\fIoptions\fR]
9 .I hmmfile
10
11
12 .SH DESCRIPTION
13
14 .PP
15 The
16 .B hmmsim
17 program generates random sequences, scores them with the model(s) in
18 .IR hmmfile ,
19 and outputs various sorts of histograms, plots, and fitted
20 distributions for the resulting scores.
21
22 .PP
23 .B hmmsim
24 is not a mainstream part of the HMMER package and most users would have
25 no reason to use it. It is used to develop and test the statistical
26 methods used to determine P-values and E-values in HMMER3. For
27 example, it was used to generate most of the results in a 2008 paper
28 on H3's local alignment statistics (PLoS Comp Bio 4:e1000069, 2008;
29 http://www.ploscompbiol.org/doi/pcbi.1000069).
30
31 .PP
32 Because it is a research testbed, you should not expect it to be as
33 robust as other programs in the package. For example, options may
34 interact in weird ways; we haven't tested nor tried to anticipate all
35 different possible combinations.
36
37 .PP
38 The main task is to fit a maximum likelihood Gumbel distribution to
39 Viterbi scores or an maximum likelihood exponential tail to
40 high-scoring Forward scores, and to test that these fitted
41 distributions obey the conjecture that lambda ~ log_2 for both the
42 Viterbi Gumbel and the Forward exponential tail.
43
44 .PP
45 The output is a table of numbers, one row for each model. Four
46 different parametric fits to the score data are tested: (1) maximum
47 likelihood fits to both location (mu/tau) and slope (lambda)
48 parameters; (2) assuming lambda=log_2, maximum likelihood fit to the
49 location parameter only; (3) same but assuming an edge-corrected
50 lambda, using current procedures in H3 [Eddy, 2008]; and (4) using
51 both parameters determined by H3's current procedures. The standard
52 simple, quick and dirty statistic for goodness-of-fit is 'E@10', the
53 calculated E-value of the 10th ranked top hit, which we expect to be
54 about 10.
55
56 .PP
57 In detail, the columns of the output are:
58
59 .TP
60 .B name
61 Name of the model.
62
63 .TP
64 .B tailp
65 Fraction of the highest scores used to fit the distribution. For
66 Viterbi, MSV, and Hybrid scores, this defaults to 1.0 (a Gumbel
67 distribution is fitted to all the data). For Forward scores, this
68 defaults to 0.02 (an exponential tail is fitted to the highest 2%
69 scores).
70
71 .TP
72 .B mu/tau
73 Location parameter for the maximum likelihood fit to the data.
74
75 .TP
76 .B lambda
77 Slope parameter for the maximum likelihood fit to the data.
78
79 .TP
80 .B E@10
81 The E-value calculated for the 10th ranked high score ('E@10') using the ML
82 mu/tau and lambda. By definition, this expected to be about 10, if
83 E-value estimation were accurate.
84
85 .TP
86 .B mufix
87 Location parameter, for a maximum likelihood fit with a known (fixed)
88 slope parameter lambda of log_2 (0.693).
89
90 .TP
91 .B E@10fix
92 The E-value calculated for the 10th ranked score using mufix and the
93 expected lambda = log_2 = 0.693.
94
95
96 .TP
97 .B mufix2
98 Location parameter, for a maximum likelihood fit with an
99 edge-effect-corrected lambda.
100
101 .TP
102 .B E@10fix2
103 The E-value calculated for the 10th ranked score using mufix2 and the
104 edge-effect-corrected lambda.
105
106 .TP
107 .B pmu
108 Location parameter as determined by H3's estimation procedures.
109
110 .TP
111 .B plambda
112 Slope parameter as determined by H3's estimation procedures.
113
114 .TP
115 .B pE@10
116 The E-value calculated for the 10th ranked score using pmu, plambda.
117
118
119 .PP
120 At the end of this table, one more line is printed, starting with #
121 and summarizing the overall CPU time used by the simulations.
122
123 .PP
124 Some of the optional output files are in xmgrace xy format. xmgrace is
125 powerful and freely available graph-plotting software.
126
127
128 .SH OPTIONS
129
130 .TP
131 .B \-h
132 Help; print a brief reminder of command line usage and all available
133 options.
134
135 .TP
136 .B \-a
137 Collect expected Viterbi alignment length statistics from each
138 simulated sequence. This only works with Viterbi scores (the default;
139 see
140 .BR \-\-vit ).
141 Two additional fields are printed in the output table for
142 each model: the mean length of Viterbi alignments, and the standard
143 deviation.
144
145 .TP
146 .B \-v
147 (Verbose). Print the scores too, one score per line.
148
149 .TP
150 .BI \-L " <n>"
151 Set the length of the randomly sampled (nonhomologous) sequences to
152 .IR <n> .
153 The default is 100.
154
155
156 .TP
157 .BI \-N " <n>"
158 Set the number of randomly sampled sequences to
159 .IR <n> .
160 The default is 1000.
161
162 .TP
163 .B \-\-mpi
164 Run under MPI control with master/worker parallelization (using
165 .BR mpirun ,
166 for example, or equivalent). Only available if optional MPI support
167 was enabled at compile-time.
168
169 It is parallelized at the level of sending one profile at a time to an
170 MPI worker process, so parallelization only helps if you have more
171 than one profile in the
172 .IR hmmfile ,
173 and you want to have at least as many profiles as MPI worker
174 processes.
175
176
177
178
179 .SH OPTIONS CONTROLLING OUTPUT
180
181 .TP
182 .BI \-o " <f>"
183 Save the main output table to a file
184 .I <f>
185 rather than sending it to stdout.
186
187 .TP
188 .BI \-\-afile " <f>"
189 When collecting Viterbi alignment statistics (the
190 .B \-a
191 option), for each sampled sequence, output two fields per
192 line to a file
193 .IR <f> :
194 the length of the optimal alignment, and the Viterbi bit score.
195 Requires that the
196 .B \-a
197 option is also used.
198
199 .TP
200 .BI \-\-efile " <f>"
201 Output a rank vs. E-value plot in XMGRACE xy format to file
202 .IR <f> .
203 The x-axis is the rank of this sequence, from highest score to lowest;
204 the y-axis is the E-value calculated for this sequence. E-values are
205 calculated using H3's default procedures (i.e. the pmu, plambda
206 parameters in the output table). You expect a rough match between rank
207 and E-value if E-values are accurately estimated.
208
209
210 .TP
211 .BI \-\-ffile " <f>"
212 Output a "filter power" file to
213 .IR <f> :
214 for each model, a line with three fields:
215 model name, number of sequences passing the P-value threshold,
216 and fraction of sequences passing the P-value threshold. See
217 .B \-\-pthresh
218 for setting the P-value threshold, which defaults to 0.02 (the default
219 MSV filter threshold in H3). The P-values are as determined by H3's
220 default procedures (the pmu,plambda parameters in the output table).
221 If all is well, you expect to see filter power equal to the predicted
222 P-value setting of the threshold.
223
224 .TP
225 .BI \-\-pfile " <f>"
226 Output cumulative survival plots (P(S>x)) to file
227 .I <f>
228 in XMGRACE xy format. There are three plots:
229 (1) the observed score distribution;
230 (2) the maximum likelihood fitted distribution;
231 (3) a maximum likelihood fit to the location parameter (mu/tau) while
232 assuming lambda=log_2.
233
234 .TP
235 .BI \-\-xfile " <f>"
236 Output the bit scores as a binary array of double-precision floats (8
237 bytes per score) to file
238 .IR <f> .
239 Programs like Easel's
240 .B esl-histplot
241 can read such binary files. This is useful when generating extremely
242 large sample sizes.
243
244
245 .SH OPTIONS CONTROLLING MODEL CONFIGURATION (MODE)
246
247 H3 only uses multihit local alignment (
248 .B \-\-fs
249 mode), and this is where we believe the statistical fits.
250 Unihit local alignment scores (Smith/Waterman;
251 .B \-\-sw
252 mode) also obey our statistical conjectures.
253 Glocal alignment statistics (either multihit or unihit) are
254 still not adequately understood nor adequately fitted.
255
256 .TP
257 .B \-\-fs
258 Collect multihit local alignment scores. This is the default.
259 "fs" comes from HMMER2's historical terminology for multihit local
260 alignment as 'fragment search mode'.
261
262 .TP
263 .B \-\-sw
264 Collect unihit local alignment scores. The H3 J state is disabled.
265 "sw" comes from HMMER2's historical terminology for unihit local
266 alignment as 'Smith/Waterman search mode'.
267
268 .TP
269 .B \-\-ls
270 Collect multihit glocal alignment scores. In glocal (global/local)
271 alignment, the entire model must align, to a subsequence of the
272 target. The H3 local entry/exit transition probabilities are
273 disabled. 'ls' comes from HMMER2's historical terminology for multihit local
274 alignment as 'local search mode'.
275
276 .TP
277 .B \-\-s
278 Collect unihit glocal alignment scores. Both the H3 J state and local
279 entry/exit transition probabilities are disabled. 's' comes from
280 HMMER2's historical terminology for unihit glocal alignment.
281
282
283
284 .SH OPTIONS CONTROLLING SCORING ALGORITHM
285
286 .TP
287 .B \-\-vit
288 Collect Viterbi maximum likelihood alignment scores. This is the default.
289
290 .TP
291 .B \-\-fwd
292 Collect Forward log-odds likelihood scores, summed over alignment ensemble.
293
294 .TP
295 .B \-\-hyb
296 Collect 'Hybrid' scores, as described in papers by Yu and Hwa (for
297 instance, Bioinformatics 18:864, 2002). These involve calculating a
298 Forward matrix and taking the maximum cell value. The number itself is
299 statistically somewhat unmotivated, but the distribution is expected
300 be a well-behaved extreme value distribution (Gumbel).
301
302 .TP
303 .B \-\-msv
304 Collect MSV (multiple ungapped segment Viterbi) scores, using H3's
305 main acceleration heuristic.
306
307 .TP
308 .B \-\-fast
309 For any of the above options, use H3's optimized production
310 implementation (using SIMD vectorization). The default is to use the
311 "generic" implementation (slow and non-vectorized). The optimized
312 implementations sacrifice a small amount of numerical precision. This
313 can introduce confounding noise into statistical simulations and fits,
314 so when one gets super-concerned about exact details, it's better to
315 be able to factor that source of noise out.
316
317 .SH OPTIONS CONTROLLING FITTED TAIL MASSES FOR FORWARD
318
319 In some experiments, it was useful to fit Forward scores to a range of
320 different tail masses, rather than just one. These options provide a
321 mechanism for fitting an evenly-spaced range of different tail masses.
322 For each different tail mass, a line is generated in the output.
323
324 .TP
325 .BI \-\-tmin " <x>"
326 Set the lower bound on the tail mass distribution. (The default is
327 0.02 for the default single tail mass.)
328
329 .TP
330 .BI \-\-tmax " <x>"
331 Set the upper bound on the tail mass distribution. (The default is
332 0.02 for the default single tail mass.)
333
334 .TP
335 .BI \-\-tpoints " <n>"
336 Set the number of tail masses to sample, starting from
337 .B \-\-tmin
338 and ending at
339 .BR \-\-tmax .
340 (The default is 1, for the default 0.02 single tail mass.)
341
342 .TP
343 .B \-\-tlinear
344 Sample a range of tail masses with uniform linear spacing. The default
345 is to use uniform logarithmic spacing.
346
347
348
349 .SH OPTIONS CONTROLLING H3 PARAMETER ESTIMATION METHODS
350
351 H3 uses three short random sequence simulations to estimating the
352 location parameters for the expected score distributions for MSV
353 scores, Viterbi scores, and Forward scores. These options allow these
354 simulations to be modified.
355
356 .TP
357 .BI \-\-EmL " <n>"
358 Sets the sequence length in simulation that estimates the location
359 parameter mu for MSV E-values. Default is 200.
360
361 .TP
362 .BI \-\-EmN " <n>"
363 Sets the number of sequences in simulation that estimates the location
364 parameter mu for MSV E-values. Default is 200.
365
366 .TP
367 .BI \-\-EvL " <n>"
368 Sets the sequence length in simulation that estimates the location
369 parameter mu for Viterbi E-values. Default is 200.
370
371 .TP
372 .BI \-\-EvN " <n>"
373 Sets the number of sequences in simulation that estimates the location
374 parameter mu for Viterbi E-values. Default is 200.
375
376 .TP
377 .BI \-\-EfL " <n>"
378 Sets the sequence length in simulation that estimates the location
379 parameter tau for Forward E-values. Default is 100.
380
381 .TP
382 .BI \-\-EfN " <n>"
383 Sets the number of sequences in simulation that estimates the location
384 parameter tau for Forward E-values. Default is 200.
385
386 .TP
387 .BI \-\-Eft " <x>"
388 Sets the tail mass fraction to fit in the simulation that estimates
389 the location parameter tau for Forward evalues. Default is 0.04.
390
391
392 .SH DEBUGGING OPTIONS
393
394 .TP
395 .B \-\-stall
396 For debugging the MPI master/worker version: pause after start, to
397 enable the developer to attach debuggers to the running master and
398 worker(s) processes. Send SIGCONT signal to release the pause.
399 (Under gdb:
400 .IR "(gdb) signal SIGCONT" )
401 (Only available if optional MPI support was enabled at compile-time.)
402
403 .TP
404 .BI \-\-seed " <n>"
405 Set the random number seed to
406 .IR <n> .
407 The default is 0, which makes the random number generator use
408 an arbitrary seed, so that different runs of
409 .B hmmsim
410 will almost certainly generate a different statistical sample.
411 For debugging, it is useful to force reproducible results, by
412 fixing a random number seed.
413
414
415
416 .SH EXPERIMENTAL OPTIONS
417
418 These options were used in a small variety of different exploratory
419 experiments.
420
421 .TP
422 .B \-\-bgflat
423 Set the background residue distribution to a uniform distribution,
424 both for purposes of the null model used in calculating scores, and
425 for generating the random sequences. The default is to use a standard
426 amino acid background frequency distribution.
427
428 .TP
429 .B \-\-bgcomp
430 Set the background residue distribution to the mean composition of the
431 profile. This was used in exploring some of the effects of biased
432 composition.
433
434 .TP
435 .B \-\-x\-no\-lengthmodel
436 Turn the H3 target sequence length model off. Set the self-transitions
437 for N,C,J and the null model to 350/351 instead; this emulates HMMER2.
438 Not a good idea in general. This was used to demonstrate one of the
439 main H2 vs. H3 differences.
440
441 .TP
442 .BI \-\-nu " <x>"
443 Set the nu parameter for the MSV algorithm -- the expected number of
444 ungapped local alignments per target sequence. The default is 2.0,
445 corresponding to a E->J transition probability of 0.5. This was used
446 to test whether varying nu has significant effect on result (it
447 doesn't seem to, within reason).
448 This option
449 only works if
450 .B \-\-msv
451 is selected (it only affects MSV),
452 and it will not work with
453 .B \-\-fast
454 (because the optimized implementations are hardwired to assume nu=2.0).
455
456 .TP
457 .BI \-\-pthresh " <x>"
458 Set the filter P-value threshold to use in generating filter power
459 files with
460 .BR \-\-ffile .
461 The default is 0.02 (which would be appropriate for testing MSV
462 scores, since this is the default MSV filter threshold in H3's
463 acceleration pipeline.) Other appropriate choices (matching defaults
464 in the acceleration pipeline) would be 0.001 for
465 Viterbi, and 1e-5 for Forward.
466
467
468
469
470
471 .SH SEE ALSO
472
473 See
474 .BR hmmer (1)
475 for a master man page with a list of all the individual man pages
476 for programs in the HMMER package.
477
478 .PP
479 For complete documentation, see the user guide that came with your
480 HMMER distribution (Userguide.pdf); or see the HMMER web page
481 (@HMMER_URL@).
482
483
484
485 .SH COPYRIGHT
486
487 .nf
488 @HMMER_COPYRIGHT@
489 @HMMER_LICENSE@
490 .fi
491
492 For additional information on copyright and licensing, see the file
493 called COPYRIGHT in your HMMER source distribution, or see the HMMER
494 web page
495 (@HMMER_URL@).
496
497
498 .SH AUTHOR
499
500 .nf
501 http://eddylab.org
502 .fi
503
504
505
506
507
508
509
510
511
512
513
514
515