Debian Codegraph @

documentation/man/cmbuild.man.in

raw
1 .TH "cmbuild" 1 "@INFERNAL_DATE@" "Infernal @INFERNAL_VERSION@" "Infernal Manual"
2
3 .SH NAME
4 cmbuild - construct covariance model(s) from structurally annotated RNA multiple sequence alignment(s)
5
6 .SH SYNOPSIS
7 .B cmbuild
8 .I [options]
9 .I <cmfile_out>
10 .I <msafile>
11
12
13 .SH DESCRIPTION
14
15 For each multiple sequence alignment in
16 .I <msafile>
17 build a covariance model
18 and save it to a new file
19 .I <cmfile_out>.
20
21 .PP
22 The alignment file must be in Stockholm or SELEX format, and
23 must contain consensus secondary structure annotation.
24 .B cmbuild
25 uses the consensus structure to determine the architecture
26 of the CM.
27
28 .PP
29 .I <msafile>
30 may be '-' (dash), which means
31 reading this input from
32 .I stdin
33 rather than a file.
34 To use '-', you must also specify the
35 alignment file format with
36 .BI --informat " <s>",
37 as in
38 .B --informat stockholm
39 (because of a current limitation in our implementation,
40 MSA file formats cannot be autodetected in a nonrewindable
41 input stream.)
42
43 .PP
44 .I <cmfile_out>
45 may not be '-'
46 .I (stdout),
47 because sending the CM file to
48 .I stdout
49 would conflict with the other text
50 output of the program.
51
52 .PP
53 In addition to writing CM(s) to
54 .I <cmfile_out>,
55 .B cmbuild
56 also outputs a single line for each model created to stdout. Each line has
57 the following fields: "aln": the index of the alignment used to build
58 the CM; "idx": the index of the CM in the
59 .I <cmfile_out>;
60 "name": the name of the CM;
61 "nseq": the number of sequences in the alignment used to build the CM;
62 "eff_nseq": the effective number of sequences used to build the model;
63 "alen": the length of the alignment used to build the CM;
64 "clen": the number of columns from the alignment defined as consensus
65 (match) columns; "bps": the number of basepairs in the CM;
66 "bifs": the number of bifurcations in the CM;
67 "rel entropy: CM": the total relative entropy of the model divided by
68 the number of consensus columns;
69 "rel entropy: HMM": the total relative entropy of the model
70 ignoring secondary structure divided by the number of consensus columns.
71 "description": description of the model/alignment.
72
73 .SH OPTIONS
74
75 .TP
76 .B -h
77 Help; print a brief reminder of command line usage and available
78 options.
79
80 .TP
81 .BI -n " <s>"
82 Name the new CM
83 .I <s>.
84 The default is to use the name of the alignment (if one is present in
85 the
86 .I <msafile>),
87 or, failing that, the name of the
88 .I <msafile>.
89 If
90 .I <msafile>
91 contains more than one alignment,
92 .I -n
93 doesn't work, and every alignment must have a name
94 annotated in the
95 .I <msafile>
96 (as in Stockholm #=GF ID annotation).
97
98 .TP
99 .BI -F
100 Allow
101 .I <cmfile_out>
102 to be overwritten. Without this option, if
103 .I <cmfile_out>
104 already exists,
105 .B cmbuild
106 exits with an error.
107
108 .TP
109 .BI -o " <f>"
110 Direct the summary output to file
111 .I <f>,
112 rather than to
113 .I stdout.
114
115 .TP
116 .BI -O " <f>"
117 After each model is constructed, resave annotated
118 source alignments to a file
119 .I <f>
120 in Stockholm format. Sequences are annoted with what relative
121 sequence weights were assigned. The alignments are also annotated
122 with a reference annotation line indicating which columns were
123 assigned as consensus. If the source alignment had reference
124 annotation ("#=GC RF") it will be replaced with the consensus residue
125 of the model for consensus columns and '.' for insert columns, unless
126 the
127 .B --hand
128 option was used for specifying consensus positions, in which case it
129 will be unchanged. Any sequences defined as fragments will be
130 annotated as well, using only
131 .B ~
132 characters before the first residue and after the final residue,
133 unless the
134 .B --fraggiven
135 option was used.
136
137 .B --devhelp
138 Print help, as with
139 .B "-h",
140 but also include expert options that are not displayed with
141 .B "-h".
142 These expert options are not expected to be relevant for the vast
143 majority of users and so are not described in the manual page. The
144 only resources for understanding what they actually do are the brief
145 one-line descriptions output when
146 .B "--devhelp"
147 is enabled, and the source code.
148
149 .SH OPTIONS CONTROLLING MODEL CONSTRUCTION
150
151 .TP
152 .B --fast
153 Define consensus columns automatically as those that have a fraction >=
154 .B symfrac
155 of residues as opposed to gaps. (See below for the
156 .B --symfrac
157 option.) This is the default.
158
159 .TP
160 .B --hand
161 Use reference coordinate annotation (#=GC RF line, in Stockholm)
162 to determine which columns are consensus, and which are inserts.
163 Any non-gap character indicates a consensus column. (For example,
164 mark consensus columns with "x", and insert columns with ".".) This
165 option was called
166 .B --rf
167 in previous versions of Infernal (0.1 through 1.0.2).
168
169 .TP
170 .BI --symfrac " <x>"
171 Define the residue fraction threshold necessary to define a
172 consensus column when not using
173 .B --hand.
174 The default is 0.5. The symbol fraction in each column is calculated
175 after taking relative sequence weighting into account. Setting this
176 to 0.0 means that every alignment column will be assigned as
177 consensus, which may be useful in some cases. Setting it to 1.0 means
178 that only columns that include 0 gaps will be assigned as consensus.
179 This option replaces the
180 .BI --gapthresh " <y>"
181 option from previous versions of Infernal (0.1 through 1.0.2), with
182 .I <x>
183 equal to (1.0 -
184 .I <y>).
185 For example to reproduce behavior for a command of
186 .B cmbuild --gapthresh " 0.8"
187 in a previous version, use
188 .B cmbuild --symfrac " 0.2"
189 with this version.
190
191 .TP
192 .BI --fragthresh " <x>"
193 We only want to count terminal gaps as deletions if the aligned
194 sequence is known to be full-length, not if it is a fragment (for
195 instance, because only part of it was sequenced). A fragment
196 is defined as any aligned sequence for which the fractional span,
197 defined as its aligned length from its first to last residue divided
198 by the total alignment length, is less than "0.8" (by default). Note
199 that this differs from the way HMMER defines fragments (as of v3.3.2).
200 Setting
201 .BI --fragthresh " 0"
202 will define no sequence as a
203 fragment; you might want to do this if you know you have a carefully
204 curated alignment of full-length sequences or want to mimic the
205 behavior of older versions of Infernal (v1.1 to v1.1.4). Setting
206 .BI --fragthresh " 1"
207 will define all sequences as fragments.
208 The
209 .B --fragnrfpos
210 and
211 .B --fraggiven
212 offer alternative ways to define fragments.
213
214 .TP
215 .BI --fragnrfpos " <n>"
216 Define a sequence as a fragment if it has more than
217 .I <n>
218 gaps in terminal consensus positions at the 5'
219 .B or
220 3' ends. This option can only be used in combination with the
221 .B --hand
222 option, and if it is used, the
223 .B --fragthresh
224 option is ignored.
225
226 .TP
227 .B --fraggiven
228 Do not infer which sequences are fragments based on their lengths but
229 .B do
230 use fragment information in the input alignment, if there is any.
231 For a sequence in the input alignment to be considered a fragment, all positions before (5' of) the
232 first nucleotide and all positions after (3' of) the final nucleotide must be
233 .B ~
234 symbols. Importantly,
235 .B ~
236 symbols are not allowed anywhere else in the alignment.
237
238 .TP
239 .BI --noss
240 Ignore the secondary structure annotation, if any, in
241 .I <msafile>
242 and build a CM with zero basepairs. This model will be similar
243 to a profile HMM and the
244 .B cmsearch
245 and
246 .B cmscan
247 programs will use HMM algorithms which are faster than CM ones for
248 this model. Additionally, a zero basepair model need not be calibrated with
249 .B cmcalibrate
250 prior to running
251 .B cmsearch
252 with it. The
253 .B --noss
254 option must be used if there is no secondary structure annotation in
255 .B <msafile>.
256
257 .TP
258 .BI --rsearch " <f>"
259 Parameterize emission scores a la RSEARCH, using the RIBOSUM
260 matrix in file
261 .I <f>.
262 With
263 .B --rsearch
264 enabled, all alignments in
265 .I <msafile>
266 must contain exactly one sequence or the
267 .B --call
268 option must also be enabled. All positions in each sequence will be
269 considered consensus "columns". Actually, the emission scores for
270 these models will not be identical to RIBOSUM scores due of
271 differences in the modelling strategy between Infernal and RSEARCH,
272 but they will be as similar as possible. RIBOSUM matrix files are
273 included with Infernal in the "matrices/" subdirectory of the
274 top-level "infernal-xxx" directory. RIBOSUM matrices are substitution
275 score matrices trained specifically for structural RNAs with separate
276 single stranded residue and base pair substitution scores. For more
277 information see the RSEARCH publication (Klein and Eddy, BMC
278 Bioinformatics 4:44, 2003).
279
280 .TP
281 .B --consrf
282 With
283 .B --hand
284 use the model's consensus sequence for the model
285 reference annotation instead of the RF annotation from the input
286 alignment.
287
288 .SH OTHER MODEL CONSTRUCTION OPTIONS
289
290 .TP
291 .BI --null " <f>"
292 Read a null model from
293 .I <f>.
294 The null model defines the probability of each RNA nucleotide in
295 background sequence, the default is to use 0.25 for each nucleotide.
296 The format of null files is specified in the user guide.
297
298 .TP
299 .BI --prior " <f>"
300 Read a Dirichlet prior from
301 .I <f>,
302 replacing the default mixture Dirichlet.
303 The format of prior files is specified in the user guide.
304
305 .PP
306 Use
307 .B --devhelp
308 to see additional, otherwise undocumented, model construction options.
309
310 .SH OPTIONS CONTROLLING RELATIVE WEIGHTS
311
312 .B cmbuild
313 uses an ad hoc sequence weighting algorithm to downweight
314 closely related sequences and upweight distantly related ones. This
315 has the effect of making models less biased by uneven phylogenetic
316 representation. For example, two identical sequences would typically
317 each receive half the weight that one sequence would. These options
318 control which algorithm gets used.
319
320 .TP
321 .B --wpb
322 Use the Henikoff position-based sequence weighting scheme [Henikoff
323 and Henikoff, J. Mol. Biol. 243:574, 1994]. This is the default.
324
325 .TP
326 .B --wgsc
327 Use the Gerstein/Sonnhammer/Chothia weighting algorithm [Gerstein et
328 al, J. Mol. Biol. 235:1067, 1994].
329
330 .TP
331 .B --wnone
332 Turn sequence weighting off; e.g. explicitly set all
333 sequence weights to 1.0.
334
335 .TP
336 .B --wgiven
337 Use sequence weights as given in annotation in the input alignment
338 file. If no weights were given, assume they are all 1.0. The default
339 is to determine new sequence weights by the
340 Gerstein/Sonnhammer/Chothia algorithm, ignoring any annotated weights.
341
342 .TP
343 .B --wblosum
344 Use the BLOSUM filtering algorithm to weight the sequences,
345 instead of the default GSC weighting.
346 Cluster the sequences at a given percentage identity (see
347 .B --wid);
348 assign each cluster a total weight of 1.0, distributed equally
349 amongst the members of that cluster.
350
351 .TP
352 .BI --wid " <x>"
353 Controls the behavior of the
354 .I --wblosum
355 weighting option by setting the percent identity for clustering the
356 alignment to
357 .I <x>.
358
359 .SH OPTIONS CONTROLLING EFFECTIVE SEQUENCE NUMBER
360
361 After relative weights are determined, they are normalized to sum to a
362 total effective sequence number,
363 .I eff_nseq.
364 This number may be the actual number of sequences in the alignment,
365 but it is almost always smaller than that.
366 The default entropy weighting method
367 .I (--eent)
368 reduces the effective sequence
369 number to reduce the information content (relative entropy, or average
370 expected score on true homologs) per consensus position. The target
371 relative entropy is controlled by a two-parameter function, where the
372 two parameters are settable with
373 .I --ere
374 and
375 .I --esigma.
376
377 .TP
378 .B --eent
379 Use the entropy weighting strategy to determine the effective sequence
380 number that gives a target mean match state relative entropy. This option
381 is the default, and can be turned off with
382 .B --enone.
383 The default target mean match state relative entropy is 0.59 bits for
384 models with at least 1 basepair and 0.38 bits for models with zero
385 basepairs, but can be
386 changed with
387 .B --ere.
388 The default of 0.59 or 0.38 bits is automatically changed if the total
389 relative entropy of the model (summed match state relative entropy)
390 is less than a cutoff, which is controlled by the
391 .B --esigma
392 option. If you really want to play with that option, consult the
393 source code.
394 Additionally, the effective sequence number cannot be larger than the
395 number of sequences in the alignment, although this can be overridden
396 to set the maximum possible effective sequence number with the
397 .B --emaxseq
398 option.
399
400 .TP
401 .B --enone
402 Turn off the entropy weighting strategy. The effective sequence number
403 is just the number of sequences in the alignment.
404
405 .TP
406 .BI --ere " <x>"
407 Set the target mean match state relative entropy as
408 .I <x>.
409 By default the target relative entropy per match position is 0.59 bits
410 for models with at least 1 basepair and 0.38 for models with zero
411 basepairs.
412
413 .TP
414 .BI --eminseq " <x>"
415 Define the minimum allowed effective sequence number as
416 .I <x>.
417
418 .TP
419 .BI --emaxseq " <x>"
420 Define the maximum allowed effective sequence number as
421 .I <x>.
422 This number can be larger than the number of sequences in the
423 alignment.
424
425 .TP
426 .BI --ehmmre " <x>"
427 Set the target HMM mean match state relative entropy as
428 .I <x>.
429 Entropy for basepairing match states is calculated using marginalized
430 basepair emission probabilities.
431
432 .TP
433 .BI --eset " <x>"
434 Set the effective sequence number for entropy weighting as
435 .I <x>.
436
437 .SH OPTIONS CONTROLLING FILTER P7 HMM CONSTRUCTION
438
439 For each CM that
440 .B cmbuild
441 constructs, an accompanying filter p7 HMM is built from the input
442 alignment as well. These options control filter HMM construction:
443
444 .TP
445 .BI --p7ere " <x>"
446 Set the target mean match state relative entropy for the filter p7 HMM
447 as
448 .I <x>.
449 By default the target relative entropy per match position is 0.38 bits.
450
451 .TP
452 .BI --p7ml
453 Use a maximum likelihood p7 HMM built from the CM as the filter
454 HMM. This HMM will be as similar as possible to the CM (while
455 necessarily ignorant of secondary structure).
456
457 .PP
458 Use
459 .B --devhelp
460 to see additional, otherwise undocumented, filter HMM construction options.
461
462 .SH OPTIONS CONTROLLING FILTER P7 HMM CALIBRATION
463
464 After building each filter HMM,
465 .B cmbuild
466 determines appropriate E-value parameters to use during filtering in
467 .B cmsearch
468 and
469 .B cmscan
470 by sampling a set of sequences and searching them with each HMM
471 filter configuration and algorithm.
472
473 .BI --EmN " <n>"
474 Set the number of sampled sequences for local MSV filter HMM calibration to
475 .I <n>.
476 200 by default.
477
478 .BI --EvN " <n>"
479 Set the number of sampled sequences for local Viterbi filter HMM calibration to
480 .I <n>.
481 200 by default.
482
483 .BI --ElfN " <n>"
484 Set the number of sampled sequences for local Forward filter HMM calibration to
485 .I <n>.
486 200 by default.
487
488 .BI --EgfN " <n>"
489 Set the number of sampled sequences for glocal Forward filter HMM
490 calibration to
491 .I <n>.
492 200 by default.
493
494 .PP
495 Use
496 .B --devhelp
497 to see additional, otherwise undocumented, filter HMM calibration options.
498
499 .SH OPTIONS FOR REFINING THE INPUT ALIGNMENT
500
501 .TP
502 .BI --refine " <f>"
503 Attempt to refine the alignment before building the CM using
504 expectation-maximization (EM). A CM is first built from the initial
505 alignment as usual. Then, the sequences in the alignment are realigned
506 optimally (with the HMM banded CYK algorithm, optimal means optimal
507 given the bands) to the CM, and a new CM is built from the resulting
508 alignment. The sequences are then realigned to the new CM, and a new
509 CM is built from that alignment. This is continued until convergence,
510 specifically when the alignments for two successive iterations are not
511 significantly different (the summed bit scores of all the sequences in
512 the alignment changes less than 1% between two successive
513 iterations). The final alignment (the alignment used to build the CM
514 that gets written to
515 .I <cmfile_out>)
516 is written to
517 .I <f>.
518
519 .TP
520 .B -l
521 With
522 .B --refine,
523 turn on the local alignment algorithm, which allows the alignment
524 to span two or more subsequences if necessary (e.g. if the structures
525 of the query model and target sequence are only partially shared),
526 allowing certain large insertions and deletions in the structure
527 to be penalized differently than normal indels.
528 The default is to globally align the query model to the target
529 sequences.
530
531 .TP
532 .B --gibbs
533 Modifies the behavior of
534 .B --refine
535 so Gibbs sampling is used instead of EM. The difference is that
536 during the alignment stage the alignment is not necessarily optimal,
537 instead an alignment (parsetree) for each sequences is sampled from the
538 posterior distribution of alignments as determined by the Inside
539 algorithm. Due to this sampling step
540 .B --gibbs
541 is non-deterministic, so different runs with the same alignment may
542 yield different results. This is not true when
543 .B --refine
544 is used without the
545 .B --gibbs
546 option, in which case the final alignment and CM will always be the
547 same. When
548 .B --gibbs
549 is enabled, the
550 .B --seed " <n>"
551 option can be used to seed the random number generator predictably,
552 making the results reproducible.
553 The goal of the
554 .B --gibbs
555 option is to help expert RNA alignment curators refine structural
556 alignments by allowing them to observe alternative high scoring
557 alignments.
558
559 .TP
560 .BI --seed " <n>"
561 Seed the random number generator with
562 .I <n>,
563 an integer >= 0.
564 This option can only be used in combination with
565 .B --gibbs.
566 If
567 .I <n>
568 is nonzero, stochastic sampling of alignments will be reproducible; the same
569 command will give the same results.
570 If
571 .I <n>
572 is 0, the random number generator is seeded arbitrarily, and
573 stochastic samplings may vary from run to run of the same command.
574 The default seed is 0.
575
576 .TP
577 .B --cyk
578 With
579 .B --refine,
580 align with the CYK algorithm. By default the optimal accuracy
581 algorithm is used. There is more information on this in the
582 .B cmalign
583 manual page.
584
585 .TP
586 .B --notrunc
587 With
588 .B --refine,
589 turn off the the truncated alignment algorithm. There is more
590 information on this in the
591 .B cmalign
592 manual page.
593
594 .TP
595 .B --miss
596 With
597 .B --refine,
598 in the final alignment and each intermediate alignment, consider all
599 sequences with terminal gaps as fragments for purposes of building
600 models from those alignments. You may want to do this if you have many
601 sequences that are not full length, e.g. fragmentary because only part
602 of it was sequenced.
603
604 .PP
605 Use
606 .B --devhelp
607 to see additional, otherwise undocumented, alignment refinement
608 options as well as other output file options and options for building
609 multiple models for a single alignment.
610
611 .SH SEE ALSO
612
613 See
614 .B infernal(1)
615 for a master man page with a list of all the individual man pages
616 for programs in the Infernal package.
617
618 .PP
619 For complete documentation, see the user guide that came with your
620 Infernal distribution (Userguide.pdf); or see the Infernal web page
621 (@INFERNAL_URL@).
622
623
624 .SH COPYRIGHT
625
626 .nf
627 @INFERNAL_COPYRIGHT@
628 @INFERNAL_LICENSE@
629 .fi
630
631 For additional information on copyright and licensing, see the file
632 called COPYRIGHT in your Infernal source distribution, or see the Infernal
633 web page
634 (@INFERNAL_URL@).
635
636 .SH AUTHOR
637
638 .nf
639 http://eddylab.org
640 .fi