Debian Codegraph @

documentation/userguide/rigfilters_doc.html

raw symbols SCIP
1 <html>
2 <head>
3 <title>README for cm2hmm</title></head>
4 <body>
5 <H1>README for cm2hmm</H1>
6 <P>This program implements the techniques described in&nbsp;Z. Weinberg and W.L.
7 Ruzzo (2004) "Faster genome annotation of non-coding RNA families without loss
8 of accuracy", in <EM>Proc. Eighth Annual International Conference on Research in
9 Computational Molecular Biology (RECOMB),</EM> ACM Press, 243-251.</P>
10 <H2>
11 <H2>Licensing</H2>
12 </H2>
13 <P>The source code for cm2hmm and cm2hmmsearch&nbsp;is
14 copyright 2004 by Zasha Weinberg and distributed under the BSD license.&nbsp;
15 </P>
16 <P>The source depends on the cfsqp 3rd-party library.&nbsp; CFSQP is
17 distributed by <A href="http://www.aemdesign.com">www.aemdesign.com</A>.&nbsp;
18 It is not freely available, but is available on request for free&nbsp;for
19 academic institutions.</P>
20 <H2>Installation</H2>
21 <P>Installation is handled as an integrated part of the Infernal package.</P>
22 <P>To include rigorous filters when building Infernal, first configure the package</P>
23 <pre>./configure --with-rigfilters --with-cfsqp=/path/to/cfsqp</pre>
24 <P>The first option specifies that cm2hmm should be compiled (off by default), and the
25 second specifies the location of the cfsqp source code. Alternatively, you may
26 copy the source code into infernal-x.xx/rigfilters/cfsqp/ and omit the second
27 option.</P>
28 <P>Following a successful configure, type <pre>make</pre></P>
29 <H2>Usage</H2>
30 <P><tt>cm2hmm</tt> creates a compact- or expanded-type HMM from a given CM.&nbsp;
31 <tt>cm2hmmsearch</tt> searches a FASTA sequence file using a CM and profile HMM
32 rigorous filters created using cm2hmm.&nbsp; Both programs display simple usage
33 instructions when run without any parameters.</P>
34 <P> The input format for cm2hmm is:</P>
35 <pre>
36 cm2hmm &lt;input CM file name&gt; &lt;output HMM file name&gt; &lt;0th-order Markov model specification&gt; &lt;HMM type &amp; output format&gt; &lt;solver specification&gt;
37 &lt;input CM file name&gt; : file name of a CM in Infernal format.
38 &lt;output HMM file name&gt; : file name of HMM to create.
39 &lt;0th-order Markov model specification&gt; : one of the following:
40 uniform : use a uniform 0th-order model (all nucleotides have probability 0.25)
41 gc &lt;fraction&gt; : the G+C content is &lt;fraction&gt;, a number from 0 to 1.
42 file &lt;file name&gt; : load it from a file (logic to create these files from an input sequence may or may not be implemented in distribution.
43 &lt;HMM type &amp; output format&gt; : one of the following:
44 compact : create a compact-type profile HMM in the default text format.
45 expanded : create an expanded-type profile HMM in the default text format.
46 &lt;solver-specification&gt; : one option currently:
47 cfsqp &lt;B&gt; &lt;C&gt; : use CFSQP, sending solver parameters B&amp;C. &lt;B&gt;=0, &lt;C&gt;=1 are reasonable parameters. Refer to the CFSQP manual for details.
48 </pre>
49 <P>The input format for cm2hmmsearch is:</P>
50 <pre>
51 cm2hmmsearch &lt;window len&gt; &lt;score threshold&gt; &lt;CM file name&gt; &lt;compact profile HMM file name&gt; &lt;expanded profile HMM file name&gt; &lt;sequence file&gt; &lt;run CM?&gt;
52 &lt;window len&gt; : window length parameter for CM scan.
53 &lt;score threshold&gt; : hits below this threshold will be ignored (and likely filtered out by the profile HMMs).
54 &lt;CM file name&gt; : file name of a CM in Infernal format.
55 &lt;compact profile HMM file name&gt; : name of a profile HMM to do filtering, or "-" (a single dash) to not use this HMM. Although this HMM is presumed to be compact type, this is not enforced.
56 &lt;expanded profile HMM file name&gt; : similar idea to previous field, but for the expanded profile HMM.
57 &lt;sequence file&gt; : name of a sequence file in FASTA format.
58 &lt;run CM?&gt; : if "0" do NOT actually run the CM, just do the filtering and report the filtering fraction. If "1", run the CM to find hits.
59 </pre>
60 <P>Here's an example of creating both compact- and expanded-type HMMs for RF00095,
61 and scanning the <EM>Pyrococcus abyssi</EM> genome.</P>
62 <P>From infernal-x.xx/rigfilters/cm2hmm, enter the following commands (which each take a minute or so to complete):</P>
63 <tt>
64 <P>cm2hmm data/RF00095.cm data/RF00095_compact.hmm file data/Ecoli_0mm.mm
65 compact cfsqp 0 1</P>
66 <P>cm2hmm data/RF00095.cm data/RF00095_expanded.hmm file
67 data/Ecoli_0mm.mm&nbsp;expanded cfsqp 0 1</P>
68 <P>cm2hmmsearch 150 23.5 data/RF00095.cm data/RF00095_compact.hmm
69 data/RF00095_expanded.hmm data/AL096836.fna 1</P>
70 </tt>
71 <P>The first two commands create the HMMs given the CM in data/RF00095.cm.&nbsp;
72 They are both optimized based on a 0th-order Markov model of the <EM>E. coli</EM>
73 K-12 genome.&nbsp; The last command uses these HMMs to accelerate a search of
74 the <EM>Pyrococcus abyssi</EM>&nbsp;genome (data/AL096836.fna).&nbsp; The
75 search outputs the family members found in basically the same format as
76 Infernal.&nbsp; An important new piece of information is the 'frac let thru so
77 far', which gives the filtering fraction measured on this genome.&nbsp; The
78 reported filtering fraction is for the 2nd HMM, i.e. the expanded-type
79 one.&nbsp; (2d-fracLetsThru is a measure of the filtering fraction that
80 attempts to reflect the fact that the dynamic programming algorithm for CMs has
81 an extra dimension, so the filtering fraction is a somewhat pessimistic
82 estimate of the actual speed-up).
83 </P>
84 <H3>What 0th-order Markov model to use?</H3>
85 <P>The choice of Markov model in the infinite-length forward algorithm does not
86 usually affect the filtering fraction that much, but&nbsp;a&nbsp;good choice
87 can yield a modest improvement in filtering&nbsp;fraction&nbsp;(typically
88 around 10%).&nbsp; In general, it's best to use the 0th-order model of the
89 genome that has the highest (worst) filtering fraction.&nbsp; To estimate this,
90 create a compact-type HMM from any model, and run it on the <EM>Bordetella</EM>,
91 <EM>E. coli</EM> and <EM>S. aureus</EM>&nbsp;genomes.</P>
92 <H3>Using compact- or expanded-type HMMs, or both</H3>
93 <P>Once you've picked a 0th-order Markov model, the easiest thing to do is to
94 create both compact- and expanded-type HMMs, and run them on the three
95 genomes.&nbsp; This yields an estimate of the filtering fraction for the two
96 HMMs.&nbsp; If the filtering fraction of the compact-type HMMs is above 0.25,
97 it's probably not worth using it (this is based on a rule of thumb that the
98 expanded-type HMM runs 30% slower than the compact-type HMM, so if the
99 compact-type fraction is above 0.25, it's not worth using it).&nbsp; If the
100 compact-type HMM filtering fraction is low, there's no need to use the
101 expanded-type HMM, but it can't hurt.</P>
102 <P>The difference in speed between the CM and the HMMs is mainly dependent on the
103 window length W.&nbsp; The HMM is faster than the CM by a factor of usually a
104 bit over W.&nbsp; So, if the filtering fraction is significantly below 1/W,
105 then the search time is dominated by the HMM's search time, and there's no
106 point in getting a better filtering fraction.</P>