cmbuild(1)
π cmbuild(1) β Infernal Manual, bestie edition π
okay so listen, this is the Infernal Manual page for cmbuild(1), and it is genuinely one of the most iconic little tools in the whole RNA fam. We're building covariance models out here. Grab a strawberry drink π and let's go.
β¨ NAME β¨
cmbuild β construct covariance model(s) from structurally annotated RNA multiple sequence alignment(s). That's the whole vibe. πΈ
β¨ SYNOPSIS β¨
cmbuild [options] <cmfile_out> <msafile>
π¦ DESCRIPTION π¦
For each multiple sequence alignment hanging out in <msafile>, cmbuild builds a covariance model and saves it to a brand new file <cmfile_out>. Like, one CM per alignment, no cap.
Your alignment file has to be in Stockholm or SELEX format, and it absolutely must contain consensus secondary structure annotation. Why? Because cmbuild uses that consensus structure to figure out the architecture of the CM. No structure, no architecture, no slay. π
<msafile> is allowed to be '-' (a dash), which means read this input from stdin instead of from a file. BUT β and this is important, bestie β to use '-' you also have to specify the alignment file format with --informat <s>, like --informat stockholm. Why though? Because of a current limitation in our implementation: MSA file formats cannot be autodetected in a nonrewindable input stream. So it literally cannot peek. π
<cmfile_out> may not be '-' (stdout), because sending the CM file to stdout would conflict with the other text output of the program. So don't even try it. π
On top of writing the CM(s) to <cmfile_out>, cmbuild also prints a single line per model created to stdout. Each line has these fields, and yes you need all of them:
alnβ the index of the alignment used to build the CMidxβ the index of the CM in<cmfile_out>nameβ the name of the CMnseqβ the number of sequences in the alignment used to build the CMeff_nseqβ the effective number of sequences used to build the modelalenβ the length of the alignment used to build the CMclenβ the number of columns from the alignment defined as consensus (match) columnsbpsβ the number of basepairs in the CMbifsβ the number of bifurcations in the CMrel entropy: CMβ the total relative entropy of the model divided by the number of consensus columnsrel entropy: HMMβ the total relative entropy of the model ignoring secondary structure divided by the number of consensus columnsdescriptionβ description of the model/alignment
π OPTIONS π
-hβ Help! Prints a brief reminder of command line usage and the available options. The lil "hey what are the flags again" button. π«Ά-n <s>β Name the new CM<s>. By default it uses the name of the alignment (if one is present in the<msafile>), or, failing that, the name of the<msafile>. Important plot twist: if<msafile>contains more than one alignment,-ndoesn't work, and every alignment must have a name annotated in the<msafile>(as in Stockholm#=GF IDannotation). So like, name your children. π-Fβ Allow<cmfile_out>to be overwritten. Without this option, if<cmfile_out>already exists,cmbuildexits with an error. It's giving "we don't do destructive surprises here." π-o <f>β Direct the summary output to file<f>, rather than to stdout.-O <f>β After each model is constructed, resave annotated source alignments to a file<f>in Stockholm format. Sequences are annotated with what relative sequence weights were assigned. The alignments are also annotated with a reference annotation line indicating which columns were assigned as consensus. If the source alignment had reference annotation ("#=GC RF") it will be replaced with the consensus residue of the model for consensus columns and'.'for insert columns β unless the--handoption was used for specifying consensus positions, in which case it will be unchanged. Any sequences defined as fragments will be annotated as well, using only~characters before the first residue and after the final residue, unless the--fraggivenoption was used. So much annotation. So much lore. β¨--devhelpβ Print help, as with-h, but also include expert options that are not displayed with-h. These expert options are not expected to be relevant for the vast majority of users and so are not described in the manual page. The only resources for understanding what they actually do are the brief one-line descriptions output when--devhelpis enabled, and the source code. iykyk. π₯
π OPTIONS CONTROLLING MODEL CONSTRUCTION π
--fastβ Define consensus columns automatically as those that have a fraction >=symfracof residues as opposed to gaps. (See below for the--symfracoption.) This is the default. The classic. The main character. β--handβ Use reference coordinate annotation (#=GC RFline, in Stockholm) to determine which columns are consensus, and which are inserts. Any non-gap character indicates a consensus column. (For example, mark consensus columns with"x", and insert columns with".".) Heads up: this option was called--rfin previous versions of Infernal (0.1 through 1.0.2). π§--symfrac <x>β Define the residue fraction threshold necessary to define a consensus column when not using--hand. The default is0.5. The symbol fraction in each column is calculated after taking relative sequence weighting into account. Setting this to0.0means that every alignment column will be assigned as consensus, which may be useful in some cases. Setting it to1.0means that only columns that include 0 gaps will be assigned as consensus. This option replaces the--gapthresh <y>option from previous versions of Infernal (0.1 through 1.0.2), with<x>equal to (1.0-<y>). For example to reproduce behavior for a command ofcmbuild --gapthresh 0.8in a previous version, usecmbuild --symfrac 0.2with this version. Math is math. π--fragthresh <x>β We only want to count terminal gaps as deletions if the aligned sequence is known to be full-length, not if it is a fragment (for instance, because only part of it was sequenced). A fragment is defined as any aligned sequence for which the fractional span β defined as its aligned length from its first to last residue divided by the total alignment length β is less than"0.8"(by default). Note that this differs from the way HMMER defines fragments (as of v3.3.2). Setting--fragthresh 0will define no sequence as a fragment; you might want to do this if you know you have a carefully curated alignment of full-length sequences or want to mimic the behavior of older versions of Infernal (v1.1 to v1.1.4). Setting--fragthresh 1will define all sequences as fragments. The--fragnrfposand--fraggivenoffer alternative ways to define fragments.--fragnrfpos <n>β Define a sequence as a fragment if it has more than<n>gaps in terminal consensus positions at the 5' or 3' ends. This option can only be used in combination with the--handoption, and if it is used, the--fragthreshoption is ignored. Package deal, bestie. π--fraggivenβ Do not infer which sequences are fragments based on their lengths, but do use fragment information in the input alignment, if there is any. For a sequence in the input alignment to be considered a fragment, all positions before (5' of) the first nucleotide and all positions after (3' of) the final nucleotide must be~symbols. Importantly,~symbols are not allowed anywhere else in the alignment. That is a hard rule. π¨--nossβ Ignore the secondary structure annotation, if any, in<msafile>and build a CM with zero basepairs. This model will be similar to a profile HMM and thecmsearchandcmscanprograms will use HMM algorithms which are faster than CM ones for this model. Additionally, a zero basepair model need not be calibrated withcmcalibrateprior to runningcmsearchwith it. The--nossoption must be used if there is no secondary structure annotation in<msafile>. No structure? Then this is your only path. π--rsearch <f>β Parameterize emission scores a la RSEARCH, using the RIBOSUM matrix in file<f>. With--rsearchenabled, all alignments in<msafile>must contain exactly one sequence or the--calloption must also be enabled. All positions in each sequence will be considered consensus"columns". Actually, the emission scores for these models will not be identical to RIBOSUM scores due to differences in the modelling strategy between Infernal and RSEARCH, but they will be as similar as possible. RIBOSUM matrix files are included with Infernal in the"matrices/"subdirectory of the top-level"infernal-xxx"directory. RIBOSUM matrices are substitution score matrices trained specifically for structural RNAs with separate single stranded residue and base pair substitution scores. For more information see the RSEARCH publication (Klein and Eddy, BMC Bioinformatics 4:44, 2003). Academic citation moment, we love to see it. π--consrfβ With--handuse the model's consensus sequence for the model reference annotation instead of the RF annotation from the input alignment.
π§ OTHER MODEL CONSTRUCTION OPTIONS π§
--null <f>β Read a null model from<f>. The null model defines the probability of each RNA nucleotide in background sequence; the default is to use0.25for each nucleotide. The format of null files is specified in the user guide.--prior <f>β Read a Dirichlet prior from<f>, replacing the default mixture Dirichlet. The format of prior files is specified in the user guide.
Use --devhelp to see additional, otherwise undocumented, model construction options. π
β¨ OPTIONS CONTROLLING RELATIVE WEIGHTS β¨
okay so cmbuild uses an ad hoc sequence weighting algorithm to downweight closely related sequences and upweight distantly related ones. the way that works is it makes models less biased by uneven phylogenetic representation. for example, two identical sequences would typically each receive half the weight that one sequence would. these options control which algorithm gets used.
--wpbβ Use the Henikoff position-based sequence weighting scheme [Henikoff and Henikoff, J. Mol. Biol. 243:574, 1994]. This is the default.--wgscβ Use the Gerstein/Sonnhammer/Chothia weighting algorithm [Gerstein et al, J. Mol. Biol. 235:1067, 1994].--wnoneβ Turn sequence weighting off; e.g. explicitly set all sequence weights to1.0.--wgivenβ Use sequence weights as given in annotation in the input alignment file. If no weights were given, assume they are all1.0. The default is to determine new sequence weights by the Gerstein/Sonnhammer/Chothia algorithm, ignoring any annotated weights.--wblosumβ Use the BLOSUM filtering algorithm to weight the sequences, instead of the default GSC weighting. Cluster the sequences at a given percentage identity (see--wid); assign each cluster a total weight of1.0, distributed equally amongst the members of that cluster.--wid <x>β Controls the behavior of the--wblosumweighting option by setting the percent identity for clustering the alignment to <x>.
π OPTIONS CONTROLLING EFFECTIVE SEQUENCE NUMBER π
After relative weights are determined, they are normalized to sum to a total effective sequence number, eff_nseq. This number may be the actual number of sequences in the alignment, but it is almost always smaller than that. The default entropy weighting method (--eent) reduces the effective sequence number to reduce the information content (relative entropy, or average expected score on true homologs) per consensus position. The target relative entropy is controlled by a two-parameter function, where the two parameters are settable with --ere and --esigma.
--eentβ Use the entropy weighting strategy to determine the effective sequence number that gives a target mean match state relative entropy. This option is the default, and can be turned off with--enone. The default target mean match state relative entropy is0.59bits for models with at least 1 basepair and0.38bits for models with zero basepairs, but can be changed with--ere. The default of0.59or0.38bits is automatically changed if the total relative entropy of the model (summed match state relative entropy) is less than a cutoff, which is controlled by the--esigmaoption. If you really want to play with that option, consult the source code. Additionally, the effective sequence number cannot be larger than the number of sequences in the alignment, although this can be overridden to set the maximum possible effective sequence number with the--emaxseqoption.--enoneβ Turn off the entropy weighting strategy. The effective sequence number is just the number of sequences in the alignment.--ere <x>β Set the target mean match state relative entropy as <x>. By default the target relative entropy per match position is0.59bits for models with at least 1 basepair and0.38for models with zero basepairs.--eminseq <x>β Define the minimum allowed effective sequence number as <x>.--emaxseq <x>β Define the maximum allowed effective sequence number as <x>. This number can be larger than the number of sequences in the alignment.--ehmmre <x>β Set the target HMM mean match state relative entropy as <x>. Entropy for basepairing match states is calculated using marginalized basepair emission probabilities.--eset <x>β Set the effective sequence number for entropy weighting as <x>.
π¦ OPTIONS CONTROLLING FILTER P7 HMM CONSTRUCTION π¦
For each CM that cmbuild constructs, an accompanying filter p7 HMM is built from the input alignment as well. These options control filter HMM construction:
--p7ere <x>β Set the target mean match state relative entropy for the filterp7HMM as <x>. By default the target relative entropy per match position is0.38bits.--p7mlβ Use a maximum likelihoodp7HMM built from the CM as the filter HMM. This HMM will be as similar as possible to the CM (while necessarily ignorant of secondary structure).
Use --devhelp to see additional, otherwise undocumented, filter HMM construction options.
πΈ OPTIONS CONTROLLING FILTER P7 HMM CALIBRATION πΈ
After building each filter HMM, cmbuild determines appropriate E-value parameters to use during filtering in cmsearch and cmscan by sampling a set of sequences and searching them with each HMM filter configuration and algorithm.
--EmN <n>β Set the number of sampled sequences for local MSV filter HMM calibration to <n>.200by default.--EvN <n>β Set the number of sampled sequences for local Viterbi filter HMM calibration to <n>.200by default.--ElfN <n>β Set the number of sampled sequences for local Forward filter HMM calibration to <n>.200by default.--EgfN <n>β Set the number of sampled sequences for glocal Forward filter HMM calibration to <n>.200by default.
Use --devhelp to see additional, otherwise undocumented, filter HMM calibration options.
π OPTIONS FOR REFINING THE INPUT ALIGNMENT π
--refine <f>β Attempt to refine the alignment before building the CM using expectation-maximization (EM). A CM is first built from the initial alignment as usual. Then, the sequences in the alignment are realigned optimally (with the HMM banded CYK algorithm, optimal means optimal given the bands) to the CM, and a new CM is built from the resulting alignment. The sequences are then realigned to the new CM, and a new CM is built from that alignment. This is continued until convergence, specifically when the alignments for two successive iterations are not significantly different (the summed bit scores of all the sequences in the alignment changes less than1%between two successive iterations). The final alignment (the alignment used to build the CM that gets written to<cmfile_out>) is written to<f>.-lβ With--refine, turn on the local alignment algorithm, which allows the alignment to span two or more subsequences if necessary (e.g. if the structures of the query model and target sequence are only partially shared), allowing certain large insertions and deletions in the structure to be penalized differently than normal indels. The default is to globally align the query model to the target sequences.--gibbsβ Modifies the behavior of--refineso Gibbs sampling is used instead of EM. The difference is that during the alignment stage the alignment is not necessarily optimal, instead an alignment (parsetree) for each sequences is sampled from the posterior distribution of alignments as determined by the Inside algorithm. Due to this sampling step--gibbsis non-deterministic, so different runs with the same alignment may yield different results. This is not true when--refineis used without the--gibbsoption, in which case the final alignment and CM will always be the same. When--gibbsis enabled, the--seed <n>option can be used to seed the random number generator predictably, making the results reproducible. The goal of the--gibbsoption is to help expert RNA alignment curators refine structural alignments by allowing them to observe alternative high scoring alignments.--seed <n>β Seed the random number generator with <n>, an integer>= 0. This option can only be used in combination with--gibbs. If <n> is nonzero, stochastic sampling of alignments will be reproducible; the same command will give the same results. If <n> is0, the random number generator is seeded arbitrarily, and stochastic samplings may vary from run to run of the same command. The default seed is0.--cykβ With--refine, align with the CYK algorithm. By default the optimal accuracy algorithm is used. There is more information on this in thecmalignmanual page.--notruncβ With--refine, turn off the truncated alignment algorithm. There is more information on this in thecmalignmanual page.--missβ With--refine, in the final alignment and each intermediate alignment, consider all sequences with terminal gaps as fragments for purposes of building models from those alignments. You may want to do this if you have many sequences that are not full length, e.g. fragmentary because only part of it was sequenced.
Use --devhelp to see additional, otherwise undocumented, alignment refinement options as well as other output file options and options for building multiple models for a single alignment.
π₯ SEE ALSO π₯
See infernal(1) for a master man page with a list of all the individual man pages for programs in the Infernal package.
For complete documentation, see the user guide that came with your Infernal distribution (Userguide.pdf); or see the Infernal web page (http://eddylab.org/infernal/).
π 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 Infernal source distribution, or see the Infernal web page (http://eddylab.org/infernal/).
π AUTHOR π
This page is from Infernal 1.1.5, dated Sep 2023, and it's the cmbuild(1) manual page β periodt. π β¨
π¦ where this page comes from
- debian trixie: infernal 1.1.5-3 Β· GPL-3.0-only
- ubuntu noble: infernal 1.1.5-2 Β· GPL-3.0-only
- ubuntu questing: infernal 1.1.5-3
- ubuntu resolute: infernal 1.1.5-3build1 Β· GPL-3.0-only
- ubuntu stonking: infernal 1.1.5-4 Β· GPL-3.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms