| 1 |
.TH "cmcalibrate" 1 "@INFERNAL_DATE@" "Infernal @INFERNAL_VERSION@" "Infernal Manual" |
| 2 |
|
| 3 |
.SH NAME |
| 4 |
cmcalibrate - fit exponential tails for covariance model E-value determination |
| 5 |
|
| 6 |
.SH SYNOPSIS |
| 7 |
.B cmcalibrate |
| 8 |
.I [options] |
| 9 |
.I cmfile |
| 10 |
|
| 11 |
.SH DESCRIPTION |
| 12 |
|
| 13 |
.PP |
| 14 |
.B cmcalibrate |
| 15 |
determines exponential tail parameters for E-value determination by |
| 16 |
generating random sequences, searching them with the CM and collecting |
| 17 |
the scores of the resulting hits. A histogram of the bit scores of |
| 18 |
the hits is fit to an exponential tail, and the parameters of the |
| 19 |
fitted tail are saved to the CM file. The exponential tail parameters |
| 20 |
are then used to estimate the statistical significance of hits found |
| 21 |
in |
| 22 |
.B cmsearch |
| 23 |
and |
| 24 |
.B cmscan. |
| 25 |
|
| 26 |
.PP |
| 27 |
A CM file must be calibrated with |
| 28 |
.B cmcalibrate |
| 29 |
before it can be used in |
| 30 |
.B cmsearch |
| 31 |
or |
| 32 |
.B cmscan, |
| 33 |
with a single exception: it is not necessary to calibrate CM files |
| 34 |
that include only models with zero basepairs before running |
| 35 |
.B cmsearch. |
| 36 |
|
| 37 |
|
| 38 |
.PP |
| 39 |
.B cmcalibrate |
| 40 |
is very slow. It takes a couple of hours |
| 41 |
to calibrate a single average sized CM on a single CPU. |
| 42 |
.B cmcalibrate |
| 43 |
will run in parallel on four cores if Infernal was built on a |
| 44 |
system that supports POSIX threading (see the Installation section of |
| 45 |
the user guide for more information) and that system has at |
| 46 |
least 4 cores. Using |
| 47 |
.B <n> |
| 48 |
cores will result in roughly |
| 49 |
.B <n> |
| 50 |
-fold acceleration versus a single CPU. You can specify the |
| 51 |
number of cores be |
| 52 |
.B <n> |
| 53 |
to use with the |
| 54 |
.BI --cpu " <n>" |
| 55 |
option. MPI (Message Passing |
| 56 |
Interface) can be also be used for parallelization with the |
| 57 |
.B --mpi |
| 58 |
option if Infernal was built with MPI enabled, but using more than 161 |
| 59 |
processors is not recommended because increasing past 161 won't |
| 60 |
accelerate the calibration. See the Installation section of the user |
| 61 |
guide for more information. |
| 62 |
|
| 63 |
.PP |
| 64 |
The |
| 65 |
.B --forecast |
| 66 |
option can be used to estimate how long the program will take to run |
| 67 |
for a given |
| 68 |
.I cmfile |
| 69 |
on the current machine. |
| 70 |
To predict the running time on |
| 71 |
.I <n> |
| 72 |
processors with MPI, additionally use the |
| 73 |
.BI --nforecast " <n>" |
| 74 |
option. |
| 75 |
|
| 76 |
.PP |
| 77 |
Some large models require a lot of memory to calibrate. You can |
| 78 |
determine how much memory is required with the |
| 79 |
.B --memreq |
| 80 |
option. For these models, you may be limited by the available RAM on |
| 81 |
your system. Another strategy for parallelization that can be useful |
| 82 |
when a lot of memory is required per core is to split the calibration |
| 83 |
into |
| 84 |
.B <n> |
| 85 |
separate computations or partitions, each of which can be performed separately, |
| 86 |
potentially in parallel if you have access to a computer cluster. The |
| 87 |
results from each computation can then be merged together for the |
| 88 |
final calibration. To do this, first run |
| 89 |
.B cmcalibrate |
| 90 |
with the |
| 91 |
.B --split, |
| 92 |
.BI --ptot " <n>" |
| 93 |
and |
| 94 |
.BI --cfile " <f>" |
| 95 |
options, which will save the |
| 96 |
.I "<n>" |
| 97 |
separate partition commands into the file |
| 98 |
.I "<f>". |
| 99 |
After all of these commands have been executed, you can then combine |
| 100 |
the results and create a calibrated model file by calling |
| 101 |
.Bi cmcalibrate |
| 102 |
again with the |
| 103 |
.B --merge |
| 104 |
and |
| 105 |
.BI --ptot " <n>" |
| 106 |
options. See the "Parallelizing calibration of large models by |
| 107 |
splitting into partitions" subsection of the tutorial in the user's guide |
| 108 |
for more information. |
| 109 |
|
| 110 |
.PP |
| 111 |
The random sequences searched in |
| 112 |
.B cmcalibrate |
| 113 |
are generated by an HMM that was trained on real genomic sequences |
| 114 |
with various GC contents. The goal is to have the GC distributions in |
| 115 |
the random sequences be similar to those in actual genomic sequences. |
| 116 |
|
| 117 |
.PP |
| 118 |
Four rounds of searches and subsequent exponential tail fits are |
| 119 |
performed, one each for the four different CM algorithms that can be |
| 120 |
used in |
| 121 |
.B cmsearch |
| 122 |
and |
| 123 |
.B cmscan: |
| 124 |
glocal CYK, glocal Inside, local CYK and local Inside. |
| 125 |
|
| 126 |
.PP |
| 127 |
The E-values parameters determined by |
| 128 |
.B cmcalibrate |
| 129 |
are only used by the |
| 130 |
.B cmsearch |
| 131 |
and |
| 132 |
.B cmscan |
| 133 |
programs. |
| 134 |
If you are not going to use these programs then |
| 135 |
do not waste time calibrating your models. |
| 136 |
|
| 137 |
.SH OPTIONS |
| 138 |
|
| 139 |
.TP |
| 140 |
.B -h |
| 141 |
Help; print a brief reminder of command line usage and available |
| 142 |
options. |
| 143 |
|
| 144 |
.TP |
| 145 |
.BI -L " <x>" |
| 146 |
Set the total length of random sequences to search |
| 147 |
to |
| 148 |
.I <x> |
| 149 |
megabases (Mb). By default, |
| 150 |
.I <x> is |
| 151 |
1.6 Mb. Increasing |
| 152 |
.I <x> |
| 153 |
will make the exponential tail fits more precise and |
| 154 |
E-values more accurate, but will take longer (doubling |
| 155 |
.I <x> |
| 156 |
will roughly double the running time). |
| 157 |
Decreasing |
| 158 |
.I <x> |
| 159 |
is not recommended as it will make the fits less |
| 160 |
precise and the E-values less accurate. |
| 161 |
|
| 162 |
.SH OPTIONS FOR PREDICTING REQUIRED TIME AND MEMORY |
| 163 |
|
| 164 |
.TP |
| 165 |
.B --forecast |
| 166 |
Predict the running time of the calibration of |
| 167 |
.I cmfile |
| 168 |
(with provided options) on the current machine |
| 169 |
and exit. The calibration is not performed. |
| 170 |
The predictions should be considered rough |
| 171 |
estimates. If multithreading is enabled |
| 172 |
(see Installation section of user guide), the timing |
| 173 |
will take into account the number of available cores. |
| 174 |
|
| 175 |
.TP |
| 176 |
.BI --nforecast " <n>" |
| 177 |
With |
| 178 |
.B --forecast, |
| 179 |
specify that |
| 180 |
.I <n> |
| 181 |
processors will be used for the calibration. |
| 182 |
This might be useful for predicting the running time of an MPI run |
| 183 |
with |
| 184 |
.I <n> |
| 185 |
processors. |
| 186 |
|
| 187 |
.TP |
| 188 |
.B --memreq |
| 189 |
Predict the amount of required memory for calibrating |
| 190 |
.I cmfile |
| 191 |
(with provided options) on the current machine |
| 192 |
and exit. The calibration is not performed. |
| 193 |
|
| 194 |
.SH OPTIONS CONTROLLING EXPONENTIAL TAIL FITS |
| 195 |
|
| 196 |
.TP |
| 197 |
.BI --gtailn " <x>" |
| 198 |
fit the exponential tail for glocal Inside and glocal CYK to the |
| 199 |
.I <n> |
| 200 |
highest scores in the histogram tail, where |
| 201 |
.I <n> |
| 202 |
is |
| 203 |
.I <x> |
| 204 |
times the number of Mb searched. The default value of |
| 205 |
.I <x> |
| 206 |
is 250. |
| 207 |
The value 250 was chosen because it works well empirically |
| 208 |
relative to other values. |
| 209 |
|
| 210 |
.TP |
| 211 |
.BI --ltailn " <x>" |
| 212 |
fit the exponential tail for local Inside and local CYK to the |
| 213 |
.I <n> |
| 214 |
highest scores in the histogram tail, where |
| 215 |
.I <n> |
| 216 |
is |
| 217 |
.I <x> |
| 218 |
times the number of Mb searched. The default value of |
| 219 |
.I <x> |
| 220 |
is 750. |
| 221 |
The value 750 was chosen because it works well empirically |
| 222 |
relative to other values. |
| 223 |
|
| 224 |
.TP |
| 225 |
.BI --tailp " <x>" |
| 226 |
Ignore the |
| 227 |
.B --gtailn |
| 228 |
and |
| 229 |
.B --ltailn |
| 230 |
prefixed options and fit the |
| 231 |
.I <x> |
| 232 |
fraction tail of the histogram to an exponential tail, for all |
| 233 |
search modes. |
| 234 |
|
| 235 |
.SH OPTIONAL OUTPUT FILES |
| 236 |
|
| 237 |
.TP |
| 238 |
.BI --hfile " <f>" |
| 239 |
Save the histograms fit to file |
| 240 |
.I <f>. |
| 241 |
The format of this file is two space delimited columns per line. The first column |
| 242 |
is the x-axis values of bit scores of each bin. The second column is the y-axis |
| 243 |
values of number of hits per bin. Each series is delimited by a line |
| 244 |
with a single character "&". The file will contain one series for each |
| 245 |
of the four exponential tail fits in the following order: glocal CYK, |
| 246 |
glocal Inside, local CYK, and local Inside. |
| 247 |
|
| 248 |
.TP |
| 249 |
.BI --sfile " <f>" |
| 250 |
Save survival plot information to file |
| 251 |
.I <f>. |
| 252 |
The format of this file is two space delimited columns per line. The first column |
| 253 |
is the x-axis values of bit scores of each bin. The second column is the y-axis |
| 254 |
values of fraction of hits that meet or exceed the score for each |
| 255 |
bin. Each series is delimited by a line with a single character "&". |
| 256 |
The file will contain three series of data for each |
| 257 |
of the four CM search modes in the following order: glocal CYK, |
| 258 |
glocal Inside, local CYK, and local Inside. |
| 259 |
The first series is the empirical survival plot from the histogram of hits |
| 260 |
to the random sequence. The second series is the exponential tail fit |
| 261 |
to the empirical distribution. The third series is the exponential |
| 262 |
tail fit if lambda were fixed and set as the natural log of 2 (0.691314718). |
| 263 |
|
| 264 |
.TP |
| 265 |
.BI --qqfile " <f>" |
| 266 |
Save quantile-quantile plot information to file |
| 267 |
.I <f>. |
| 268 |
The format of this file is two space delimited columns per line. The first column |
| 269 |
is the x-axis values, and the second column is the y-axis |
| 270 |
values. The distance of the points from the identity line (y=x) is a |
| 271 |
measure of how good the exponential tail fit is, the closer the points |
| 272 |
are to the identity line, the better the fit is. |
| 273 |
Each series is delimited by a line with a single character "&". |
| 274 |
The file will contain one series of empirical data for each of the |
| 275 |
four exponential tail fits in the following order: |
| 276 |
glocal CYK, glocal Inside, local CYK and local Inside. |
| 277 |
|
| 278 |
.TP |
| 279 |
.BI --ffile " <f>" |
| 280 |
Save space delimited statistics of different exponential tail fits to file |
| 281 |
.I <f>. |
| 282 |
The file will contain the lambda and mu values for exponential tails |
| 283 |
fit to histogram tails of different sizes. The fields in the file are |
| 284 |
labelled informatively. |
| 285 |
|
| 286 |
.TP |
| 287 |
.BI --xfile " <f>" |
| 288 |
Save a list of the scores in each fit histogram tail to file |
| 289 |
.I <f>. |
| 290 |
Each line of this file will have a different score indicating one hit |
| 291 |
existed in the tail with that score. Each series is |
| 292 |
delimited by a line with a single character "&". The file will contain |
| 293 |
one series for each of the four exponential tail fits in the following |
| 294 |
order: glocal CYK, glocal Inside, local CYK, and local Inside. |
| 295 |
|
| 296 |
.SH OPTIONS CONTROLLING SPLIT, PARTITION AND MERGE MODES: |
| 297 |
|
| 298 |
.TP |
| 299 |
.B --split |
| 300 |
Prepare a partitioned calibration. This option only works in |
| 301 |
combination with the |
| 302 |
.BI --ptot " <n>" |
| 303 |
and |
| 304 |
.BI --cfile " <f>" |
| 305 |
options, and will prepare a calibration split into |
| 306 |
.I "<n>" |
| 307 |
separate partitions. The commands to run all of the partitions will be |
| 308 |
in the file |
| 309 |
.I "<f>". |
| 310 |
|
| 311 |
.TP |
| 312 |
.BI --cfile " <f>" |
| 313 |
With |
| 314 |
.B --split, |
| 315 |
save the commands for all partitions to file |
| 316 |
.I "<f>". |
| 317 |
|
| 318 |
.TP |
| 319 |
.BI --proot " <s>" |
| 320 |
With |
| 321 |
.B --split, |
| 322 |
specify that the per-partition scores files |
| 323 |
be named |
| 324 |
.I "<s>.<n>" |
| 325 |
where |
| 326 |
.I "<n>" |
| 327 |
is the partition index. |
| 328 |
By default they will be named |
| 329 |
.I "<s>.calib.<n>" |
| 330 |
where |
| 331 |
.I "<s>" |
| 332 |
is the name of the CM file to be calibrated (including path). |
| 333 |
|
| 334 |
.TP |
| 335 |
.BI --part " <n>" |
| 336 |
specify that this is partition |
| 337 |
.I "<n>" |
| 338 |
out of |
| 339 |
.I "<n2>" |
| 340 |
from |
| 341 |
.BI "--ptot <n2>". |
| 342 |
Must be used in combination with |
| 343 |
.B "--ptot" |
| 344 |
and |
| 345 |
.B "--pfile". |
| 346 |
|
| 347 |
.TP |
| 348 |
.BI --ptot " <n>" |
| 349 |
With |
| 350 |
.B --split, --part |
| 351 |
or |
| 352 |
.B --merge, |
| 353 |
specify that there are |
| 354 |
.I "<n>" |
| 355 |
total partitions. |
| 356 |
|
| 357 |
.TP |
| 358 |
.BI --pfile " <f>" |
| 359 |
With |
| 360 |
.B --part , |
| 361 |
specify that scores for this partition be saved to file |
| 362 |
.I "<f>" |
| 363 |
. |
| 364 |
|
| 365 |
.TP |
| 366 |
.B --merge |
| 367 |
Merge scores from multiple previously executed partitions and |
| 368 |
calibrate CMs. If you used the option |
| 369 |
.BI --proot " <s>" |
| 370 |
with |
| 371 |
.B cmcalibrate |
| 372 |
when you ran it with |
| 373 |
.B --split |
| 374 |
to setup the partitions, use |
| 375 |
.BI --proot " <s>" |
| 376 |
again with |
| 377 |
.B --merge. |
| 378 |
The full |
| 379 |
.B cmcalibrate --merge |
| 380 |
command to use will have been output to standard output |
| 381 |
when the initial |
| 382 |
.B cmcalibrate --split |
| 383 |
command was executed. |
| 384 |
|
| 385 |
.SH OTHER OPTIONS |
| 386 |
|
| 387 |
.TP |
| 388 |
.BI --seed " <n>" |
| 389 |
Seed the random number generator with |
| 390 |
.I <n>, |
| 391 |
an integer >= 0. |
| 392 |
If |
| 393 |
.I <n> |
| 394 |
is nonzero, stochastic simulations will be reproducible; the same |
| 395 |
command will give the same results. |
| 396 |
If |
| 397 |
.I <n> |
| 398 |
is 0, the random number generator is seeded arbitrarily, and |
| 399 |
stochastic simulations will vary from run to run of the same command. |
| 400 |
The default seed is 181. |
| 401 |
|
| 402 |
.TP |
| 403 |
.BI --beta " <x>" |
| 404 |
By default query-dependent banding (QDB) |
| 405 |
is used to accelerate the CM search algorithms with a beta tail loss |
| 406 |
probability of 1E-15. |
| 407 |
This beta value can be changed to |
| 408 |
.I <x> |
| 409 |
with |
| 410 |
.BI --beta " <x>". |
| 411 |
The beta parameter is the amount of probability mass excluded |
| 412 |
during band calculation, higher values of beta give greater speedups |
| 413 |
but sacrifice more accuracy than lower values. The default value used |
| 414 |
is 1E-15. (For more information on QDB see |
| 415 |
Nawrocki and Eddy, PLoS Computational Biology 3(3): e56.) |
| 416 |
|
| 417 |
.TP |
| 418 |
.B --nonbanded |
| 419 |
Turn off QDB during E-value calibration. This will slow down |
| 420 |
calibration. |
| 421 |
|
| 422 |
.TP |
| 423 |
.B --nonull3 |
| 424 |
Turn off the null3 post hoc additional null model. This is not |
| 425 |
recommended unless you plan on using the same option to |
| 426 |
.B cmsearch |
| 427 |
and/or |
| 428 |
.B cmscan. |
| 429 |
|
| 430 |
.TP |
| 431 |
.B --random |
| 432 |
Use the background null model of the CM to generate the random |
| 433 |
sequences, instead of the more realistic HMM. Unless the CM |
| 434 |
was built using the |
| 435 |
.B --null |
| 436 |
option to |
| 437 |
.B cmbuild, |
| 438 |
the background null model will be 25% each A, C, G and U. |
| 439 |
|
| 440 |
.TP |
| 441 |
.BI --gc " <f>" |
| 442 |
Generate the random sequences using the |
| 443 |
nucleotide distribution from the sequence file |
| 444 |
.I <f>. |
| 445 |
|
| 446 |
.TP |
| 447 |
.BI --cpu " <n>" |
| 448 |
Set the number of parallel worker threads to |
| 449 |
.IR <n> . |
| 450 |
On multicore machines, the default is 4. |
| 451 |
You can also control this number by setting an environment variable, |
| 452 |
.IR INFERNAL_NCPU . |
| 453 |
There is also a master thread, so the actual number of threads that |
| 454 |
Infernal spawns is |
| 455 |
.IR <n> +1. |
| 456 |
This option is not available if Infernal was compiled with POSIX threads |
| 457 |
support turned off. |
| 458 |
|
| 459 |
.TP |
| 460 |
.B --mpi |
| 461 |
Run as an MPI parallel program. This option will only be available if |
| 462 |
Infernal has been configured and built with the "--enable-mpi" flag |
| 463 |
(see the Installation section of the user guide for more information). |
| 464 |
|
| 465 |
|
| 466 |
.SH SEE ALSO |
| 467 |
|
| 468 |
See |
| 469 |
.B infernal(1) |
| 470 |
for a master man page with a list of all the individual man pages |
| 471 |
for programs in the Infernal package. |
| 472 |
|
| 473 |
.PP |
| 474 |
For complete documentation, see the user guide that came with your |
| 475 |
Infernal distribution (Userguide.pdf); or see the Infernal web page |
| 476 |
(@INFERNAL_URL@). |
| 477 |
|
| 478 |
|
| 479 |
.SH COPYRIGHT |
| 480 |
|
| 481 |
.nf |
| 482 |
@INFERNAL_COPYRIGHT@ |
| 483 |
@INFERNAL_LICENSE@ |
| 484 |
.fi |
| 485 |
|
| 486 |
For additional information on copyright and licensing, see the file |
| 487 |
called COPYRIGHT in your Infernal source distribution, or see the Infernal |
| 488 |
web page |
| 489 |
(@INFERNAL_URL@). |
| 490 |
|
| 491 |
.SH AUTHOR |
| 492 |
|
| 493 |
.nf |
| 494 |
http://eddylab.org |
| 495 |
.fi |
| 496 |
|