Debian Codegraph @

documentation/man/cmsearch.man.in

raw
1 .TH "cmsearch" 1 "@INFERNAL_DATE@" "Infernal @INFERNAL_VERSION@" "Infernal Manual"
2
3 .SH NAME
4 cmsearch - search covariance model(s) against a sequence database
5
6 .SH SYNOPSIS
7 .B cmsearch
8 .I [options]
9 .I <cmfile>
10 .I <seqdb>
11
12 .SH DESCRIPTION
13
14 .PP
15 .B cmsearch
16 is used to search one or more covariance models (CMs) against a sequence database.
17 For each CM in
18 .I <cmfile>,
19 use that query CM to search the target database of sequences in
20 .I <seqdb>,
21 and output ranked lists of the sequences with the most significant
22 matches to the CM.
23 To build CMs from multiple alignments, see
24 .B cmbuild.
25
26 .PP
27 The query
28 .I <cmfile>
29 must have been calibrated for E-values with
30 .B cmcalibrate.
31 As a special exception, any models in
32 .I <cmfile>
33 that have zero basepairs need not be calibrated. For these models,
34 profile HMM search algorithms will be used instead of CM ones, as
35 discussed further below.
36
37 .PP
38 The query
39 .I <cmfile>
40 may be '-' (a dash character), in which case
41 the query CM input will be read from a <stdin> pipe instead of from a
42 file. The
43 .I <seqdb>
44 may not be '-' because the current implementation needs to be able to
45 rewind the database, which is not possible with
46 .I stdin
47 input.
48
49 .PP
50 The output format is designed to be human-readable, but is often so
51 voluminous that reading it is impractical, and parsing it is a pain. The
52 .B --tblout
53 option saves output in a simple tabular format that is concise and
54 easier to parse.
55 The
56 .B -o
57 option allows redirecting the main output, including throwing it away
58 in /dev/null.
59
60 .PP
61 .B cmsearch
62 reexamines the 5' and 3' termini of target sequences using
63 specialized algorithms for detection of
64 .I truncated
65 hits, in which part of the 5' and/or 3' end of the actual full length
66 homologous sequence is missing in the target sequence file. These
67 types of hits will be most common in sequence files consisting of
68 unassembled sequencing reads. By default, any 5' truncated hit is
69 required to include the first residue of the target sequence it
70 derives from in
71 .I <seqdb>,
72 and any 3' truncated hit is required to include the final residue of
73 the target sequence it derives from. Any 5' and 3' truncated hit must
74 include the first and final residue of the target sequence it derives
75 from. The
76 .B --anytrunc
77 option will relax the requirements for hit inclusion of sequence
78 endpoints, and truncated hits are allowed to start and stop at any
79 positions of target sequences. Importantly though, with
80 .B --anytrunc,
81 hit E-values will be less accurate because model calibration does not
82 consider the possibility of truncated hits, so use it with caution.
83 The
84 .B --notrunc
85 option can be used to turn off truncated hit detection.
86 .B --notrunc
87 will reduce the running time of
88 .B cmsearch,
89 most significantly for target
90 .I <seqdb>
91 files that include many short sequences.
92
93 .PP
94 Truncated hit detection is automatically turned off when the
95 .B --max,
96 .B --nohmm,
97 .B --qdb,
98 or
99 .B --nonbanded
100 options are used because it relies on the use of an accelerated HMM
101 banded alignment strategy that is turned off by any of those options.
102
103 .SH OPTIONS
104
105 .TP
106 .B -h
107 Help; print a brief reminder of command line usage and all available
108 options.
109
110 .TP
111 .B -g
112 Turn on the
113 .I glocal
114 alignment algorithm, global with respect to the query model and local
115 with respect to the target database. By default, the local alignment
116 algorithm is used which is local with respect to both the target
117 sequence and the model. In local mode, the alignment to span two or
118 more subsequences if necessary (e.g. if the structures of the query
119 model and target sequence are only partially shared), allowing certain
120 large insertions and deletions in the structure to be penalized
121 differently than normal indels. Local mode performs better on
122 empirical benchmarks and is significantly more sensitive for remote
123 homology detection. Empirically, glocal searches return many fewer
124 hits than local searches, so glocal may be desired for some
125 applications. With
126 .B -g,
127 all models must be calibrated, even those with zero basepairs.
128
129 .TP
130 .BI -Z " <x>"
131 Calculate E-values as if the search space size was
132 .I <x>
133 megabases (Mb). Without the use of this option, the search space size
134 is defined as the total number of nucleotides in
135 .I <seqdb>
136 times 2, because both strands of each target sequence will be searched.
137
138 .TP
139 .B --devhelp
140 Print help, as with
141 .B "-h",
142 but also include expert options that are not displayed with
143 .B "-h".
144 These expert options are not expected to be relevant for the vast
145 majority of users and so are not described in the manual page. The
146 only resources for understanding what they actually do are the brief
147 one-line descriptions output when
148 .B "--devhelp"
149 is enabled, and the source code.
150
151 .SH OPTIONS FOR CONTROLLING OUTPUT
152
153 .TP
154 .BI -o " <f>"
155 Direct the main human-readable output to a file
156 .I <f>
157 instead of the default stdout.
158
159 .TP
160 .BI -A " <f>"
161 Save a multiple alignment of all significant hits (those satisfying
162 .I inclusion thresholds)
163 to the file
164 .I <f>.
165
166 .TP
167 .BI --tblout " <f>"
168 Save a simple tabular (space-delimited) file summarizing the
169 hits found, with one data line per hit. The format of this file is
170 described in section 6 of the Infernal user guide.
171
172 .TP
173 .B --acc
174 Use accessions instead of names in the main output, where available
175 for profiles and/or sequences.
176
177 .TP
178 .B --noali
179 Omit the alignment section from the main output. This can greatly
180 reduce the output volume.
181
182 .TP
183 .B --notextw
184 Unlimit the length of each line in the main output. The default
185 is a limit of 120 characters per line, which helps in displaying
186 the output cleanly on terminals and in editors, but can truncate
187 target profile description lines.
188
189 .TP
190 .BI --textw " <n>"
191 Set the main output's line length limit to
192 .I <n>
193 characters per line. The default is 120.
194
195 .TP
196 .B --verbose
197 Include extra search pipeline statistics in the main output, including
198 filter survival statistics for truncated hit detection and number of
199 envelopes discarded due to matrix size overflows.
200
201 .TP
202 .B --nomiss
203 With -A, in the output alignment, do not mark truncated hits as
204 fragmentary by using missing data '~' characters before the first
205 residue (for 5' truncated hits) and/or after the final residue (for 3'
206 truncated hits). By default, missing data characters ('~') will be
207 used in this way to mark truncated hits as fragments. The cmbuild
208 program can use these fragment definitions in input alignment files if
209 the
210 .B --fraggiven
211 option is used.
212
213 .SH OPTIONS CONTROLLING REPORTING THRESHOLDS
214
215 Reporting thresholds control which hits are reported in output files
216 (the main output and
217 .I --tblout)
218 Hits are ranked by statistical significance (E-value).
219 By default, all hits with an E-value <= 10 are reported.
220 The following options allow you to change the default
221 E-value reporting thresholds, or to use bit score thresholds instead.
222
223 .TP
224 .BI -E " <x>"
225 In the per-target output, report target sequences with an E-value of <=
226 .I <x>.
227 The default is 10.0, meaning that on average, about 10 false positives
228 will be reported per query, so you can see the top of the noise
229 and decide for yourself if it's really noise.
230
231 .TP
232 .BI -T " <x>"
233 Instead of thresholding per-CM output on E-value,
234 report target sequences with a bit score of >=
235 .I <x>.
236
237
238 .SH OPTIONS FOR INCLUSION THRESHOLDS
239
240 Inclusion thresholds are stricter than reporting thresholds.
241 Inclusion thresholds control which hits are considered to be reliable
242 enough to be included in an output alignment or in a possible
243 subsequent search round, or marked as significant ("!") as opposed to
244 questionable ("?") in hit output.
245
246 .TP
247 .BI --incE " <x>"
248 Use an E-value of <=
249 .I <x>
250 as the hit inclusion threshold.
251 The default is 0.01, meaning that on average, about 1 false positive
252 would be expected in every 100 searches with different query
253 sequences.
254
255 .TP
256 .BI --incT " <x>"
257 Instead of using E-values for setting the inclusion threshold, instead
258 use a bit score of >=
259 .I <x>
260 as the hit inclusion threshold.
261 By default this option is unset.
262
263 .SH OPTIONS FOR MODEL-SPECIFIC SCORE THRESHOLDING
264
265 .PP
266 Curated CM databases may define specific bit score thresholds for
267 each CM, superseding any thresholding based on statistical
268 significance alone.
269
270 .PP
271 To use these options, the profile must contain the appropriate (GA,
272 TC, and/or NC) optional score threshold annotation; this is picked up
273 by
274 .B cmbuild
275 from Stockholm format alignment files. Each thresholding option has a
276 score of
277 .I <x>
278 bits, and acts
279 as if
280 .BI -T " <x>"
281 .BI --incT " <x>"
282 has been applied specifically using each model's curated thresholds.
283
284 .TP
285 .B --cut_ga
286 Use the GA (gathering) bit scores in the model to set
287 hit reporting and inclusion
288 thresholds. GA thresholds are generally considered to be the
289 reliable curated thresholds defining family membership; for example,
290 in Rfam, these thresholds define what gets included in Rfam Full
291 alignments based on searches with Rfam Seed models.
292
293 .TP
294 .B --cut_nc
295 Use the NC (noise cutoff) bit score thresholds in the model to set
296 hit reporting and inclusion thresholds. NC thresholds are generally
297 considered to be the score of the highest-scoring known false positive.
298
299 .TP
300 .B --cut_tc
301 Use the TC (trusted cutoff) bit score thresholds in the model to set
302 hit reporting and inclusion thresholds. TC thresholds are generally
303 considered to be the score of the lowest-scoring known true positive
304 that is above all known false positives.
305
306 .SH OPTIONS CONTROLLING THE ACCELERATION PIPELINE
307
308 .PP
309 Infernal 1.1 searches are accelerated in a six-stage
310 filter pipeline. The first five stages use a profile HMM to define
311 envelopes that are passed to the stage six CM CYK filter. Any
312 envelopes that survive all filters are assigned final scores using the
313 the CM Inside algorithm. (See the user guide for more information.)
314
315 .PP
316 The profile HMM filter is built by the
317 .B cmbuild
318 program and is stored in
319 .I <cmfile>.
320
321 .PP
322 Each successive filter is slower than the previous one, but better
323 than it at disciminating between subsequences that may contain
324 high-scoring CM hits and those that do not. The first three HMM filter
325 stages are the same as those used in HMMER3. Stage 1 (F1) is the
326 local HMM SSV filter modified for long sequences. Stage 2 (F2) is the
327 local HMM Viterbi filter. Stage 3 (F3) is the local HMM Forward
328 filter. Each of the first three stages uses the profile HMM in local
329 mode, which allows a target subsequence to align to any region of the
330 HMM. Stage 4 (F4) is a glocal HMM filter, which requires a target
331 subsequence to align to the full-length profile HMM. Stage 5 (F5) is
332 the glocal HMM envelope definition filter, which uses HMMER3's domain
333 identification heursitics to define envelope boundaries. After each
334 stage from 2 to 5 a bias filter step (F2b, F3b, F4b, and F5b) is used
335 to remove sequences that appear to have passed the filter due to
336 biased composition alone. Any envelopes that survive stages F1 through
337 F5b are then passed with the local CM CYK filter. The CYK filter uses
338 constraints (bands) derived from an HMM alignment of the envelope to
339 reduce the number of required calculations and save time. Any
340 envelopes that pass CYK are scored with the local CM Inside algorithm,
341 again using HMM bands for acceleration.
342
343 .PP
344 The default filter thresholds that define the minimum score required
345 for a subsequence to survive each stage are defined based on the size of the
346 database in
347 .I <seqdb>
348 (or the size
349 .I <x>
350 in megabases (Mb) specified by the
351 .BI -Z " <x>"
352 or
353 .BI --FZ " <x>"
354 options).
355 For larger databases, the filters are more strict leading to more
356 acceleration but potentially a greater loss of sensitivity. The
357 rationale is that for larger databases, hits must have higher scores
358 to achieve statistical significance, so stricter filtering that
359 removes lower scoring insignificant hits is acceptable.
360
361 .PP
362 The P-value thresholds for all possible search space sizes and all filter
363 stages are listed next. (A P-value threshold of 0.01 means that
364 roughly 1% of the highest scoring nonhomologous subsequence are
365 expected to pass the filter.) Z is defined as the number of
366 nucleotides in the complete target sequence file times 2 because both
367 strands will be searched with each model.
368
369 .PP
370 If Z is less than 2 Mb: F1 is 0.35; F2 and F2b are
371 off; F3, F3b, F4, F4b and F5 are 0.02; F6 is 0.0001.
372
373 .PP
374 If Z is between 2 Mb and 20 Mb: F1 is 0.35; F2 and F2b are
375 off; F3, F3b, F4, F4b and F5 are 0.005; F6 is 0.0001.
376
377 .PP
378 If Z is between 20 Mb and 200 Mb: F1 is 0.35; F2 and F2b are
379 0.15; F3, F3b, F4, F4b and F5 are 0.003; F6 is 0.0001.
380
381 .PP
382 If Z is between 200 Mb and 2 Gb: F1 is 0.15; F2 and F2b are
383 0.15; F3, F3b, F4, F4b, F5, and F5b are 0.0008; and F6 is 0.0001.
384
385 .PP
386 If Z is between 2 Gb and 20 Gb: F1 is 0.15; F2 and F2b are
387 0.15; F3, F3b, F4, F4b, F5, and F5b are 0.0002; and F6 is 0.0001.
388
389 .PP
390 If Z is more than 20 Gb: F1 is 0.06; F2 and F2b are
391 0.02; F3, F3b, F4, F4b, F5, and F5b are 0.0002; and F6 is 0.0001.
392
393 .PP
394 These thresholds were chosen based on performance on an internal
395 benchmark testing many different possible settings.
396
397 .PP
398 There are five options for controlling the general filtering
399 level. These options are, in order from least strict (slowest but most sensitive) to most
400 strict (fastest but least sensitive):
401 .B --max,
402 .B --nohmm,
403 .B --mid,
404 .B --default,
405 (this is the default setting),
406 .B --rfam.
407 and
408 .B --hmmonly.
409 With
410 .B --default
411 the filter thresholds will be database-size dependent. See the
412 explanation of each of these individual options below for more information.
413
414 .PP
415 Additionally, an expert user can precisely control each filter stage
416 score threshold with the
417 .B --F1,
418 .B --F1b,
419 .B --F2,
420 .B --F2b,
421 .B --F3,
422 .B --F3b,
423 .B --F4,
424 .B --F4b,
425 .B --F5,
426 .B --F5b,
427 and
428 .B --F6
429 options. As well as turn each stage on or off with the
430 .B --noF1,
431 .B --doF1b,
432 .B --noF2,
433 .B --noF2b,
434 .B --noF3,
435 .B --noF3b,
436 .B --noF4,
437 .B --noF4b,
438 .B --noF5,
439 and
440 .B --noF6.
441 options.
442 These options are only displayed if the
443 .B --devhelp
444 option is used
445 to keep the number of displayed options with
446 .B -h
447 reasonable, and because they are only expected to be useful to a
448 small minority of users.
449
450 .PP
451 As a special case, for any models in
452 .I <cmfile>
453 which have zero basepairs, profile HMM searches are run instead of CM
454 searches. HMM algorithms are more efficient than CM algorithms, and
455 the benefit of CM algorithms is lost for models with no secondary
456 structure (zero basepairs). These profile HMM searches will run
457 significantly faster than the CM searches. You can force HMM-only
458 searches with the
459 .B --hmmonly
460 option. For more information on HMM-only searches see the description
461 of the
462 .B --hmmonly
463 option below, and the user guide.
464
465 .TP
466 .B --max
467 Turn off all filters, and run non-banded Inside
468 on every full-length target sequence. This increases
469 sensitivity somewhat, at an extremely large cost in speed.
470
471 .TP
472 .B --nohmm
473 Turn off all HMM filter stages (F1 through F5b). The CYK filter, using
474 QDBs, will be run on every full-length target sequence and will
475 enforce a P-value threshold of 0.0001. Each subsequence that survives
476 CYK will be passed to Inside, which will also use QDBs (but a looser
477 set). This increases sensitivity somewhat, at a very large cost in
478 speed.
479
480 .TP
481 .B --mid
482 Turn off the HMM SSV and Viterbi filter stages (F1 through F2b).
483 Set remaining HMM filter thresholds (F3 through F5b) to 0.02 by
484 default, but changeable to
485 .I <x>
486 with
487 .BI --Fmid " <x>"
488 sequence. This may increase sensitivity, at a significant cost in
489 speed.
490
491 .TP
492 .B --default
493 Use the default filtering strategy. This option is on by default. The
494 filter thresholds are determined based on the database size.
495
496 .TP
497 .B --rfam
498 Use a strict filtering strategy devised for large databases (more than
499 20 Gb). This will accelerate the search at a potential cost to
500 sensitivity. It will have no effect if the database is larger than 20 Gb.
501
502 .TP
503 .B --hmmonly
504 Only use the filter profile HMM for searches, do not use the CM.
505 Only filter stages F1 through F3 will be executed, using strict
506 P-value thresholds (0.02 for F1, 0.001 for F2 and 0.00001 for F3).
507 Additionally a bias composition filter is used after the F1 stage
508 (with P=0.02 survival threshold).
509 Any hit that survives all stages and has an HMM E-value or
510 bit score above the reporting threshold will be output.
511 The user can change the HMM-only filter thresholds and options with
512 .B --hmmF1,
513 .B --hmmF2,
514 .B --hmmF3,
515 .B --hmmnobias,
516 .B --hmmnonull2,
517 and
518 .B --hmmmax.
519 By default, searches for any model with zero basepairs will be run in
520 HMM-only mode. This can be turned off, forcing CM searches for these
521 models with the
522 .B --nohmmonly
523 option.
524 These options are only displayed if the
525 .B --devhelp
526 option is used.
527
528 .TP
529 .BI --FZ " <x>"
530 Set filter thresholds as the defaults used if the database were
531 .B <x>
532 megabases (Mb). If used with
533 .B <x>
534 greater than 20000 (20 Gb) this option has the same effect as
535 .B --rfam.
536
537
538 .TP
539 .BI --Fmid " <x>"
540 With the
541 .B --mid
542 option set the HMM filter thresholds (F3 through F5b) to
543 .I <x>.
544 By default,
545 .I <x>
546 is 0.02.
547
548 .SH OTHER OPTIONS
549
550 .TP
551 .B --notrunc
552 Turn off truncated hit detection.
553
554 .TP
555 .B --anytrunc
556 Allow truncated hits to begin and end at any position in a target
557 sequence. By default, 5' truncated hits must include the first residue of
558 their target sequence and 3' truncated hits must include the final
559 residue of their target sequence. With this option you may observe
560 fewer full length hits that extend to the beginning and end of the
561 query CM. As of version 1.1.5, truncated hits that end at sequence terminii
562 with a lower score penalty than internally truncated hits are also
563 considered (these were not considered in 1.1x versions prior to 1.1.5).
564 To reproduce the behavior of this option from v1.1.4, use the
565 .B --inttrunc
566 option instead.
567
568 .TP
569 .B --nonull3
570 Turn off the null3 CM score corrections for biased composition. This
571 correction is not used during the HMM filter stages.
572
573 .TP
574 .BI --mxsize " <x>"
575 Set the maximum allowable CM DP matrix size to
576 .I <x>
577 megabytes. By default this size is 128 Mb.
578 This should be large enough for the vast majority of searches,
579 especially with smaller models.
580 If
581 .B cmsearch
582 encounters an envelope in the CYK or Inside stage that requires a
583 larger matrix, the envelope will be discounted from
584 consideration. This behavior is like an additional filter that
585 prevents expensive (slow) CM DP calculations, but at a potential cost
586 to sensitivity.
587 Note that if
588 .B cmsearch
589 is being run in
590 .I <n>
591 multiple threads on a multicore machine then each thread may
592 have an allocated
593 matrix of up to size
594 .I <x>
595 Mb at any given time.
596
597 .TP
598 .BI --smxsize " <x>"
599 Set the maximum allowable CM search DP matrix size to
600 .I <x>
601 megabytes. By default this size is 128 Mb.
602 This option is only relevant if the CM will not use HMM banded
603 matrices, i.e. if the
604 .B --max,
605 .B --nohmm,
606 .B --qdb,
607 .B --fqdb,
608 .B --nonbanded,
609 or
610 .B --fnonbanded
611 options are also used. Note that if
612 .B cmsearch
613 is being run in
614 .I <n>
615 multiple threads on a multicore machine then each thread may
616 have an allocated
617 matrix of up to size
618 .I <x>
619 Mb at any given time.
620
621 .TP
622 .B --cyk
623 Use the CYK algorithm, not Inside, to determine the final score of all
624 hits.
625
626 .TP
627 .B --acyk
628 Use the CYK algorithm to align hits. By default, the Durbin/Holmes
629 optimal accuracy algorithm is used, which finds the alignment that
630 maximizes the expected accuracy of all aligned residues.
631
632 .TP
633 .BI --wcx " <x>"
634 For each CM, set the W parameter, the expected maximum length of a hit, to
635 .I <x>
636 times the consensus length of the model. By default, the W parameter is
637 read from the CM file and was calculated based on the transition
638 probabilities of the model by
639 .B cmbuild.
640 You can find out what the default W is for a model using
641 .B cmstat.
642 This option should be used with caution as it impacts the filtering
643 pipeline at several different stages in nonobvious ways. It
644 is only recommended for expert users searching for hits that are much
645 longer than any of the homologs used to build the model in
646 .B cmbuild,
647 e.g. ones with large introns or other large insertions.
648 This option cannot be used in combination with the
649 .B --nohmm,
650 .B --fqdb
651 or
652 .B --qdb
653 options because in those cases W is limited by
654 query-dependent bands.
655
656 .TP
657 .B --toponly
658 Only search the top (Watson) strand of target sequences in
659 .I <seqdb>.
660 By default, both strands are searched. This will halve the database
661 size (Z).
662
663 .TP
664 .B --bottomonly
665 Only search the bottom (Crick) strand of target sequences in
666 .I <seqdb>.
667 By default, both strands are searched.
668 This will halve the database
669 size (Z).
670
671 .TP
672 .BI --tformat " <s>"
673 Assert that the target sequence database file is in format
674 .I <s>.
675 Accepted formats include
676 .I fasta,
677 .I embl,
678 .I genbank,
679 .I ddbj,
680 .I stockholm,
681 .I pfam,
682 .I a2m,
683 .I afa,
684 .I clustal,
685 and
686 .I phylip
687 The default is to autodetect the format of the file.
688
689 .TP
690 .BI --cpu " <n>"
691 Set the number of parallel worker threads to
692 .IR <n> .
693 On multicore machines, the default is 4.
694 You can also control this number by setting an environment variable,
695 .IR INFERNAL_NCPU .
696 There is also a master thread, so the actual number of threads that
697 Infernal spawns is
698 .IR <n> +1.
699 This option is not available if Infernal was compiled with POSIX threads
700 support turned off.
701
702 .TP
703 .B --stall
704 For debugging the MPI master/worker version: pause after start, to
705 enable the developer to attach debuggers to the running master and
706 worker(s) processes. Send SIGCONT signal to release the pause.
707 (Under gdb:
708 .I (gdb) signal SIGCONT)
709 (Only available if optional MPI support was enabled at compile-time.)
710
711 .TP
712 .B --mpi
713 Run in MPI master/worker mode, using
714 .I mpirun.
715 To use
716 .B --mpi,
717 the sequence file must have first been 'indexed' using the
718 .B esl-sfetch
719 program, which is included with Infernal, in the
720 .I easel/miniapps/
721 subdirectory.
722 (Only available if optional MPI support was enabled at compile-time.)
723
724 .SH SEE ALSO
725
726 See
727 .B infernal(1)
728 for a master man page with a list of all the individual man pages
729 for programs in the Infernal package.
730
731 .PP
732 For complete documentation, see the user guide that came with your
733 Infernal distribution (Userguide.pdf); or see the Infernal web page
734 (@INFERNAL_URL@).
735
736 .SH COPYRIGHT
737
738 .nf
739 @INFERNAL_COPYRIGHT@
740 @INFERNAL_LICENSE@
741 .fi
742
743 For additional information on copyright and licensing, see the file
744 called COPYRIGHT in your Infernal source distribution, or see the Infernal
745 web page
746 (@INFERNAL_URL@).
747
748 .SH AUTHOR
749
750 .nf
751 http://eddylab.org
752 .fi