| 1 |
\section{Introduction} |
| 2 |
\label{section:introduction} |
| 3 |
\setcounter{footnote}{0} |
| 4 |
|
| 5 |
Infernal is used to search sequence databases for homologs of |
| 6 |
structural RNA sequences, and to make sequence- and structure-based |
| 7 |
RNA sequence alignments. Infernal builds a \emph{profile} from a |
| 8 |
structurally annotated multiple sequence alignment of an RNA family |
| 9 |
with a position-specific scoring system for substitutions, insertions, |
| 10 |
and deletions. Positions in the profile that are basepaired in the |
| 11 |
h consensus secondary structure of the alignment are modeled as |
| 12 |
dependent on one another, allowing Infernal's scoring system to |
| 13 |
consider the secondary structure, in addition to the primary sequence, |
| 14 |
of the family being modeled. Infernal profiles are probabilistic |
| 15 |
models called ``covariance models'', a specialized type of stochastic |
| 16 |
context-free grammar (SCFG) \citep{Lari90}. |
| 17 |
|
| 18 |
Compared to other alignment and database search tools based only on |
| 19 |
sequence comparison, Infernal aims to be significantly more accurate |
| 20 |
and more able to detect remote homologs because it models sequence |
| 21 |
and structure. But modeling structure comes at a high computational |
| 22 |
cost, and the slow speed of CM homology searches has been a serious |
| 23 |
limitation of previous versions. With |
| 24 |
version 1.1, typical homology searches are now about 100x faster, |
| 25 |
thanks to the incorporation of accelerated HMM methods from the HMMER3 |
| 26 |
software package (\url{http://hmmer.org}), making Infernal a much more |
| 27 |
practical tool for RNA sequence analysis. |
| 28 |
|
| 29 |
\subsection{How to avoid reading this manual} |
| 30 |
|
| 31 |
If you're like most people, you don't enjoy reading documentation. |
| 32 |
You're probably thinking: \pageref{manualend} pages of documentation, |
| 33 |
you must be joking! I just want to know that the software compiles, |
| 34 |
runs, and gives apparently useful results, before I read some |
| 35 |
\pageref{manualend} exhausting pages of someone's documentation. For |
| 36 |
cynics that have seen one too many software packages that don't work: |
| 37 |
|
| 38 |
\begin{itemize} |
| 39 |
\item Follow the quick installation instructions on page |
| 40 |
\pageref{section:installation}. An automated test suite |
| 41 |
is included, so you will know immediately if something |
| 42 |
went wrong.\footnote{Nothing should go wrong.} |
| 43 |
\item Go to the tutorial section on page |
| 44 |
\pageref{section:tutorial}, which walks you through some examples of |
| 45 |
using Infernal on real data. |
| 46 |
\end{itemize} |
| 47 |
|
| 48 |
Everything else, you can come back and read later. |
| 49 |
|
| 50 |
\subsection{What covariance models are} |
| 51 |
|
| 52 |
Covariance models (CMs) are statistical models of structurally |
| 53 |
annotated RNA multiple sequence alignments, or even of single |
| 54 |
sequences and structures. CMs are a specific formulation of profile |
| 55 |
stochastic context-free grammars (profile SCFG), which were introduced |
| 56 |
independently by Yasu Sakakibara in David Haussler's |
| 57 |
group \citep{Sakakibara94c} and by Sean Eddy and Richard |
| 58 |
Durbin \citep{Eddy94}. CMs are closely related to profile hidden Markov |
| 59 |
models (profile HMMs) commonly used for protein sequence analysis, but |
| 60 |
are more complex. CMs and profile HMMs both capture position-specific |
| 61 |
information about how conserved each column of the alignment is, and |
| 62 |
which residues are likely. However, in a profile HMM each position of |
| 63 |
the profile is treated independently, while in a CM basepaired |
| 64 |
positions are dependent on one another. The dependency between paired |
| 65 |
positions in a CM enables the profile to model \emph{covariation} at |
| 66 |
these positions, which often occurs between basepaired columns of |
| 67 |
structural RNA alignments. For many of these basepairs, it is not the |
| 68 |
specific nucleotides that make up the pair that is conserved by |
| 69 |
evolution, but rather that the pair maintain Watson-Crick |
| 70 |
basepairing. The added signal from covariation can be significant when |
| 71 |
using CMs for homology searches in large |
| 72 |
databases. Section~\ref{section:cmbuild} of this guide explains how a |
| 73 |
CM is constructed from a structurally annotated alignment using a toy |
| 74 |
example. |
| 75 |
|
| 76 |
CMs do have important limitations though. For example, a CM can only |
| 77 |
model what is called a ``well-nested'' set of basepairs. Formally, in |
| 78 |
a well-nested set of basepairs there are no two basepairs between |
| 79 |
positions $i:j$ and $k:l$ such that $i<k<j<l$. CMs cannot model |
| 80 |
pseudoknots in RNA secondary structures. Additionally, a CM only |
| 81 |
models a single consensus structure for the family it models. |
| 82 |
|
| 83 |
\subsection{Applications of covariance models} |
| 84 |
|
| 85 |
Infernal can be useful if you're intereseted in a particular RNA |
| 86 |
family. Imagine that you've carefully collected and aligned a set of |
| 87 |
homologs and have a predicted (or known) secondary structure for the |
| 88 |
family. Homology searches with BLAST using single sequences from your |
| 89 |
set of homologs may not reveal any additional homologs in sequence |
| 90 |
databases. You can build a CM from your alignment and redo your search |
| 91 |
using Infernal (this time only a single search) and you may find new |
| 92 |
homologs thanks to the added power of the profile-based sequence and |
| 93 |
structure scoring system of CMs. The Rfam database \citep{Gardner11} |
| 94 |
essentially does just this, but on a much larger scale. The Rfam |
| 95 |
curators maintain about 2000 RNA families, each represented by a |
| 96 |
multiple sequence alignment (called a \emph{seed} alignment) and a CM |
| 97 |
built from that alignment. Each Rfam release involves a search through |
| 98 |
a large EMBL-based nucleotide sequence database with each of the CMs |
| 99 |
which identifies putative structural RNAs in the database. The |
| 100 |
annotations of these RNAs, as well as the CMs and seed alignments are |
| 101 |
freely available. |
| 102 |
|
| 103 |
Automated genome annotation of structural RNAs can be performed with |
| 104 |
Infernal and a collection of CMs from Rfam, by searching |
| 105 |
through the genome of interest with each CM and collecting information |
| 106 |
on high-scoring hits. Previous versions of Infernal were too slow to |
| 107 |
be incorporated into many genome annotation pipelines, but we're |
| 108 |
hoping the improved speed of version 1.1 changes this. |
| 109 |
|
| 110 |
Another application is the automated construction and maintenance of |
| 111 |
large sequence- and structure-based multiple alignment databases. For |
| 112 |
example, the Ribosomal Database Project uses CMs of 16S small subunit |
| 113 |
ribosomal RNA (16S SSU rRNA) to maintain alignments of millions of 16S |
| 114 |
sequences \citep{Cole09}. The CMs (one archaeal 16S and one bacterial |
| 115 |
16S model) were built from training alignments of only a few hundred |
| 116 |
representative sequences. The manageable size of the training |
| 117 |
alignments means that they can be manually curated prior to building |
| 118 |
the model. Rfam is another example of this application too because |
| 119 |
Rfam creates and makes available multiple alignments (called \emph{full} |
| 120 |
alignments) of all of the hits from the database its curators believe |
| 121 |
to be real RNA homologs. |
| 122 |
|
| 123 |
Infernal can also be used to determine what types of RNAs exist in a |
| 124 |
particular sequence dataset. Suppose you're performing a metagenomics |
| 125 |
analysis and have collected sequences from an exotic environmental |
| 126 |
sample. You can download all the CMs from Rfam and use Infernal to |
| 127 |
search through all your sequences for high-scoring hits to the |
| 128 |
models. The types of structural RNAs identified in your sample can be |
| 129 |
informative as to what types of organisms are in your sample, and what |
| 130 |
types of biological processes they're carrying out. Version 1.1 |
| 131 |
includes a new program called \prog{cmscan} which is designed for just |
| 132 |
this type of analysis. |
| 133 |
|
| 134 |
\subsection{Infernal and HMMER, CMs and profile HMMs} |
| 135 |
|
| 136 |
Infernal is closely related to HMMER. In fact, HMMER is used as a |
| 137 |
library within the Infernal codebase. This allows Infernal to use the |
| 138 |
highly optimized profile HMM dynamic programming implementations in |
| 139 |
HMMER to greatly accelerate its homology searches. Also, the design |
| 140 |
and organization of the Infernal programs (e.g. \ccode{cmbuild}, |
| 141 |
\ccode{cmsearch}, \ccode{cmalign}) follows that in HMMER |
| 142 |
(\ccode{hmmbuild}, \ccode{hmmsearch}, \ccode{hmmalign}). And there are |
| 143 |
many functions in Infernal that are based on analogous ones in |
| 144 |
HMMER. The formatting of output is often very similar between |
| 145 |
these two software packages, and the user guide's are even organized |
| 146 |
and written in a similar (and, in some places, identical) way. |
| 147 |
|
| 148 |
This is, of course, on purpose. Since both packages are developed in |
| 149 |
the same lab, consistency simplifies the development and maintenance |
| 150 |
of the code, but we also do it to make the software (hopefully) easier |
| 151 |
to use (someone familiar with using HMMER should be able to pick up |
| 152 |
and use Infernal very easily, and vice versa). However, Infernal |
| 153 |
development tends to lag behind HMMER development as new ideas and |
| 154 |
algorithms are applied to the protein or DNA world with profile HMMs, |
| 155 |
and then later extended to CMs for use on RNAs. |
| 156 |
%Some of the current features of HMMER are on |
| 157 |
%the 00TODO list for Infernal (and by the time they're implemented they |
| 158 |
%will have been replaced on that list). |
| 159 |
|
| 160 |
This consistency is possible because profile HMMs and covariance |
| 161 |
models are related models with related applications. Profile HMMs are |
| 162 |
profiles of the conserved sequence of a protein or DNA family and CMs |
| 163 |
are profiles of the conserved sequence \emph{and} well-nested |
| 164 |
secondary structure of a structural RNA family. Applications of |
| 165 |
profile HMMs include annotating protein sequences in proteomes or |
| 166 |
protein sequence database and creating multiple alignments of protein |
| 167 |
domain families. And similarly applications of CMs include annotating |
| 168 |
structural RNAs in genomes or nucleotide sequence databases and |
| 169 |
creating sequence- and structure-based multiple alignments of RNA. |
| 170 |
The crucial difference is that CMs are able to model dependencies |
| 171 |
between a set of well-nested (non-pseudoknotted) basepaired positions |
| 172 |
in a structural RNA family. The statistical signal inherent in these |
| 173 |
dependencies is often significant enough to make modeling the family |
| 174 |
with a CM a noticeably more powerful approach than modeling the family |
| 175 |
with a profile HMM. |
| 176 |
|
| 177 |
\subsection{Differences between Infernal 1.1x and earlier versions} |
| 178 |
|
| 179 |
The most important difference between version 1.1 and the previous |
| 180 |
version (1.0.2) is the improved search speed that results from a new |
| 181 |
filter pipeline. The pipeline is explained more in |
| 182 |
section~\ref{section:pipeline}. Another important change is the |
| 183 |
introduction of the \prog{cmscan} program, for users who want to know |
| 184 |
what structural RNAs are present in a collection of sequences, such as |
| 185 |
a metagenomics dataset\footnote{\prog{cmscan} is similar to |
| 186 |
\prog{cmsearch} but is more convenient for some applications. One |
| 187 |
difference between the two programs is that results from \prog{cmscan} |
| 188 |
are organized per-sequence instead of per-model.}. Another new feature |
| 189 |
of version 1.1 is better handling of truncated RNAs, for which part of |
| 190 |
one or both ends of the RNA is missing due to a premature end of the |
| 191 |
sequence \citep{KolbeEddy09}. These types of fragmentary sequences are |
| 192 |
common in whole genome shotgun sequencing datasets. While previous |
| 193 |
versions of Infernal were prone to misalignment of these sequences, |
| 194 |
version 1.1 includes implementations of CM search and alignment |
| 195 |
algorithms specialized for truncated sequences \citep{KolbeEddy09} in |
| 196 |
\prog{cmsearch}, \prog{cmscan} and \prog{cmalign}. |
| 197 |
|
| 198 |
Model parameterization has changed in several minor ways. Mixture |
| 199 |
Dirichlet priors for emissions and single component Dirichlet priors |
| 200 |
for transitions have been reestimated using larger and more diverse |
| 201 |
datasets than the ones the previous priors were derived from |
| 202 |
(discussed in \citep{NawrockiEddy07}). Also, the definition of match |
| 203 |
and insert columns, previously determined by a simple majority rule |
| 204 |
using absolute counts (columns in which $\geq 50\%$ of columns include |
| 205 |
residues were match, all others were insert), now use \emph{weighted} |
| 206 |
counts (and same $>=50\%$ rule) after a sequence weighting algorithm |
| 207 |
is applied. And inserts before the first and after the final match |
| 208 |
position of alignments are now ignored by the CM construction |
| 209 |
procedure and thus no longer contribute to parameterizing the |
| 210 |
transition probabilities of the model (specifically, the |
| 211 |
\ccode{ROOT\_IL} and \ccode{ROOT\_IR} states). These changes mean |
| 212 |
that for a given input alignment a model built with version 1.1 may |
| 213 |
have different numbers of states and nodes, and will have (usually) |
| 214 |
slightly different parameters, than a model built from the same |
| 215 |
alignment with version 1.0.2. Finally, the important \prog{cmbuild} |
| 216 |
command line options \prog{--rf} and \prog{--gapthresh} have been |
| 217 |
renamed to \prog{--hand} and \prog{--symfrac}\footnote{To reproduce |
| 218 |
the behavior obtained in previous versions with \prog{--gapthresh <x>} |
| 219 |
use \prog{--symfrac <1-x>}.}. |
| 220 |
|
| 221 |
The formatting of \prog{cmsearch} output has also changed. It mirrors |
| 222 |
the output format of the \prog{hmmsearch} program from HMMER3, for |
| 223 |
examples see the tutorial section of this guide. Another change is |
| 224 |
that the most compute-intensive programs in Infernal 1.1 |
| 225 |
(\prog{cmcalibrate}, \prog{cmsearch}, \prog{cmscan} and |
| 226 |
\prog{cmalign}) support multicore parallelization using threads. |
| 227 |
|
| 228 |
\subsection{How to learn more about CMs and profile HMMs} |
| 229 |
|
| 230 |
Section~\ref{section:cmbuild} of this guide may be a good place to |
| 231 |
start. That section walks through an example of how a CM is |
| 232 |
constructed from a structurally annotated multiple sequence alignment. |
| 233 |
The tutorial section is also recommended for all users. |
| 234 |
|
| 235 |
As for other available publications: two papers published in 1994 |
| 236 |
introduced profile SCFGs in computational biology |
| 237 |
\citep{Sakakibara94c,Eddy94}, and our lab has published several papers |
| 238 |
\citep{Eddy02b,KleinEddy03,NawrockiEddy07,Nawrocki09,KolbeEddy09,KolbeEddy11}, |
| 239 |
book chapters \citep{Eddy06b,Nawrocki14}, and a few doctoral |
| 240 |
theses \citep{Klein03,Nawrocki09b,Kolbe10} related to |
| 241 |
CMs\footnote{Eddy lab publications are available from |
| 242 |
\url{http://eddylab.org/publications.html}}. The book |
| 243 |
\emph{Biological Sequence Analysis: Probabilistic Models of Proteins |
| 244 |
and Nucleic Acids} \citep{Durbin98} has several chapters devoted to |
| 245 |
HMMs and CMs. Profile HMM filtering for CMs was introduced by Weinberg |
| 246 |
and Ruzzo |
| 247 |
\citep{WeinbergRuzzo04,WeinbergRuzzo04b,WeinbergRuzzo06}. There are |
| 248 |
two papers from our lab on HMMER3 profile HMMs that are directly |
| 249 |
related to Infernal's accelerated filter pipeline |
| 250 |
\citep{Eddy08,Eddy11}. |
| 251 |
|
| 252 |
Since CMs are closely related to, but more complex than, profile HMMs, |
| 253 |
readers seeking to understand CMs who are unfamiliar with profile HMMs |
| 254 |
may want to start there. Reviews of the profile HMM literature have |
| 255 |
been written by our lab \citep{Eddy96,Eddy98} and by Anders Krogh |
| 256 |
\citep{Krogh98}. And to learn more about HMMs from the perspective of |
| 257 |
the speech recognition community, an excellent tutorial introduction |
| 258 |
has been written by Rabiner \citep{Rabiner89}. For details on how |
| 259 |
profile HMMs and probabilistic models are used in computational |
| 260 |
biology, see the pioneering 1994 paper from Krogh et |
| 261 |
al. \citep{Krogh94} and again the \emph{Biological Sequence Analysis} |
| 262 |
book \citep{Durbin98}. |
| 263 |
|
| 264 |
Finally, Sean Eddy writes about HMMER, Infernal and other lab projects in |
| 265 |
his blog \textbf{Cryptogenomicon} \url{http://cryptogenomicon.org/}). |
| 266 |
|
| 267 |
\subsection{How do I cite Infernal?} |
| 268 |
|
| 269 |
If you'd like to cite a paper, please cite the Infernal 1.1 application |
| 270 |
note in \emph{Bioinformatics}: |
| 271 |
|
| 272 |
Infernal 1.1: 100-fold faster RNA homology searches. |
| 273 |
EP Nawrocki and SR Eddy. |
| 274 |
Bioinformatics, 29:2933-2935, 2013. |
| 275 |
|
| 276 |
The most appropriate citation is to the web site, |
| 277 |
\url{http://eddylab.org/infernal/}. You should also cite what version |
| 278 |
of the software you used. We archive all old versions, so anyone |
| 279 |
should be able to obtain the version you used, when exact |
| 280 |
reproducibility of an analysis is an issue. |
| 281 |
|
| 282 |
The version number is in the header of most output files. To see it |
| 283 |
quickly, do something like \prog{cmscan -h} to get a help page, and |
| 284 |
the header will say: |
| 285 |
|
| 286 |
\begin{sreoutput} |
| 287 |
# cmscan :: search sequence(s) against a CM database |
| 288 |
# INFERNAL 1.1.5 (Sep 2023) |
| 289 |
# Copyright (C) 2023 Howard Hughes Medical Institute. |
| 290 |
# Freely distributed under the BSD open source license. |
| 291 |
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| 292 |
\end{sreoutput} |
| 293 |
|
| 294 |
So (from the second line there) this is from Infernal 1.1.5. |
| 295 |
|
| 296 |
\subsection{How do I report a bug?} |
| 297 |
|
| 298 |
Open an issue on our issue tracker at GitHub\footnote{GitHub issue |
| 299 |
tracker: \url{https://github.com/EddyRivasLab/infernal/issues}} or email us, |
| 300 |
at \url{[email protected]}. |
| 301 |
|
| 302 |
Before we can see what needs fixing, we almost always need to |
| 303 |
reproduce a bug on one of our machines. This means we want to have a |
| 304 |
small, reproducible test case that shows us the failure you're seeing. |
| 305 |
So if you're reporting a bug, please send us: |
| 306 |
|
| 307 |
\begin{itemize} |
| 308 |
\item A brief description of what went wrong. |
| 309 |
\item The command line(s) that reproduce the problem. |
| 310 |
\item Copies of any files we need to run those command lines. |
| 311 |
\item Information about what kind of hardware you're on, what |
| 312 |
operating system, and (if you compiled the software yourself rather |
| 313 |
than running precompiled binaries), what compiler and version you |
| 314 |
used, with what configuration arguments. |
| 315 |
\end{itemize} |
| 316 |
|
| 317 |
Depending on how glaring the bug is, we may not need all this |
| 318 |
information, but any work you can put into giving us a clean |
| 319 |
reproducible test case doesn't hurt and often helps. |
| 320 |
|
| 321 |
The information about hardware, operating system, and compiler is |
| 322 |
important. Bugs are frequently specific to particular configurations |
| 323 |
of hardware/OS/compiler. We have a wide variety of systems available |
| 324 |
for trying to reproduce bugs, and we'll try to match your system as |
| 325 |
closely as we can. |
| 326 |
|
| 327 |
If you first see a problem on some huge compute (like running a |
| 328 |
zillion query sequence over a huge profile database), it will really, |
| 329 |
really help us if you spend a bit of time yourself trying to isolate |
| 330 |
whether the problem really only manifests itself on that huge compute, |
| 331 |
or if you can isolate a smaller test case for us. The ideal bug report |
| 332 |
(for us) gives us everything we need to reproduce your problem in one |
| 333 |
email with at most some small attachments. |
| 334 |
|
| 335 |
Remember, we're not a company with dedicated support staff -- we're a |
| 336 |
small lab of busy researchers like you. Somebody here is going to drop |
| 337 |
what they're doing to try to help you out. Try to save us some time, |
| 338 |
and we're more likely to stay in our usual good mood. |
| 339 |
|
| 340 |
If we're in our usual good mood, we'll reply quickly. We'll probably |
| 341 |
tell you we fixed the bug in our development code, and that the fix |
| 342 |
will appear in the next Infernal release. This of course doesn't help you |
| 343 |
much, since nobody knows when the next Infernal release is going to be. |
| 344 |
So if possible, we'll usually try to describe a workaround for the |
| 345 |
bug. |
| 346 |
|
| 347 |
If the code fix is small, we might also tell you how to patch and |
| 348 |
recompile the code yourself. You may or may not want to do this. |
| 349 |
|
| 350 |
|
| 351 |
|
| 352 |
|
| 353 |
|
| 354 |
|
| 355 |
|
| 356 |
|
| 357 |
|
| 358 |
|
| 359 |
|
| 360 |
|
| 361 |
|
| 362 |
|
| 363 |
|
| 364 |
|
| 365 |
|
| 366 |
|
| 367 |
|
| 368 |
|
| 369 |
|
| 370 |
|
| 371 |
|