\section{Introduction} \label{section:introduction} \setcounter{footnote}{0} Infernal is used to search sequence databases for homologs of structural RNA sequences, and to make sequence- and structure-based RNA sequence alignments. Infernal builds a \emph{profile} from a structurally annotated multiple sequence alignment of an RNA family with a position-specific scoring system for substitutions, insertions, and deletions. Positions in the profile that are basepaired in the h consensus secondary structure of the alignment are modeled as dependent on one another, allowing Infernal's scoring system to consider the secondary structure, in addition to the primary sequence, of the family being modeled. Infernal profiles are probabilistic models called ``covariance models'', a specialized type of stochastic context-free grammar (SCFG) \citep{Lari90}. Compared to other alignment and database search tools based only on sequence comparison, Infernal aims to be significantly more accurate and more able to detect remote homologs because it models sequence and structure. But modeling structure comes at a high computational cost, and the slow speed of CM homology searches has been a serious limitation of previous versions. With version 1.1, typical homology searches are now about 100x faster, thanks to the incorporation of accelerated HMM methods from the HMMER3 software package (\url{http://hmmer.org}), making Infernal a much more practical tool for RNA sequence analysis. \subsection{How to avoid reading this manual} If you're like most people, you don't enjoy reading documentation. You're probably thinking: \pageref{manualend} pages of documentation, you must be joking! I just want to know that the software compiles, runs, and gives apparently useful results, before I read some \pageref{manualend} exhausting pages of someone's documentation. For cynics that have seen one too many software packages that don't work: \begin{itemize} \item Follow the quick installation instructions on page \pageref{section:installation}. An automated test suite is included, so you will know immediately if something went wrong.\footnote{Nothing should go wrong.} \item Go to the tutorial section on page \pageref{section:tutorial}, which walks you through some examples of using Infernal on real data. \end{itemize} Everything else, you can come back and read later. \subsection{What covariance models are} Covariance models (CMs) are statistical models of structurally annotated RNA multiple sequence alignments, or even of single sequences and structures. CMs are a specific formulation of profile stochastic context-free grammars (profile SCFG), which were introduced independently by Yasu Sakakibara in David Haussler's group \citep{Sakakibara94c} and by Sean Eddy and Richard Durbin \citep{Eddy94}. CMs are closely related to profile hidden Markov models (profile HMMs) commonly used for protein sequence analysis, but are more complex. CMs and profile HMMs both capture position-specific information about how conserved each column of the alignment is, and which residues are likely. However, in a profile HMM each position of the profile is treated independently, while in a CM basepaired positions are dependent on one another. The dependency between paired positions in a CM enables the profile to model \emph{covariation} at these positions, which often occurs between basepaired columns of structural RNA alignments. For many of these basepairs, it is not the specific nucleotides that make up the pair that is conserved by evolution, but rather that the pair maintain Watson-Crick basepairing. The added signal from covariation can be significant when using CMs for homology searches in large databases. Section~\ref{section:cmbuild} of this guide explains how a CM is constructed from a structurally annotated alignment using a toy example. CMs do have important limitations though. For example, a CM can only model what is called a ``well-nested'' set of basepairs. Formally, in a well-nested set of basepairs there are no two basepairs between positions $i:j$ and $k:l$ such that $i=50\%$ rule) after a sequence weighting algorithm is applied. And inserts before the first and after the final match position of alignments are now ignored by the CM construction procedure and thus no longer contribute to parameterizing the transition probabilities of the model (specifically, the \ccode{ROOT\_IL} and \ccode{ROOT\_IR} states). These changes mean that for a given input alignment a model built with version 1.1 may have different numbers of states and nodes, and will have (usually) slightly different parameters, than a model built from the same alignment with version 1.0.2. Finally, the important \prog{cmbuild} command line options \prog{--rf} and \prog{--gapthresh} have been renamed to \prog{--hand} and \prog{--symfrac}\footnote{To reproduce the behavior obtained in previous versions with \prog{--gapthresh } use \prog{--symfrac <1-x>}.}. The formatting of \prog{cmsearch} output has also changed. It mirrors the output format of the \prog{hmmsearch} program from HMMER3, for examples see the tutorial section of this guide. Another change is that the most compute-intensive programs in Infernal 1.1 (\prog{cmcalibrate}, \prog{cmsearch}, \prog{cmscan} and \prog{cmalign}) support multicore parallelization using threads. \subsection{How to learn more about CMs and profile HMMs} Section~\ref{section:cmbuild} of this guide may be a good place to start. That section walks through an example of how a CM is constructed from a structurally annotated multiple sequence alignment. The tutorial section is also recommended for all users. As for other available publications: two papers published in 1994 introduced profile SCFGs in computational biology \citep{Sakakibara94c,Eddy94}, and our lab has published several papers \citep{Eddy02b,KleinEddy03,NawrockiEddy07,Nawrocki09,KolbeEddy09,KolbeEddy11}, book chapters \citep{Eddy06b,Nawrocki14}, and a few doctoral theses \citep{Klein03,Nawrocki09b,Kolbe10} related to CMs\footnote{Eddy lab publications are available from \url{http://eddylab.org/publications.html}}. The book \emph{Biological Sequence Analysis: Probabilistic Models of Proteins and Nucleic Acids} \citep{Durbin98} has several chapters devoted to HMMs and CMs. Profile HMM filtering for CMs was introduced by Weinberg and Ruzzo \citep{WeinbergRuzzo04,WeinbergRuzzo04b,WeinbergRuzzo06}. There are two papers from our lab on HMMER3 profile HMMs that are directly related to Infernal's accelerated filter pipeline \citep{Eddy08,Eddy11}. Since CMs are closely related to, but more complex than, profile HMMs, readers seeking to understand CMs who are unfamiliar with profile HMMs may want to start there. Reviews of the profile HMM literature have been written by our lab \citep{Eddy96,Eddy98} and by Anders Krogh \citep{Krogh98}. And to learn more about HMMs from the perspective of the speech recognition community, an excellent tutorial introduction has been written by Rabiner \citep{Rabiner89}. For details on how profile HMMs and probabilistic models are used in computational biology, see the pioneering 1994 paper from Krogh et al. \citep{Krogh94} and again the \emph{Biological Sequence Analysis} book \citep{Durbin98}. Finally, Sean Eddy writes about HMMER, Infernal and other lab projects in his blog \textbf{Cryptogenomicon} \url{http://cryptogenomicon.org/}). \subsection{How do I cite Infernal?} If you'd like to cite a paper, please cite the Infernal 1.1 application note in \emph{Bioinformatics}: Infernal 1.1: 100-fold faster RNA homology searches. EP Nawrocki and SR Eddy. Bioinformatics, 29:2933-2935, 2013. The most appropriate citation is to the web site, \url{http://eddylab.org/infernal/}. You should also cite what version of the software you used. We archive all old versions, so anyone should be able to obtain the version you used, when exact reproducibility of an analysis is an issue. The version number is in the header of most output files. To see it quickly, do something like \prog{cmscan -h} to get a help page, and the header will say: \begin{sreoutput} # cmscan :: search sequence(s) against a CM database # INFERNAL 1.1.5 (Sep 2023) # Copyright (C) 2023 Howard Hughes Medical Institute. # Freely distributed under the BSD open source license. # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \end{sreoutput} So (from the second line there) this is from Infernal 1.1.5. \subsection{How do I report a bug?} Open an issue on our issue tracker at GitHub\footnote{GitHub issue tracker: \url{https://github.com/EddyRivasLab/infernal/issues}} or email us, at \url{eric.nawrocki@nih.gov}. Before we can see what needs fixing, we almost always need to reproduce a bug on one of our machines. This means we want to have a small, reproducible test case that shows us the failure you're seeing. So if you're reporting a bug, please send us: \begin{itemize} \item A brief description of what went wrong. \item The command line(s) that reproduce the problem. \item Copies of any files we need to run those command lines. \item Information about what kind of hardware you're on, what operating system, and (if you compiled the software yourself rather than running precompiled binaries), what compiler and version you used, with what configuration arguments. \end{itemize} Depending on how glaring the bug is, we may not need all this information, but any work you can put into giving us a clean reproducible test case doesn't hurt and often helps. The information about hardware, operating system, and compiler is important. Bugs are frequently specific to particular configurations of hardware/OS/compiler. We have a wide variety of systems available for trying to reproduce bugs, and we'll try to match your system as closely as we can. If you first see a problem on some huge compute (like running a zillion query sequence over a huge profile database), it will really, really help us if you spend a bit of time yourself trying to isolate whether the problem really only manifests itself on that huge compute, or if you can isolate a smaller test case for us. The ideal bug report (for us) gives us everything we need to reproduce your problem in one email with at most some small attachments. Remember, we're not a company with dedicated support staff -- we're a small lab of busy researchers like you. Somebody here is going to drop what they're doing to try to help you out. Try to save us some time, and we're more likely to stay in our usual good mood. If we're in our usual good mood, we'll reply quickly. We'll probably tell you we fixed the bug in our development code, and that the fix will appear in the next Infernal release. This of course doesn't help you much, since nobody knows when the next Infernal release is going to be. So if possible, we'll usually try to describe a workaround for the bug. If the code fix is small, we might also tell you how to patch and recompile the code yourself. You may or may not want to do this.