1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186
|
<div id="TOC">
<ul>
<li><a href="#introduction">Introduction</a><ul>
<li><a href="#what-is-hisat">What is HISAT?</a></li>
</ul></li>
<li><a href="#obtaining-hisat">Obtaining HISAT</a><ul>
<li><a href="#building-from-source">Building from source</a></li>
</ul></li>
<li><a href="#running-hisat">Running HISAT</a><ul>
<li><a href="#adding-to-path">Adding to PATH</a></li>
<li><a href="#reporting">Reporting</a></li>
<li><a href="#alignment-summmary">Alignment summmary</a></li>
<li><a href="#wrapper">Wrapper</a></li>
<li><a href="#small-and-large-indexes">Small and large indexes</a></li>
<li><a href="#performance-tuning">Performance tuning</a></li>
<li><a href="#command-line">Command Line</a><ul>
<li><a href="#setting-function-options">Setting function options</a></li>
<li><a href="#usage">Usage</a></li>
<li><a href="#main-arguments">Main arguments</a></li>
<li><a href="#options">Options</a></li>
</ul></li>
<li><a href="#sam-output">SAM output</a></li>
</ul></li>
<li><a href="#the-hisat-build-indexer">The <code>hisat-build</code> indexer</a><ul>
<li><a href="#command-line-1">Command Line</a><ul>
<li><a href="#main-arguments-1">Main arguments</a></li>
<li><a href="#options-1">Options</a></li>
</ul></li>
</ul></li>
<li><a href="#the-hisat-inspect-index-inspector">The <code>hisat-inspect</code> index inspector</a><ul>
<li><a href="#command-line-2">Command Line</a><ul>
<li><a href="#main-arguments-2">Main arguments</a></li>
<li><a href="#options-2">Options</a></li>
</ul></li>
</ul></li>
<li><a href="#getting-started-with-hisat">Getting started with HISAT</a><ul>
<li><a href="#indexing-a-reference-genome">Indexing a reference genome</a></li>
<li><a href="#aligning-example-reads">Aligning example reads</a></li>
<li><a href="#paired-end-example">Paired-end example</a></li>
<li><a href="#using-samtoolsbcftools-downstream">Using SAMtools/BCFtools downstream</a></li>
</ul></li>
</ul>
</div>
<!--
! This manual is written in "markdown" format and thus contains some
! distracting formatting clutter. See 'MANUAL' for an easier-to-read version
! of this text document, or see the HTML manual online.
! -->
<h1 id="introduction">Introduction</h1>
<h2 id="what-is-hisat">What is HISAT?</h2>
<p><a href="http://ccb.jhu.edu/software/hisat">HISAT</a> is a fast and sensitive spliced alignment program. As part of HISAT, we have developed a new indexing scheme based on the Burrows-Wheeler transform (<a href="http://en.wikipedia.org/wiki/Burrows-Wheeler_transform">BWT</a>) and the <a href="http://en.wikipedia.org/wiki/FM-index">FM index</a>, called hierarchical indexing, that employs two types of indexes: (1) one global FM index representing the whole genome, and (2) many separate local FM indexes for small regions collectively covering the genome. Our hierarchical index for the human genome (about 3 billion bp) includes ~48,000 local FM indexes, each representing a genomic region of ~64,000bp. As the basis for non-gapped alignment, the FM index is extremely fast with a low memory footprint, as demonstrated by <a href="http://bowtie-bio.sf.net">Bowtie</a>. In addition, HISAT provides several alignment strategies specifically designed for mapping different types of RNA-seq reads. All these together, HISAT enables extremely fast and sensitive alignment of reads, in particular those spanning two exons or more. As a result, HISAT is much faster >50 times than <a href="http://ccb.jhu.edu/software/tophat">TopHat2</a> with better alignment quality. Although it uses a large number of indexes, the memory requirement of HISAT is still modest, approximately 4.3 GB for human. HISAT uses the <a href="http://bowtie-bio.sf.net/bowtie2">Bowtie2</a> implementation to handle most of the operations on the FM index. In addition to spliced alignment, HISAT handles reads involving indels and supports a paired-end alignment mode. Multiple processors can be used simultaneously to achieve greater alignment speed. HISAT outputs alignments in <a href="http://samtools.sourceforge.net/SAM1.pdf">SAM</a> format, enabling interoperation with a large number of other tools (e.g. <a href="http://samtools.sourceforge.net">SAMtools</a>, <a href="http://www.broadinstitute.org/gsa/wiki/index.php/The_Genome_Analysis_Toolkit">GATK</a>) that use SAM. HISAT is distributed under the <a href="http://www.gnu.org/licenses/gpl-3.0.html">GPLv3 license</a>, and it runs on the command line under Linux, Mac OS X and Windows.</p>
<h1 id="obtaining-hisat">Obtaining HISAT</h1>
<p>Download HISAT sources and binaries from the Releases sections on the right side. Binaries are available for Intel architectures (<code>x86_64</code>) running Linux, and Mac OS X.</p>
<h2 id="building-from-source">Building from source</h2>
<p>Building HISAT from source requires a GNU-like environment with GCC, GNU Make and other basics. It should be possible to build HISAT on most vanilla Linux installations or on a Mac installation with <a href="http://developer.apple.com/xcode/">Xcode</a> installed. HISAT can also be built on Windows using <a href="http://www.cygwin.com/">Cygwin</a> or <a href="http://www.mingw.org/">MinGW</a> (MinGW recommended). For a MinGW build the choice of what compiler is to be used is important since this will determine if a 32 or 64 bit code can be successfully compiled using it. If there is a need to generate both 32 and 64 bit on the same machine then a multilib MinGW has to be properly installed. <a href="http://www.mingw.org/wiki/msys">MSYS</a>, the <a href="http://cygwin.com/packages/mingw-zlib/">zlib</a> library, and depending on architecture <a href="http://sourceware.org/pthreads-win32/">pthreads</a> library are also required. We are recommending a 64 bit build since it has some clear advantages in real life research problems. In order to simplify the MinGW setup it might be worth investigating popular MinGW personal builds since these are coming already prepared with most of the toolchains needed.</p>
<p>First, download the <a href="http://ccb.jhu.edu/software/hisat/downloads/hisat-0.1.0-beta.zip">source package</a> from the Releases secion on the right side. Unzip the file, change to the unzipped directory, and build the HISAT tools by running GNU <code>make</code> (usually with the command <code>make</code>, but sometimes with <code>gmake</code>) with no arguments. If building with MinGW, run <code>make</code> from the MSYS environment.</p>
<p>HISAT is using the multithreading software model in order to speed up execution times on SMP architectures where this is possible. On POSIX platforms (like linux, Mac OS, etc) it needs the pthread library. Although it is possible to use pthread library on non-POSIX platform like Windows, due to performance reasons HISAT will try to use Windows native multithreading if possible.</p>
<h1 id="running-hisat">Running HISAT</h1>
<h2 id="adding-to-path">Adding to PATH</h2>
<p>By adding your new HISAT directory to your <a href="http://en.wikipedia.org/wiki/PATH_(variable)">PATH environment variable</a>, you ensure that whenever you run <code>hisat</code>, <code>hisat-build</code> or <code>hisat-inspect</code> from the command line, you will get the version you just installed without having to specify the entire path. This is recommended for most users. To do this, follow your operating system's instructions for adding the directory to your <a href="http://en.wikipedia.org/wiki/PATH_(variable)">PATH</a>.</p>
<p>If you would like to install HISAT by copying the HISAT executable files to an existing directory in your <a href="http://en.wikipedia.org/wiki/PATH_(variable)">PATH</a>, make sure that you copy all the executables, including <code>hisat</code>, <code>hisat-align-s</code>, <code>hisat-align-l</code>, <code>hisat-build</code>, <code>hisat-build-s</code>, <code>hisat-build-l</code>, <code>hisat-inspect</code>, <code>hisat-inspect-s</code> and <code>hisat-inspect-l</code>.</p>
<h2 id="reporting">Reporting</h2>
<!--
The reporting mode governs how many alignments HISAT looks for, and how to
report them. HISAT has three distinct reporting modes. The default
reporting mode is similar to the default reporting mode of many other read
alignment tools, including [BWA].
In general, when we say that a read has an alignment, we mean that it has a
[valid alignment]. When we say that a read has multiple alignments, we mean
that it has multiple alignments that are valid and distinct from one another.
[valid alignment]: #valid-alignments-meet-or-exceed-the-minimum-score-threshold
[BWA]: http://bio-bwa.sourceforge.net/
### Distinct alignments map a read to different places
Two alignments for the same individual read are "distinct" if they map the same
read to different places. Specifically, we say that two alignments are distinct
if there are no alignment positions where a particular read offset is aligned
opposite a particular reference offset in both alignments with the same
orientation. E.g. if the first alignment is in the forward orientation and
aligns the read character at read offset 10 to the reference character at
chromosome 3, offset 3,445,245, and the second alignment is also in the forward
orientation and also aligns the read character at read offset 10 to the
reference character at chromosome 3, offset 3,445,245, they are not distinct
alignments.
Two alignments for the same pair are distinct if either the mate 1s in the two
paired-end alignments are distinct or the mate 2s in the two alignments are
distinct or both.
### Default mode: search for multiple alignments, report the best one
By default, HISAT searches for distinct, valid alignments for each read. When
it finds a valid alignment, it generally will continue to look for alignments
that are nearly as good or better. It will eventually stop looking, either
because it exceeded a limit placed on search effort (see [`-D`] and [`-R`]) or
because it already knows all it needs to know to report an alignment.
Information from the best alignments are used to estimate mapping quality (the
`MAPQ` [SAM] field) and to set SAM optional fields, such as [`AS:i`] and
[`XS:i`]. HISAT does not gaurantee that the alignment reported is the best
possible in terms of alignment score.
See also: [`-D`], which puts an upper limit on the number of dynamic programming
problems (i.e. seed extensions) that can "fail" in a row before HISAT stops
searching. Increasing [`-D`] makes HISAT slower, but increases the
likelihood that it will report the correct alignment for a read that aligns many
places.
See also: [`-R`], which sets the maximum number of times HISAT will "re-seed"
when attempting to align a read with repetitive seeds. Increasing [`-R`] makes
HISAT slower, but increases the likelihood that it will report the correct
alignment for a read that aligns many places.
### -k mode: search for one or more alignments, report each
In [`-k`] mode, HISAT searches for up to N distinct, valid alignments for
each read, where N equals the integer specified with the `-k` parameter. That
is, if `-k 2` is specified, HISAT will search for at most 2 distinct
alignments. It reports all alignments found, in descending order by alignment
score. The alignment score for a paired-end alignment equals the sum of the
alignment scores of the individual mates. Each reported read or pair alignment
beyond the first has the SAM 'secondary' bit (which equals 256) set in its FLAGS
field. See the [SAM specification] for details.
HISAT does not "find" alignments in any specific order, so for reads that
have more than N distinct, valid alignments, HISAT does not gaurantee that
the N alignments reported are the best possible in terms of alignment score.
Still, this mode can be effective and fast in situations where the user cares
more about whether a read aligns (or aligns a certain number of times) than
where exactly it originated.
-->
<h2 id="alignment-summmary">Alignment summmary</h2>
<p>When HISAT finishes running, it prints messages summarizing what happened. These messages are printed to the "standard error" ("stderr") filehandle. For datasets consisting of unpaired reads, the summary might look like this:</p>
<pre><code>20000 reads; of these:
20000 (100.00%) were unpaired; of these:
1247 (6.24%) aligned 0 times
18739 (93.69%) aligned exactly 1 time
14 (0.07%) aligned >1 times
93.77% overall alignment rate</code></pre>
<p>For datasets consisting of pairs, the summary might look like this:</p>
<pre><code>10000 reads; of these:
10000 (100.00%) were paired; of these:
650 (6.50%) aligned concordantly 0 times
8823 (88.23%) aligned concordantly exactly 1 time
527 (5.27%) aligned concordantly >1 times
----
650 pairs aligned concordantly 0 times; of these:
34 (5.23%) aligned discordantly 1 time
----
616 pairs aligned 0 times concordantly or discordantly; of these:
1232 mates make up the pairs; of these:
660 (53.57%) aligned 0 times
571 (46.35%) aligned exactly 1 time
1 (0.08%) aligned >1 times
96.70% overall alignment rate</code></pre>
<p>The indentation indicates how subtotals relate to totals.</p>
<h2 id="wrapper">Wrapper</h2>
<p>The <code>hisat</code>, <code>hisat-build</code> and <code>hisat-inspect</code> executables are actually wrapper scripts that call binary programs as appropriate. The wrappers shield users from having to distinguish between "small" and "large" index formats, discussed briefly in the following section. Also, the <code>hisat</code> wrapper provides some key functionality, like the ability to handle compressed inputs, and the fucntionality for <a href="#hisat-options-un"><code>--un</code></a>, <a href="#hisat-options-al"><code>--al</code></a> and related options.</p>
<p>It is recommended that you always run the hisat wrappers and not run the binaries directly.</p>
<h2 id="small-and-large-indexes">Small and large indexes</h2>
<p><code>hisat-build</code> can index reference genomes of any size. For genomes less than about 4 billion nucleotides in length, <code>hisat-build</code> builds a "small" index using 32-bit numbers in various parts of the index. When the genome is longer, <code>hisat-build</code> builds a "large" index using 64-bit numbers. Small indexes are stored in files with the <code>.bt2</code> extension, and large indexes are stored in files with the <code>.bt2l</code> extension. The user need not worry about whether a particular index is small or large; the wrapper scripts will automatically build and use the appropriate index.</p>
<h2 id="performance-tuning">Performance tuning</h2>
<ol style="list-style-type: decimal">
<li><p>If your computer has multiple processors/cores, use <code>-p</code></p>
<p>The <a href="#hisat-options-p"><code>-p</code></a> option causes HISAT to launch a specified number of parallel search threads. Each thread runs on a different processor/core and all threads find alignments in parallel, increasing alignment throughput by approximately a multiple of the number of threads (though in practice, speedup is somewhat worse than linear).</p></li>
</ol>
<h2 id="command-line">Command Line</h2>
<h3 id="setting-function-options">Setting function options</h3>
<p>Some HISAT options specify a function rather than an individual number or setting. In these cases the user specifies three parameters: (a) a function type <code>F</code>, (b) a constant term <code>B</code>, and (c) a coefficient <code>A</code>. The available function types are constant (<code>C</code>), linear (<code>L</code>), square-root (<code>S</code>), and natural log (<code>G</code>). The parameters are specified as <code>F,B,A</code> - that is, the function type, the constant term, and the coefficient are separated by commas with no whitespace. The constant term and coefficient may be negative and/or floating-point numbers.</p>
<p>For example, if the function specification is <code>L,-0.4,-0.6</code>, then the function defined is:</p>
<pre><code>f(x) = -0.4 + -0.6 * x</code></pre>
<p>If the function specification is <code>G,1,5.4</code>, then the function defined is:</p>
<pre><code>f(x) = 1.0 + 5.4 * ln(x)</code></pre>
<p>See the documentation for the option in question to learn what the parameter <code>x</code> is for. For example, in the case if the <a href="#hisat-options-score-min"><code>--score-min</code></a> option, the function <code>f(x)</code> sets the minimum alignment score necessary for an alignment to be considered valid, and <code>x</code> is the read length.</p>
<h3 id="usage">Usage</h3>
<pre><code>hisat [options]* -x <hisat-idx> {-1 <m1> -2 <m2> | -U <r>} -S [<hit>]</code></pre>
<h3 id="main-arguments">Main arguments</h3>
<table><tr><td>
<pre><code>-x <hisat-idx></code></pre>
</td><td>
<p>The basename of the index for the reference genome. The basename is the name of any of the index files up to but not including the final <code>.1.bt2</code> / <code>.rev.1.bt2</code> / etc. <code>hisat</code> looks for the specified index first in the current directory, then in the directory specified in the <code>HISAT_INDEXES</code> environment variable.</p>
</td></tr><tr><td>
<pre><code>-1 <m1></code></pre>
</td><td>
<p>Comma-separated list of files containing mate 1s (filename usually includes <code>_1</code>), e.g. <code>-1 flyA_1.fq,flyB_1.fq</code>. Sequences specified with this option must correspond file-for-file and read-for-read with those specified in <code><m2></code>. Reads may be a mix of different lengths. If <code>-</code> is specified, <code>hisat</code> will read the mate 1s from the "standard in" or "stdin" filehandle.</p>
</td></tr><tr><td>
<pre><code>-2 <m2></code></pre>
</td><td>
<p>Comma-separated list of files containing mate 2s (filename usually includes <code>_2</code>), e.g. <code>-2 flyA_2.fq,flyB_2.fq</code>. Sequences specified with this option must correspond file-for-file and read-for-read with those specified in <code><m1></code>. Reads may be a mix of different lengths. If <code>-</code> is specified, <code>hisat</code> will read the mate 2s from the "standard in" or "stdin" filehandle.</p>
</td></tr><tr><td>
<pre><code>-U <r></code></pre>
</td><td>
<p>Comma-separated list of files containing unpaired reads to be aligned, e.g. <code>lane1.fq,lane2.fq,lane3.fq,lane4.fq</code>. Reads may be a mix of different lengths. If <code>-</code> is specified, <code>hisat</code> gets the reads from the "standard in" or "stdin" filehandle.</p>
</td></tr><tr><td>
<pre><code>-S <hit></code></pre>
</td><td>
<p>File to write SAM alignments to. By default, alignments are written to the "standard out" or "stdout" filehandle (i.e. the console).</p>
</td></tr></table>
<h3 id="options">Options</h3>
<h4 id="input-options">Input options</h4>
<table>
<tr><td id="hisat-options-q">
<pre><code>-q</code></pre>
</td><td>
<p>Reads (specified with <code><m1></code>, <code><m2></code>, <code><s></code>) are FASTQ files. FASTQ files usually have extension <code>.fq</code> or <code>.fastq</code>. FASTQ is the default format. See also: <a href="#hisat-options-solexa-quals"><code>--solexa-quals</code></a> and <a href="#hisat-options-int-quals"><code>--int-quals</code></a>.</p>
</td></tr>
<tr><td id="hisat-options-qseq">
<pre><code>--qseq</code></pre>
</td><td>
<p>Reads (specified with <code><m1></code>, <code><m2></code>, <code><s></code>) are QSEQ files. QSEQ files usually end in <code>_qseq.txt</code>. See also: <a href="#hisat-options-solexa-quals"><code>--solexa-quals</code></a> and <a href="#hisat-options-int-quals"><code>--int-quals</code></a>.</p>
</td></tr>
<tr><td id="hisat-options-f">
<pre><code>-f</code></pre>
</td><td>
<p>Reads (specified with <code><m1></code>, <code><m2></code>, <code><s></code>) are FASTA files. FASTA files usually have extension <code>.fa</code>, <code>.fasta</code>, <code>.mfa</code>, <code>.fna</code> or similar. FASTA files do not have a way of specifying quality values, so when <code>-f</code> is set, the result is as if <code>--ignore-quals</code> is also set.</p>
</td></tr>
<tr><td id="hisat-options-r">
<pre><code>-r</code></pre>
</td><td>
<p>Reads (specified with <code><m1></code>, <code><m2></code>, <code><s></code>) are files with one input sequence per line, without any other information (no read names, no qualities). When <code>-r</code> is set, the result is as if <code>--ignore-quals</code> is also set.</p>
</td></tr>
<tr><td id="hisat-options-c">
<pre><code>-c</code></pre>
</td><td>
<p>The read sequences are given on command line. I.e. <code><m1></code>, <code><m2></code> and <code><singles></code> are comma-separated lists of reads rather than lists of read files. There is no way to specify read names or qualities, so <code>-c</code> also implies <code>--ignore-quals</code>.</p>
</td></tr>
<tr><td id="hisat-options-s">
<pre><code>-s/--skip <int></code></pre>
</td><td>
<p>Skip (i.e. do not align) the first <code><int></code> reads or pairs in the input.</p>
</td></tr>
<tr><td id="hisat-options-u">
<pre><code>-u/--qupto <int></code></pre>
</td><td>
<p>Align the first <code><int></code> reads or read pairs from the input (after the <a href="#hisat-options-s"><code>-s</code>/<code>--skip</code></a> reads or pairs have been skipped), then stop. Default: no limit.</p>
</td></tr>
<tr><td id="hisat-options-5">
<pre><code>-5/--trim5 <int></code></pre>
</td><td>
<p>Trim <code><int></code> bases from 5' (left) end of each read before alignment (default: 0).</p>
</td></tr>
<tr><td id="hisat-options-3">
<pre><code>-3/--trim3 <int></code></pre>
</td><td>
<p>Trim <code><int></code> bases from 3' (right) end of each read before alignment (default: 0).</p>
</td></tr><tr><td id="hisat-options-phred33-quals">
<pre><code>--phred33</code></pre>
</td><td>
<p>Input qualities are ASCII chars equal to the <a href="http://en.wikipedia.org/wiki/Phred_quality_score">Phred quality</a> plus 33. This is also called the "Phred+33" encoding, which is used by the very latest Illumina pipelines.</p>
</td></tr>
<tr><td id="hisat-options-phred64-quals">
<pre><code>--phred64</code></pre>
</td><td>
<p>Input qualities are ASCII chars equal to the <a href="http://en.wikipedia.org/wiki/Phred_quality_score">Phred quality</a> plus 64. This is also called the "Phred+64" encoding.</p>
</td></tr>
<tr><td id="hisat-options-solexa-quals">
<pre><code>--solexa-quals</code></pre>
</td><td>
<p>Convert input qualities from <a href="http://en.wikipedia.org/wiki/Phred_quality_score">Solexa</a> (which can be negative) to <a href="http://en.wikipedia.org/wiki/Phred_quality_score">Phred</a> (which can't). This scheme was used in older Illumina GA Pipeline versions (prior to 1.3). Default: off.</p>
</td></tr>
<tr><td id="hisat-options-int-quals">
<pre><code>--int-quals</code></pre>
</td><td>
<p>Quality values are represented in the read input file as space-separated ASCII integers, e.g., <code>40 40 30 40</code>..., rather than ASCII characters, e.g., <code>II?I</code>.... Integers are treated as being on the <a href="http://en.wikipedia.org/wiki/Phred_quality_score">Phred quality</a> scale unless <a href="#hisat-options-solexa-quals"><code>--solexa-quals</code></a> is also specified. Default: off.</p>
</td></tr></table>
<h4 id="alignment-options">Alignment options</h4>
<table>
<tr><td id="hisat-options-n-ceil">
<pre><code>--n-ceil <func></code></pre>
</td><td>
<p>Sets a function governing the maximum number of ambiguous characters (usually <code>N</code>s and/or <code>.</code>s) allowed in a read as a function of read length. For instance, specifying <code>-L,0,0.15</code> sets the N-ceiling function <code>f</code> to <code>f(x) = 0 + 0.15 * x</code>, where x is the read length. See also: [setting function options]. Reads exceeding this ceiling are <a href="#filtering">filtered out</a>. Default: <code>L,0,0.15</code>.</p>
</td></tr>
<tr><td id="hisat-options-ignore-quals">
<pre><code>--ignore-quals</code></pre>
</td><td>
<p>When calculating a mismatch penalty, always consider the quality value at the mismatched position to be the highest possible, regardless of the actual value. I.e. input is treated as though all quality values are high. This is also the default behavior when the input doesn't specify quality values (e.g. in <a href="#hisat-options-f"><code>-f</code></a>, <a href="#hisat-options-r"><code>-r</code></a>, or <a href="#hisat-options-c"><code>-c</code></a> modes).</p>
</td></tr>
<tr><td id="hisat-options-nofw">
<pre><code>--nofw/--norc</code></pre>
</td><td>
<p>If <code>--nofw</code> is specified, <code>hisat</code> will not attempt to align unpaired reads to the forward (Watson) reference strand. If <code>--norc</code> is specified, <code>hisat</code> will not attempt to align unpaired reads against the reverse-complement (Crick) reference strand. In paired-end mode, <code>--nofw</code> and <code>--norc</code> pertain to the fragments; i.e. specifying <code>--nofw</code> causes <code>hisat</code> to explore only those paired-end configurations corresponding to fragments from the reverse-complement (Crick) strand. Default: both strands enabled.</p>
</td></tr>
<!--
<tr><td id="hisat-options-end-to-end">
[`--end-to-end`]: #hisat-options-end-to-end
--end-to-end
</td><td>
In this mode, HISAT requires that the entire read align from one end to the
other, without any trimming (or "soft clipping") of characters from either end.
The match bonus [`--ma`] always equals 0 in this mode, so all alignment scores
are less than or equal to 0, and the greatest possible alignment score is 0.
This is mutually exclusive with [`--local`]. `--end-to-end` is the default mode.
</td></tr>
<tr><td id="hisat-options-local">
[`--local`]: #hisat-options-local
--local
</td><td>
In this mode, HISAT does not require that the entire read align from one end
to the other. Rather, some characters may be omitted ("soft clipped") from the
ends in order to achieve the greatest possible alignment score. The match bonus
[`--ma`] is used in this mode, and the best possible alignment score is equal to
the match bonus ([`--ma`]) times the length of the read. Specifying `--local`
and one of the presets (e.g. `--local --very-fast`) is equivalent to specifying
the local version of the preset (`--very-fast-local`). This is mutually
exclusive with [`--end-to-end`]. `--end-to-end` is the default mode.
</td></tr>
-->
</table>
<h4 id="scoring-options">Scoring options</h4>
<table>
<tr><td id="hisat-options-ma">
<pre><code>--ma <int></code></pre>
</td><td>
<p>Sets the match bonus. In [<code>--local</code>] mode <code><int></code> is added to the alignment score for each position where a read character aligns to a reference character and the characters match. Not used in [<code>--end-to-end</code>] mode. Default: 2.</p>
</td></tr>
<tr><td id="hisat-options-mp">
<pre><code>--mp MX,MN</code></pre>
</td><td>
<p>Sets the maximum (<code>MX</code>) and minimum (<code>MN</code>) mismatch penalties, both integers. A number less than or equal to <code>MX</code> and greater than or equal to <code>MN</code> is subtracted from the alignment score for each position where a read character aligns to a reference character, the characters do not match, and neither is an <code>N</code>. If <a href="#hisat-options-ignore-quals"><code>--ignore-quals</code></a> is specified, the number subtracted quals <code>MX</code>. Otherwise, the number subtracted is <code>MN + floor( (MX-MN)(MIN(Q, 40.0)/40.0) )</code> where Q is the Phred quality value. Default: <code>MX</code> = 6, <code>MN</code> = 2.</p>
</td></tr>
<tr><td id="hisat-options-np">
<pre><code>--np <int></code></pre>
</td><td>
<p>Sets penalty for positions where the read, reference, or both, contain an ambiguous character such as <code>N</code>. Default: 1.</p>
</td></tr>
<tr><td id="hisat-options-rdg">
<pre><code>--rdg <int1>,<int2></code></pre>
</td><td>
<p>Sets the read gap open (<code><int1></code>) and extend (<code><int2></code>) penalties. A read gap of length N gets a penalty of <code><int1></code> + N * <code><int2></code>. Default: 5, 3.</p>
</td></tr>
<tr><td id="hisat-options-rfg">
<pre><code>--rfg <int1>,<int2></code></pre>
</td><td>
<p>Sets the reference gap open (<code><int1></code>) and extend (<code><int2></code>) penalties. A reference gap of length N gets a penalty of <code><int1></code> + N * <code><int2></code>. Default: 5, 3.</p>
</td></tr>
<tr><td id="hisat-options-score-min">
<pre><code>--score-min <func></code></pre>
</td><td>
<p>Sets a function governing the minimum alignment score needed for an alignment to be considered "valid" (i.e. good enough to report). This is a function of read length. For instance, specifying <code>L,0,-0.6</code> sets the minimum-score function <code>f</code> to <code>f(x) = 0 + -0.6 * x</code>, where <code>x</code> is the read length. See also: [setting function options]. The default is <code>C,-18,0</code>.</p>
</td></tr>
</table>
<h4 id="spliced-alignment-options">Spliced alignment options</h4>
<table>
<tr><td id="hisat-options-pen-cansplice">
<pre><code>--pen-cansplice <int></code></pre>
</td><td>
<p>Sets the penalty for a canonical splice site. Default: 0.</p>
</td></tr>
<tr><td id="hisat-options-pen-noncansplice">
<pre><code>--pen-noncansplice <int></code></pre>
</td><td>
<p>Sets the penalty for a non-canonical splice site. Default: 3.</p>
</td></tr>
<tr><td id="hisat-options-pen-intronlen">
<pre><code>--pen-intronlen <func></code></pre>
</td><td>
<p>Sets the penalty for long introns so that alignments with shorter introns are preferred to those with longer introns. Default: G,-8,1</p>
</td></tr>
<tr><td id="hisat-options-known-splicesite-infile">
<pre><code>--known-splicesite-infile <path></code></pre>
</td><td>
<p>With this mode, you can provide a list of known splice sites, which HISAT makes use of them to align reads with small anchors.<br />You can create such a list using "python extract_splice_sites.py genes.gtf > splicesites.txt", where "extract_splice_sites.py" is included in the HISAT package, "genes.gtf" is a gene annotation file, and "splicesites.txt" is a list of splice sites with which you provide HISAT in this mode.</p>
</td></tr>
<tr><td id="hisat-options-novel-splice-outfile">
<pre><code>--novel-splicesite-outfile <path></code></pre>
</td><td>
<p>In this mode, HISAT reports a list of splice sites in the file "path":<br /> chromosome name "tab" genomic position of the flanking base on the left side of an intron "tab" genomic position of the flanking base on the right "tab" strand</p>
</td></tr>
<tr><td id="hisat-options-novel-splicesite-infile">
<pre><code>--novel-splicesite-infile <path></code></pre>
</td><td>
<p>With this mode, you can provide a list of novel splice sites that were generated from the above option "--novel-splicesite-outfile".</p>
</td></tr>
<tr><td id="hisat-options-no-temp-splicesite">
<pre><code>--no-temp-splicesite</code></pre>
</td><td>
<p>HISAT, by default, makes use of splice sites found by earlier reads to align later reads in the same run, in particular, reads with small anchors (<= 15 bp).<br />The option disables this default alignment strategy.</p>
</td></tr>
<tr><td id="hisat-options-no-spliced-alignment">
<pre><code>--no-spliced-alignment</code></pre>
</td><td>
<p>Disable spliced alignment.</p>
</td></tr>
<tr><td id="hisat-options-rna-strandness">
<pre><code>--rna-strandness <string></code></pre>
</td><td>
<p>Specify strand-specific information: the default is unstranded.<br />For single-end reads, use F or R. 'F' means a read corresponds to a transcript. 'R' means a read corresponds to the reverse complemented counterpart of a transcript. For paired-end reads, use either FR or RF.<br />Every read alignment will have an XS attribute tag: '+' means a read belongs to a transcript on '+' strand of genome. '-' means a read belongs to a transcript on '-' strand of genome. <br />
(TopHat has a similar option, --library-type option, where fr-firststrand corresponds to R and RF; fr-secondstrand corresponds to F and FR.)</p>
</td></tr>
</table>
<h4 id="reporting-options">Reporting options</h4>
<table>
<tr><td id="hisat-options-k">
<pre><code>-k <int></code></pre>
</td><td>
<p>It searches for at most <code><int></code> distinct, valid alignments for each read. The search terminates when it can't find more distinct valid alignments, or when it finds <code><int></code>, whichever happens first. All alignments found are reported in descending order by alignment score. The alignment score for a paired-end alignment equals the sum of the alignment scores of the individual mates. Each reported read or pair alignment beyond the first has the SAM 'secondary' bit (which equals 256) set in its FLAGS field. For reads that have more than <code><int></code> distinct, valid alignments, <code>hisat</code> does not gaurantee that the <code><int></code> alignments reported are the best possible in terms of alignment score. Default: 5</p>
<p>Note: HISAT is not designed with large values for <code>-k</code> in mind, and when aligning reads to long, repetitive genomes large <code>-k</code> can be very, very slow.</p>
</td></tr>
</table>
<h4 id="paired-end-options">Paired-end options</h4>
<table>
<tr><td id="hisat-options-I">
<pre><code>-I/--minins <int></code></pre>
</td><td>
<p>The minimum fragment length for valid paired-end alignments. E.g. if <code>-I 60</code> is specified and a paired-end alignment consists of two 20-bp alignments in the appropriate orientation with a 20-bp gap between them, that alignment is considered valid (as long as <a href="#hisat-options-X"><code>-X</code></a> is also satisfied). A 19-bp gap would not be valid in that case. If trimming options <a href="#hisat-options-3"><code>-3</code></a> or <a href="#hisat-options-5"><code>-5</code></a> are also used, the <a href="#hisat-options-I"><code>-I</code></a> constraint is applied with respect to the untrimmed mates.</p>
<p>The larger the difference between <a href="#hisat-options-I"><code>-I</code></a> and <a href="#hisat-options-X"><code>-X</code></a>, the slower HISAT will run. This is because larger differences bewteen <a href="#hisat-options-I"><code>-I</code></a> and <a href="#hisat-options-X"><code>-X</code></a> require that HISAT scan a larger window to determine if a concordant alignment exists. For typical fragment length ranges (200 to 400 nucleotides), HISAT is very efficient.</p>
<p>Default: 0 (essentially imposing no minimum)</p>
</td></tr>
<tr><td id="hisat-options-X">
<pre><code>-X/--maxins <int></code></pre>
</td><td>
<p>The maximum fragment length for valid paired-end alignments. E.g. if <code>-X 100</code> is specified and a paired-end alignment consists of two 20-bp alignments in the proper orientation with a 60-bp gap between them, that alignment is considered valid (as long as <a href="#hisat-options-I"><code>-I</code></a> is also satisfied). A 61-bp gap would not be valid in that case. If trimming options <a href="#hisat-options-3"><code>-3</code></a> or <a href="#hisat-options-5"><code>-5</code></a> are also used, the <code>-X</code> constraint is applied with respect to the untrimmed mates, not the trimmed mates.</p>
<p>The larger the difference between <a href="#hisat-options-I"><code>-I</code></a> and <a href="#hisat-options-X"><code>-X</code></a>, the slower HISAT will run. This is because larger differences bewteen <a href="#hisat-options-I"><code>-I</code></a> and <a href="#hisat-options-X"><code>-X</code></a> require that HISAT scan a larger window to determine if a concordant alignment exists. For typical fragment length ranges (200 to 400 nucleotides), HISAT is very efficient.</p>
<p>Default: 500.</p>
</td></tr>
<tr><td id="hisat-options-fr">
<pre><code>--fr/--rf/--ff</code></pre>
</td><td>
<p>The upstream/downstream mate orientations for a valid paired-end alignment against the forward reference strand. E.g., if <code>--fr</code> is specified and there is a candidate paired-end alignment where mate 1 appears upstream of the reverse complement of mate 2 and the fragment length constraints (<a href="#hisat-options-I"><code>-I</code></a> and <a href="#hisat-options-X"><code>-X</code></a>) are met, that alignment is valid. Also, if mate 2 appears upstream of the reverse complement of mate 1 and all other constraints are met, that too is valid. <code>--rf</code> likewise requires that an upstream mate1 be reverse-complemented and a downstream mate2 be forward-oriented. <code>--ff</code> requires both an upstream mate 1 and a downstream mate 2 to be forward-oriented. Default: <code>--fr</code> (appropriate for Illumina's Paired-end Sequencing Assay).</p>
</td></tr>
<tr><td id="hisat-options-no-mixed">
<pre><code>--no-mixed</code></pre>
</td><td>
<p>By default, when <code>hisat</code> cannot find a concordant or discordant alignment for a pair, it then tries to find alignments for the individual mates. This option disables that behavior.</p>
</td></tr>
<tr><td id="hisat-options-no-discordant">
<pre><code>--no-discordant</code></pre>
</td><td>
<p>By default, <code>hisat</code> looks for discordant alignments if it cannot find any concordant alignments. A discordant alignment is an alignment where both mates align uniquely, but that does not satisfy the paired-end constraints (<a href="#hisat-options-fr"><code>--fr</code>/<code>--rf</code>/<code>--ff</code></a>, <a href="#hisat-options-I"><code>-I</code></a>, <a href="#hisat-options-X"><code>-X</code></a>). This option disables that behavior.</p>
</td></tr>
<tr><td id="hisat-options-dovetail">
<pre><code>--dovetail</code></pre>
</td><td>
<p>If the mates "dovetail", that is if one mate alignment extends past the beginning of the other such that the wrong mate begins upstream, consider that to be concordant. See also: <a href="#mates-can-overlap-contain-or-dovetail-each-other">Mates can overlap, contain or dovetail each other</a>. Default: mates cannot dovetail in a concordant alignment.</p>
</td></tr>
<tr><td id="hisat-options-no-contain">
<pre><code>--no-contain</code></pre>
</td><td>
<p>If one mate alignment contains the other, consider that to be non-concordant. See also: <a href="#mates-can-overlap-contain-or-dovetail-each-other">Mates can overlap, contain or dovetail each other</a>. Default: a mate can contain the other in a concordant alignment.</p>
</td></tr>
<tr><td id="hisat-options-no-overlap">
<pre><code>--no-overlap</code></pre>
</td><td>
<p>If one mate alignment overlaps the other at all, consider that to be non-concordant. See also: <a href="#mates-can-overlap-contain-or-dovetail-each-other">Mates can overlap, contain or dovetail each other</a>. Default: mates can overlap in a concordant alignment.</p>
</td></tr></table>
<h4 id="output-options">Output options</h4>
<table>
<tr><td id="hisat-options-t">
<pre><code>-t/--time</code></pre>
</td><td>
<p>Print the wall-clock time required to load the index files and align the reads. This is printed to the "standard error" ("stderr") filehandle. Default: off.</p>
</td></tr>
<tr><td id="hisat-options-un">
<pre><code>--un <path>
--un-gz <path>
--un-bz2 <path></code></pre>
</td><td>
<p>Write unpaired reads that fail to align to file at <code><path></code>. These reads correspond to the SAM records with the FLAGS <code>0x4</code> bit set and neither the <code>0x40</code> nor <code>0x80</code> bits set. If <code>--un-gz</code> is specified, output will be gzip compressed. If <code>--un-bz2</code> is specified, output will be bzip2 compressed. Reads written in this way will appear exactly as they did in the input file, without any modification (same sequence, same name, same quality string, same quality encoding). Reads will not necessarily appear in the same order as they did in the input.</p>
</td></tr>
<tr><td id="hisat-options-al">
<pre><code>--al <path>
--al-gz <path>
--al-bz2 <path></code></pre>
</td><td>
<p>Write unpaired reads that align at least once to file at <code><path></code>. These reads correspond to the SAM records with the FLAGS <code>0x4</code>, <code>0x40</code>, and <code>0x80</code> bits unset. If <code>--al-gz</code> is specified, output will be gzip compressed. If <code>--al-bz2</code> is specified, output will be bzip2 compressed. Reads written in this way will appear exactly as they did in the input file, without any modification (same sequence, same name, same quality string, same quality encoding). Reads will not necessarily appear in the same order as they did in the input.</p>
</td></tr>
<tr><td id="hisat-options-un-conc">
<pre><code>--un-conc <path>
--un-conc-gz <path>
--un-conc-bz2 <path></code></pre>
</td><td>
<p>Write paired-end reads that fail to align concordantly to file(s) at <code><path></code>. These reads correspond to the SAM records with the FLAGS <code>0x4</code> bit set and either the <code>0x40</code> or <code>0x80</code> bit set (depending on whether it's mate #1 or #2). <code>.1</code> and <code>.2</code> strings are added to the filename to distinguish which file contains mate #1 and mate #2. If a percent symbol, <code>%</code>, is used in <code><path></code>, the percent symbol is replaced with <code>1</code> or <code>2</code> to make the per-mate filenames. Otherwise, <code>.1</code> or <code>.2</code> are added before the final dot in <code><path></code> to make the per-mate filenames. Reads written in this way will appear exactly as they did in the input files, without any modification (same sequence, same name, same quality string, same quality encoding). Reads will not necessarily appear in the same order as they did in the inputs.</p>
</td></tr>
<tr><td id="hisat-options-al-conc">
<pre><code>--al-conc <path>
--al-conc-gz <path>
--al-conc-bz2 <path></code></pre>
</td><td>
<p>Write paired-end reads that align concordantly at least once to file(s) at <code><path></code>. These reads correspond to the SAM records with the FLAGS <code>0x4</code> bit unset and either the <code>0x40</code> or <code>0x80</code> bit set (depending on whether it's mate #1 or #2). <code>.1</code> and <code>.2</code> strings are added to the filename to distinguish which file contains mate #1 and mate #2. If a percent symbol, <code>%</code>, is used in <code><path></code>, the percent symbol is replaced with <code>1</code> or <code>2</code> to make the per-mate filenames. Otherwise, <code>.1</code> or <code>.2</code> are added before the final dot in <code><path></code> to make the per-mate filenames. Reads written in this way will appear exactly as they did in the input files, without any modification (same sequence, same name, same quality string, same quality encoding). Reads will not necessarily appear in the same order as they did in the inputs.</p>
</td></tr>
<tr><td id="hisat-options-quiet">
<pre><code>--quiet</code></pre>
</td><td>
<p>Print nothing besides alignments and serious errors.</p>
</td></tr>
<tr><td id="hisat-options-met-file">
<pre><code>--met-file <path></code></pre>
</td><td>
<p>Write <code>hisat</code> metrics to file <code><path></code>. Having alignment metric can be useful for debugging certain problems, especially performance issues. See also: <a href="#hisat-options-met"><code>--met</code></a>. Default: metrics disabled.</p>
</td></tr>
<tr><td id="hisat-options-met-stderr">
<pre><code>--met-stderr</code></pre>
</td><td>
<p>Write <code>hisat</code> metrics to the "standard error" ("stderr") filehandle. This is not mutually exclusive with <a href="#hisat-options-met-file"><code>--met-file</code></a>. Having alignment metric can be useful for debugging certain problems, especially performance issues. See also: <a href="#hisat-options-met"><code>--met</code></a>. Default: metrics disabled.</p>
</td></tr>
<tr><td id="hisat-options-met">
<pre><code>--met <int></code></pre>
</td><td>
<p>Write a new <code>hisat</code> metrics record every <code><int></code> seconds. Only matters if either <a href="#hisat-options-met-stderr"><code>--met-stderr</code></a> or <a href="#hisat-options-met-file"><code>--met-file</code></a> are specified. Default: 1.</p>
</td></tr>
</table>
<h4 id="sam-options">SAM options</h4>
<table>
<tr><td id="hisat-options-no-unal">
<pre><code>--no-unal</code></pre>
</td><td>
<p>Suppress SAM records for reads that failed to align.</p>
</td></tr>
<tr><td id="hisat-options-no-hd">
<pre><code>--no-hd</code></pre>
</td><td>
<p>Suppress SAM header lines (starting with <code>@</code>).</p>
</td></tr>
<tr><td id="hisat-options-no-sq">
<pre><code>--no-sq</code></pre>
</td><td>
<p>Suppress <code>@SQ</code> SAM header lines.</p>
</td></tr>
<tr><td id="hisat-options-rg-id">
<pre><code>--rg-id <text></code></pre>
</td><td>
<p>Set the read group ID to <code><text></code>. This causes the SAM <code>@RG</code> header line to be printed, with <code><text></code> as the value associated with the <code>ID:</code> tag. It also causes the <code>RG:Z:</code> extra field to be attached to each SAM output record, with value set to <code><text></code>.</p>
</td></tr>
<tr><td id="hisat-options-rg">
<pre><code>--rg <text></code></pre>
</td><td>
<p>Add <code><text></code> (usually of the form <code>TAG:VAL</code>, e.g. <code>SM:Pool1</code>) as a field on the <code>@RG</code> header line. Note: in order for the <code>@RG</code> line to appear, <a href="#hisat-options-rg-id"><code>--rg-id</code></a> must also be specified. This is because the <code>ID</code> tag is required by the <a href="http://samtools.sourceforge.net/SAM1.pdf">SAM Spec</a>. Specify <code>--rg</code> multiple times to set multiple fields. See the <a href="http://samtools.sourceforge.net/SAM1.pdf">SAM Spec</a> for details about what fields are legal.</p>
</td></tr>
<tr><td id="hisat-options-omit-sec-seq">
<pre><code>--omit-sec-seq</code></pre>
</td><td>
<p>When printing secondary alignments, HISAT by default will write out the <code>SEQ</code> and <code>QUAL</code> strings. Specifying this option causes HISAT to print an asterix in those fields instead.</p>
</td></tr>
</table>
<h4 id="performance-options">Performance options</h4>
<table><tr>
<td id="hisat-options-o">
<pre><code>-o/--offrate <int></code></pre>
</td><td>
<p>Override the offrate of the index with <code><int></code>. If <code><int></code> is greater than the offrate used to build the index, then some row markings are discarded when the index is read into memory. This reduces the memory footprint of the aligner but requires more time to calculate text offsets. <code><int></code> must be greater than the value used to build the index.</p>
</td></tr>
<tr><td id="hisat-options-p">
<pre><code>-p/--threads NTHREADS</code></pre>
</td><td>
<p>Launch <code>NTHREADS</code> parallel search threads (default: 1). Threads will run on separate processors/cores and synchronize when parsing reads and outputting alignments. Searching for alignments is highly parallel, and speedup is close to linear. Increasing <code>-p</code> increases HISAT's memory footprint. E.g. when aligning to a human genome index, increasing <code>-p</code> from 1 to 8 increases the memory footprint by a few hundred megabytes. This option is only available if <code>bowtie</code> is linked with the <code>pthreads</code> library (i.e. if <code>BOWTIE_PTHREADS=0</code> is not specified at build time).</p>
</td></tr>
<tr><td id="hisat-options-reorder">
<pre><code>--reorder</code></pre>
</td><td>
<p>Guarantees that output SAM records are printed in an order corresponding to the order of the reads in the original input file, even when <a href="#hisat-options-p"><code>-p</code></a> is set greater than 1. Specifying <code>--reorder</code> and setting <a href="#hisat-options-p"><code>-p</code></a> greater than 1 causes HISAT to run somewhat slower and use somewhat more memory then if <code>--reorder</code> were not specified. Has no effect if <a href="#hisat-options-p"><code>-p</code></a> is set to 1, since output order will naturally correspond to input order in that case.</p>
</td></tr>
<tr><td id="hisat-options-mm">
<pre><code>--mm</code></pre>
</td><td>
<p>Use memory-mapped I/O to load the index, rather than typical file I/O. Memory-mapping allows many concurrent <code>bowtie</code> processes on the same computer to share the same memory image of the index (i.e. you pay the memory overhead just once). This facilitates memory-efficient parallelization of <code>bowtie</code> in situations where using <a href="#hisat-options-p"><code>-p</code></a> is not possible or not preferable.</p>
</td></tr></table>
<h4 id="other-options">Other options</h4>
<table>
<tr><td id="hisat-options-qc-filter">
<pre><code>--qc-filter</code></pre>
</td><td>
<p>Filter out reads for which the QSEQ filter field is non-zero. Only has an effect when read format is <a href="#hisat-options-qseq"><code>--qseq</code></a>. Default: off.</p>
</td></tr>
<tr><td id="hisat-options-seed">
<pre><code>--seed <int></code></pre>
</td><td>
<p>Use <code><int></code> as the seed for pseudo-random number generator. Default: 0.</p>
</td></tr>
<tr><td id="hisat-options-non-deterministic">
<pre><code>--non-deterministic</code></pre>
</td><td>
<p>Normally, HISAT re-initializes its pseudo-random generator for each read. It seeds the generator with a number derived from (a) the read name, (b) the nucleotide sequence, (c) the quality sequence, (d) the value of the <a href="#hisat-options-seed"><code>--seed</code></a> option. This means that if two reads are identical (same name, same nucleotides, same qualities) HISAT will find and report the same alignment(s) for both, even if there was ambiguity. When <code>--non-deterministic</code> is specified, HISAT re-initializes its pseudo-random generator for each read using the current time. This means that HISAT will not necessarily report the same alignment for two identical reads. This is counter-intuitive for some users, but might be more appropriate in situations where the input consists of many identical reads.</p>
</td></tr>
<tr><td id="hisat-options-version">
<pre><code>--version</code></pre>
</td><td>
<p>Print version information and quit.</p>
</td></tr>
<tr><td id="hisat-options-h">
<pre><code>-h/--help</code></pre>
</td><td>
<p>Print usage information and quit.</p>
</td></tr></table>
<h2 id="sam-output">SAM output</h2>
<p>Following is a brief description of the <a href="http://samtools.sourceforge.net/SAM1.pdf">SAM</a> format as output by <code>hisat</code>. For more details, see the <a href="http://samtools.sourceforge.net/SAM1.pdf">SAM format specification</a>.</p>
<p>By default, <code>hisat</code> prints a SAM header with <code>@HD</code>, <code>@SQ</code> and <code>@PG</code> lines. When one or more <a href="#hisat-options-rg"><code>--rg</code></a> arguments are specified, <code>hisat</code> will also print an <code>@RG</code> line that includes all user-specified <a href="#hisat-options-rg"><code>--rg</code></a> tokens separated by tabs.</p>
<p>Each subsequnt line describes an alignment or, if the read failed to align, a read. Each line is a collection of at least 12 fields separated by tabs; from left to right, the fields are:</p>
<ol style="list-style-type: decimal">
<li><p>Name of read that aligned.</p>
<p>Note that the <a href="http://samtools.sourceforge.net/SAM1.pdf">SAM specification</a> disallows whitespace in the read name. If the read name contains any whitespace characters, HISAT will truncate the name at the first whitespace character. This is similar to the behavior of other tools.</p></li>
<li><p>Sum of all applicable flags. Flags relevant to HISAT are:</p>
<table><tr><td>
<pre><code>1</code></pre>
</td><td>
<p>The read is one of a pair</p>
</td></tr><tr><td>
<pre><code>2</code></pre>
</td><td>
<p>The alignment is one end of a proper paired-end alignment</p>
</td></tr><tr><td>
<pre><code>4</code></pre>
</td><td>
<p>The read has no reported alignments</p>
</td></tr><tr><td>
<pre><code>8</code></pre>
</td><td>
<p>The read is one of a pair and has no reported alignments</p>
</td></tr><tr><td>
<pre><code>16</code></pre>
</td><td>
<p>The alignment is to the reverse reference strand</p>
</td></tr><tr><td>
<pre><code>32</code></pre>
</td><td>
<p>The other mate in the paired-end alignment is aligned to the reverse reference strand</p>
</td></tr><tr><td>
<pre><code>64</code></pre>
</td><td>
<p>The read is mate 1 in a pair</p>
</td></tr><tr><td>
<pre><code>128</code></pre>
</td><td>
<p>The read is mate 2 in a pair</p>
</td></tr></table>
<p>Thus, an unpaired read that aligns to the reverse reference strand will have flag 16. A paired-end read that aligns and is the first mate in the pair will have flag 83 (= 64 + 16 + 2 + 1).</p></li>
<li><p>Name of reference sequence where alignment occurs</p></li>
<li><p>1-based offset into the forward reference strand where leftmost character of the alignment occurs</p></li>
<li><p>Mapping quality</p></li>
<li><p>CIGAR string representation of alignment</p></li>
<li><p>Name of reference sequence where mate's alignment occurs. Set to <code>=</code> if the mate's reference sequence is the same as this alignment's, or <code>*</code> if there is no mate.</p></li>
<li><p>1-based offset into the forward reference strand where leftmost character of the mate's alignment occurs. Offset is 0 if there is no mate.</p></li>
<li><p>Inferred fragment length. Size is negative if the mate's alignment occurs upstream of this alignment. Size is 0 if the mates did not align concordantly. However, size is non-0 if the mates aligned discordantly to the same chromosome.</p></li>
<li><p>Read sequence (reverse-complemented if aligned to the reverse strand)</p></li>
<li><p>ASCII-encoded read qualities (reverse-complemented if the read aligned to the reverse strand). The encoded quality values are on the <a href="http://en.wikipedia.org/wiki/Phred_quality_score">Phred quality</a> scale and the encoding is ASCII-offset by 33 (ASCII char <code>!</code>), similarly to a <a href="http://en.wikipedia.org/wiki/FASTQ_format">FASTQ</a> file.</p></li>
<li><p>Optional fields. Fields are tab-separated. <code>hisat</code> outputs zero or more of these optional fields for each alignment, depending on the type of the alignment:</p>
<table>
<tr><td id="hisat-build-opt-fields-as">
<pre><code>AS:i:<N></code></pre>
</td>
<td>
<p>Alignment score. Can be negative. Can be greater than 0 in [<code>--local</code>] mode (but not in [<code>--end-to-end</code>] mode). Only present if SAM record is for an aligned read.</p>
</td></tr>
<tr><td id="hisat-build-opt-fields-xs">
<pre><code>XS:i:<N></code></pre>
</td>
<td>
<p>Alignment score for second-best alignment. Can be negative. Can be greater than 0 in [<code>--local</code>] mode (but not in [<code>--end-to-end</code>] mode). Only present if the SAM record is for an aligned read and more than one alignment was found for the read.</p>
</td></tr>
<tr><td id="hisat-build-opt-fields-ys">
<pre><code>YS:i:<N></code></pre>
</td>
<td>
<p>Alignment score for opposite mate in the paired-end alignment. Only present if the SAM record is for a read that aligned as part of a paired-end alignment.</p>
</td></tr>
<tr><td id="hisat-build-opt-fields-xn">
<pre><code>XN:i:<N></code></pre>
</td>
<td>
<p>The number of ambiguous bases in the reference covering this alignment. Only present if SAM record is for an aligned read.</p>
</td></tr>
<tr><td id="hisat-build-opt-fields-xm">
<pre><code>XM:i:<N></code></pre>
</td>
<td>
<p>The number of mismatches in the alignment. Only present if SAM record is for an aligned read.</p>
</td></tr>
<tr><td id="hisat-build-opt-fields-xo">
<pre><code>XO:i:<N></code></pre>
</td>
<td>
<p>The number of gap opens, for both read and reference gaps, in the alignment. Only present if SAM record is for an aligned read.</p>
</td></tr>
<tr><td id="hisat-build-opt-fields-xg">
<pre><code>XG:i:<N></code></pre>
</td>
<td>
<p>The number of gap extensions, for both read and reference gaps, in the alignment. Only present if SAM record is for an aligned read.</p>
</td></tr>
<tr><td id="hisat-build-opt-fields-nm">
<pre><code>NM:i:<N></code></pre>
</td>
<td>
<p>The edit distance; that is, the minimal number of one-nucleotide edits (substitutions, insertions and deletions) needed to transform the read string into the reference string. Only present if SAM record is for an aligned read.</p>
</td></tr>
<tr><td id="hisat-build-opt-fields-yf">
<pre><code>YF:Z:<S></code></pre>
</td><td>
<p>String indicating reason why the read was filtered out. See also: [Filtering]. Only appears for reads that were filtered out.</p>
</td></tr>
<tr><td id="hisat-build-opt-fields-yt">
<pre><code>YT:Z:<S></code></pre>
</td><td>
<p>Value of <code>UU</code> indicates the read was not part of a pair. Value of <code>CP</code> indicates the read was part of a pair and the pair aligned concordantly. Value of <code>DP</code> indicates the read was part of a pair and the pair aligned discordantly. Value of <code>UP</code> indicates the read was part of a pair but the pair failed to aligned either concordantly or discordantly.</p>
</td></tr>
<tr><td id="hisat-build-opt-fields-md">
<pre><code>MD:Z:<S></code></pre>
</td><td>
<p>A string representation of the mismatched reference bases in the alignment. See <a href="http://samtools.sourceforge.net/SAM1.pdf">SAM</a> format specification for details. Only present if SAM record is for an aligned read.</p>
</td></tr>
</table>
</li>
</ol>
<h1 id="the-hisat-build-indexer">The <code>hisat-build</code> indexer</h1>
<p><code>hisat-build</code> builds a HISAT index from a set of DNA sequences. <code>hisat-build</code> outputs a set of 6 files with suffixes <code>.1.bt2</code>, <code>.2.bt2</code>, <code>.3.bt2</code>, <code>.4.bt2</code>, <code>.rev.1.bt2</code>, and <code>.rev.2.bt2</code>. In the case of a large index these suffixes will have a <code>bt2l</code> termination. These files together constitute the index: they are all that is needed to align reads to that reference. The original sequence FASTA files are no longer used by HISAT once the index is built.</p>
<p>Use of Karkkainen's <a href="http://portal.acm.org/citation.cfm?id=1314852">blockwise algorithm</a> allows <code>hisat-build</code> to trade off between running time and memory usage. <code>hisat-build</code> has three options governing how it makes this trade: <a href="#hisat-build-options-p"><code>-p</code>/<code>--packed</code></a>, <a href="#hisat-build-options-bmax"><code>--bmax</code></a>/<a href="#hisat-build-options-bmaxdivn"><code>--bmaxdivn</code></a>, and <a href="#hisat-build-options-dcv"><code>--dcv</code></a>. By default, <code>hisat-build</code> will automatically search for the settings that yield the best running time without exhausting memory. This behavior can be disabled using the <a href="#hisat-build-options-a"><code>-a</code>/<code>--noauto</code></a> option.</p>
<p>The indexer provides options pertaining to the "shape" of the index, e.g. <a href="#hisat-build-options-o"><code>--offrate</code></a> governs the fraction of <a href="http://en.wikipedia.org/wiki/Burrows-Wheeler_transform">Burrows-Wheeler</a> rows that are "marked" (i.e., the density of the suffix-array sample; see the original <a href="http://en.wikipedia.org/wiki/FM-index">FM Index</a> paper for details). All of these options are potentially profitable trade-offs depending on the application. They have been set to defaults that are reasonable for most cases according to our experiments. See <a href="#performance-tuning">Performance tuning</a> for details.</p>
<p><code>hisat-build</code> can generate either <a href="#small-and-large-indexes">small or large indexes</a>. The wrapper will decide which based on the length of the input genome. If the reference does not exceed 4 billion characters but a large index is preferred, the user can specify <a href="#hisat-build-options-large-index"><code>--large-index</code></a> to force <code>hisat-build</code> to build a large index instead.</p>
<p>The HISAT index is based on the <a href="http://en.wikipedia.org/wiki/FM-index">FM Index</a> of Ferragina and Manzini, which in turn is based on the <a href="http://en.wikipedia.org/wiki/Burrows-Wheeler_transform">Burrows-Wheeler</a> transform. The algorithm used to build the index is based on the <a href="http://portal.acm.org/citation.cfm?id=1314852">blockwise algorithm</a> of Karkkainen.</p>
<h2 id="command-line-1">Command Line</h2>
<p>Usage:</p>
<pre><code>hisat-build [options]* <reference_in> <bt2_base></code></pre>
<h3 id="main-arguments-1">Main arguments</h3>
<table><tr><td>
<pre><code><reference_in></code></pre>
</td><td>
<p>A comma-separated list of FASTA files containing the reference sequences to be aligned to, or, if <a href="#hisat-build-options-c"><code>-c</code></a> is specified, the sequences themselves. E.g., <code><reference_in></code> might be <code>chr1.fa,chr2.fa,chrX.fa,chrY.fa</code>, or, if <a href="#hisat-build-options-c"><code>-c</code></a> is specified, this might be <code>GGTCATCCT,ACGGGTCGT,CCGTTCTATGCGGCTTA</code>.</p>
</td></tr><tr><td>
<pre><code><bt2_base></code></pre>
</td><td>
<p>The basename of the index files to write. By default, <code>hisat-build</code> writes files named <code>NAME.1.bt2</code>, <code>NAME.2.bt2</code>, <code>NAME.3.bt2</code>, <code>NAME.4.bt2</code>, <code>NAME.5.bt2</code>, <code>NAME.6.bt2</code>, <code>NAME.rev.1.bt2</code>, <code>NAME.rev.2.bt2</code>, <code>NAME.rev.5.bt2</code>, and <code>NAME.rev.6.bt2</code> where <code>NAME</code> is <code><bt2_base></code>.</p>
</td></tr></table>
<h3 id="options-1">Options</h3>
<table><tr><td>
<pre><code>-f</code></pre>
</td><td>
<p>The reference input files (specified as <code><reference_in></code>) are FASTA files (usually having extension <code>.fa</code>, <code>.mfa</code>, <code>.fna</code> or similar).</p>
</td></tr><tr><td id="hisat-build-options-c">
<pre><code>-c</code></pre>
</td><td>
<p>The reference sequences are given on the command line. I.e. <code><reference_in></code> is a comma-separated list of sequences rather than a list of FASTA files.</p>
</td></tr>
</td>
</tra>
<tr><td id="hisat-build-options-large-index">
<pre><code>--large-index</code></pre>
</td><td>
<p>Force <code>hisat-build</code> to build a <a href="#small-and-large-indexes">large index</a>, even if the reference is less than ~ 4 billion nucleotides inlong.</p>
</td></tr>
<tr><td id="hisat-build-options-a">
<pre><code>-a/--noauto</code></pre>
</td><td>
<p>Disable the default behavior whereby <code>hisat-build</code> automatically selects values for the <a href="#hisat-build-options-bmax"><code>--bmax</code></a>, <a href="#hisat-build-options-dcv"><code>--dcv</code></a> and <a href="#hisat-build-options-p"><code>--packed</code></a> parameters according to available memory. Instead, user may specify values for those parameters. If memory is exhausted during indexing, an error message will be printed; it is up to the user to try new parameters.</p>
</td></tr><tr><td id="hisat-build-options-p">
<pre><code>-p/--packed</code></pre>
</td><td>
<p>Use a packed (2-bits-per-nucleotide) representation for DNA strings. This saves memory but makes indexing 2-3 times slower. Default: off. This is configured automatically by default; use <a href="#hisat-build-options-a"><code>-a</code>/<code>--noauto</code></a> to configure manually.</p>
</td></tr><tr><td id="hisat-build-options-bmax">
<pre><code>--bmax <int></code></pre>
</td><td>
<p>The maximum number of suffixes allowed in a block. Allowing more suffixes per block makes indexing faster, but increases peak memory usage. Setting this option overrides any previous setting for <a href="#hisat-build-options-bmax"><code>--bmax</code></a>, or <a href="#hisat-build-options-bmaxdivn"><code>--bmaxdivn</code></a>. Default (in terms of the <a href="#hisat-build-options-bmaxdivn"><code>--bmaxdivn</code></a> parameter) is <a href="#hisat-build-options-bmaxdivn"><code>--bmaxdivn</code></a> 4. This is configured automatically by default; use <a href="#hisat-build-options-a"><code>-a</code>/<code>--noauto</code></a> to configure manually.</p>
</td></tr><tr><td id="hisat-build-options-bmaxdivn">
<pre><code>--bmaxdivn <int></code></pre>
</td><td>
<p>The maximum number of suffixes allowed in a block, expressed as a fraction of the length of the reference. Setting this option overrides any previous setting for <a href="#hisat-build-options-bmax"><code>--bmax</code></a>, or <a href="#hisat-build-options-bmaxdivn"><code>--bmaxdivn</code></a>. Default: <a href="#hisat-build-options-bmaxdivn"><code>--bmaxdivn</code></a> 4. This is configured automatically by default; use <a href="#hisat-build-options-a"><code>-a</code>/<code>--noauto</code></a> to configure manually.</p>
</td></tr><tr><td id="hisat-build-options-dcv">
<pre><code>--dcv <int></code></pre>
</td><td>
<p>Use <code><int></code> as the period for the difference-cover sample. A larger period yields less memory overhead, but may make suffix sorting slower, especially if repeats are present. Must be a power of 2 no greater than 4096. Default: 1024. This is configured automatically by default; use <a href="#hisat-build-options-a"><code>-a</code>/<code>--noauto</code></a> to configure manually.</p>
</td></tr><tr><td id="hisat-build-options-nodc">
<pre><code>--nodc</code></pre>
</td><td>
<p>Disable use of the difference-cover sample. Suffix sorting becomes quadratic-time in the worst case (where the worst case is an extremely repetitive reference). Default: off.</p>
</td></tr><tr><td>
<pre><code>-r/--noref</code></pre>
</td><td>
<p>Do not build the <code>NAME.3.bt2</code> and <code>NAME.4.bt2</code> portions of the index, which contain a bitpacked version of the reference sequences and are used for paired-end alignment.</p>
</td></tr><tr><td>
<pre><code>-3/--justref</code></pre>
</td><td>
<p>Build only the <code>NAME.3.bt2</code> and <code>NAME.4.bt2</code> portions of the index, which contain a bitpacked version of the reference sequences and are used for paired-end alignment.</p>
</td></tr><tr><td id="hisat-build-options-o">
<pre><code>-o/--offrate <int></code></pre>
</td><td>
<p>To map alignments back to positions on the reference sequences, it's necessary to annotate ("mark") some or all of the <a href="http://en.wikipedia.org/wiki/Burrows-Wheeler_transform">Burrows-Wheeler</a> rows with their corresponding location on the genome. <a href="#hisat-build-options-o"><code>-o</code>/<code>--offrate</code></a> governs how many rows get marked: the indexer will mark every 2^<code><int></code> rows. Marking more rows makes reference-position lookups faster, but requires more memory to hold the annotations at runtime. The default is 4 (every 16th row is marked; for human genome, annotations occupy about 680 megabytes).</p>
</td></tr><tr><td>
<pre><code>-t/--ftabchars <int></code></pre>
</td><td>
<p>The ftab is the lookup table used to calculate an initial <a href="http://en.wikipedia.org/wiki/Burrows-Wheeler_transform">Burrows-Wheeler</a> range with respect to the first <code><int></code> characters of the query. A larger <code><int></code> yields a larger lookup table but faster query times. The ftab has size 4^(<code><int></code>+1) bytes. The default setting is 10 (ftab is 4MB).</p>
</td></tr><tr><td id="hisat-build-options-localoffrate">
<pre><code>--localoffrate <int></code></pre>
</td><td>
<p>This option governs how many rows get marked in a local index: the indexer will mark every 2^<code><int></code> rows. Marking more rows makes reference-position lookups faster, but requires more memory to hold the annotations at runtime. The default is 3 (every 8th row is marked, this occupies about 16KB per local index).</p>
</td></tr><tr><td>
<pre><code>--localftabchars <int></code></pre>
</td><td>
<p>The local ftab is the lookup table in a local index. The default setting is 6 (ftab is 8KB per local index).</p>
</td></tr><tr><td>
<pre><code>--seed <int></code></pre>
</td><td>
<p>Use <code><int></code> as the seed for pseudo-random number generator.</p>
</td></tr><tr><td>
<pre><code>--cutoff <int></code></pre>
</td><td>
<p>Index only the first <code><int></code> bases of the reference sequences (cumulative across sequences) and ignore the rest.</p>
</td></tr><tr><td>
<pre><code>-q/--quiet</code></pre>
</td><td>
<p><code>hisat-build</code> is verbose by default. With this option <code>hisat-build</code> will print only error messages.</p>
</td></tr><tr><td>
<pre><code>-h/--help</code></pre>
</td><td>
<p>Print usage information and quit.</p>
</td></tr><tr><td>
<pre><code>--version</code></pre>
</td><td>
<p>Print version information and quit.</p>
</td></tr></table>
<h1 id="the-hisat-inspect-index-inspector">The <code>hisat-inspect</code> index inspector</h1>
<p><code>hisat-inspect</code> extracts information from a HISAT index about what kind of index it is and what reference sequences were used to build it. When run without any options, the tool will output a FASTA file containing the sequences of the original references (with all non-<code>A</code>/<code>C</code>/<code>G</code>/<code>T</code> characters converted to <code>N</code>s). It can also be used to extract just the reference sequence names using the <a href="#hisat-inspect-options-n"><code>-n</code>/<code>--names</code></a> option or a more verbose summary using the <a href="#hisat-inspect-options-s"><code>-s</code>/<code>--summary</code></a> option.</p>
<h2 id="command-line-2">Command Line</h2>
<p>Usage:</p>
<pre><code>hisat-inspect [options]* <bt2_base></code></pre>
<h3 id="main-arguments-2">Main arguments</h3>
<table><tr><td>
<pre><code><bt2_base></code></pre>
</td><td>
<p>The basename of the index to be inspected. The basename is name of any of the index files but with the <code>.X.bt2</code> or <code>.rev.X.bt2</code> suffix omitted. <code>hisat-inspect</code> first looks in the current directory for the index files, then in the directory specified in the <code>HISAT_INDEXES</code> environment variable.</p>
</td></tr></table>
<h3 id="options-2">Options</h3>
<table><tr><td>
<pre><code>-a/--across <int></code></pre>
</td><td>
<p>When printing FASTA output, output a newline character every <code><int></code> bases (default: 60).</p>
</td></tr><tr><td id="hisat-inspect-options-n">
<pre><code>-n/--names</code></pre>
</td><td>
<p>Print reference sequence names, one per line, and quit.</p>
</td></tr><tr><td id="hisat-inspect-options-s">
<pre><code>-s/--summary</code></pre>
</td><td>
<p>Print a summary that includes information about index settings, as well as the names and lengths of the input sequences. The summary has this format:</p>
<pre><code>Colorspace <0 or 1>
SA-Sample 1 in <sample>
FTab-Chars <chars>
Sequence-1 <name> <len>
Sequence-2 <name> <len>
...
Sequence-N <name> <len></code></pre>
<p>Fields are separated by tabs. Colorspace is always set to 0 for HISAT.</p>
</td></tr><tr><td>
<pre><code>-v/--verbose</code></pre>
</td><td>
<p>Print verbose output (for debugging).</p>
</td></tr><tr><td>
<pre><code>--version</code></pre>
</td><td>
<p>Print version information and quit.</p>
</td></tr><tr><td>
<pre><code>-h/--help</code></pre>
</td><td>
<p>Print usage information and quit.</p>
</td></tr></table>
<h1 id="getting-started-with-hisat">Getting started with HISAT</h1>
<p>HISAT comes with some example files to get you started. The example files are not scientifically significant; these files will simply let you start running HISAT and downstream tools right away.</p>
<p>First follow the manual instructions to <a href="#obtaining-hisat">obtain HISAT</a>. Set the <code>HISAT_HOME</code> environment variable to point to the new HISAT directory containing the <code>hisat</code>, <code>hisat-build</code> and <code>hisat-inspect</code> binaries. This is important, as the <code>HISAT_HOME</code> variable is used in the commands below to refer to that directory.</p>
<h2 id="indexing-a-reference-genome">Indexing a reference genome</h2>
<p>To create an index for the genomic region (1 million bps from the human chromosome 22 between 20,000,000 and 20,999,999) included with HISAT, create a new temporary directory (it doesn't matter where), change into that directory, and run:</p>
<pre><code>$HISAT_HOME/hisat-build $HISAT_HOME/example/reference/22_20-21M.fa 22_20-21M_hisat</code></pre>
<p>The command should print many lines of output then quit. When the command completes, the current directory will contain ten new files that all start with <code>22_20-21M_hisat</code> and end with <code>.1.bt2</code>, <code>.2.bt2</code>, <code>.3.bt2</code>, <code>.4.bt2</code>, <code>.5.bt2</code>, <code>.6.bt2</code>, <code>.rev.1.bt2</code>, <code>.rev.2.bt2</code>, <code>.rev.5.bt2</code>, and <code>.rev.6.bt2</code>. These files constitute the index - you're done!</p>
<p>You can use <code>hisat-build</code> to create an index for a set of FASTA files obtained from any source, including sites such as <a href="http://genome.ucsc.edu/cgi-bin/hgGateway">UCSC</a>, <a href="http://www.ncbi.nlm.nih.gov/sites/genome">NCBI</a>, and <a href="http://www.ensembl.org/">Ensembl</a>. When indexing multiple FASTA files, specify all the files using commas to separate file names. For more details on how to create an index with <code>hisat-build</code>, see the <a href="#the-hisat-build-indexer">manual section on index building</a>. You may also want to bypass this process by obtaining a pre-built index.</p>
<h2 id="aligning-example-reads">Aligning example reads</h2>
<p>Stay in the directory created in the previous step, which now contains the <code>22_20-21M_hisat</code> index files. Next, run:</p>
<pre><code>$HISAT_HOME/hisat -x 22_20-21M_hisat -U $HISAT_HOME/example/reads/reads_1.fq -S eg1.sam</code></pre>
<p>This runs the HISAT aligner, which aligns a set of unpaired reads to the the genome region using the index generated in the previous step. The alignment results in SAM format are written to the file <code>eg1.sam</code>, and a short alignment summary is written to the console. (Actually, the summary is written to the "standard error" or "stderr" filehandle, which is typically printed to the console.)</p>
<p>To see the first few lines of the SAM output, run:</p>
<pre><code>head eg1.sam</code></pre>
<p>You will see something like this:</p>
<pre><code>@HD VN:1.0 SO:unsorted
@SQ SN:22:20000000-20999999 LN:1000000
@PG ID:hisat PN:hisat VN:0.1.0
1 0 22:20000000-20999999 4115 255 100M * 0 0 GGAGCGCAGCGTGGGCGGCCCCGCAGCGCGGCCTCGGACCCCAGAAGGGCTTCCCCGGGTCCGTTGGCGCGCGGGGAGCGGCGTTCCCAGGGCGCGGCGC IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII AS:i:0 XN:i:0 XM:i:0 XO:i:0 XG:i:0 NM:i:0 MD:Z:100 YT:Z:UU
2 16 22:20000000-20999999 4197 255 100M * 0 0 GTTCCCAGGGCGCGGCGCGGTGCGGCGCGGCGCGGGTCGCAGTCCACGCGGCCGCAACTCGGACCGGTGCGGGGGCCGCCCCCTCCCTCCAGGCCCAGCG IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII AS:i:0 XN:i:0 XM:i:0 XO:i:0 XG:i:0 NM:i:0 MD:Z:100 YT:Z:UU
3 0 22:20000000-20999999 4113 255 100M * 0 0 CTGGAGCGCAGCGTGGGCGGCCCCGCAGCGCGGCCTCGGACCCCAGAAGGGCTTCCCCGGGTCCGTTGGCGCGCGGGGAGCGGCGTTCCCAGGGCGCGGC IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII AS:i:0 XN:i:0 XM:i:0 XO:i:0 XG:i:0 NM:i:0 MD:Z:100 YT:Z:UU
4 0 22:20000000-20999999 52358 255 100M * 0 0 TTCAGGGTCTGCCTTTATGCCAGTGAGGAGCAGCAGAGTCTGATACTAGGTCTAGGACCGGCCGAGGTATACCATGAACATGTGGATACACCTGAGCCCA IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII AS:i:0 XN:i:0 XM:i:0 XO:i:0 XG:i:0 NM:i:0 MD:Z:100 YT:Z:UU
5 16 22:20000000-20999999 52680 255 100M * 0 0 CTTCTGGCCAGTAGGTCTTTGTTCTGGTCCAACGACAGGAGTAGGCTTGTATTTAAAAGCGGCCCCTCCTCTCCTGTGGCCACAGAACACAGGCGTGCTT IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII AS:i:0 XN:i:0 XM:i:0 XO:i:0 XG:i:0 NM:i:0 MD:Z:100 YT:Z:UU
6 16 22:20000000-20999999 52664 255 100M * 0 0 TCTCACCTCTCATGTGCTTCTGGCCAGTAGGTCTTTGTTCTGGTCCAACGACAGGAGTAGGCTTGTATTTAAAAGCGGCCCCTCCTCTCCTGTGGCCACA IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII AS:i:0 XN:i:0 XM:i:0 XO:i:0 XG:i:0 NM:i:0 MD:Z:100 YT:Z:UU
7 0 22:20000000-20999999 52468 255 100M * 0 0 TGTACACAGGCACTCACATGGCACACACATACACTCCTGCGTGTGCACAAGCACACACATGCAAGCCATATACATGGACACCGACACAGGCACATGTACG IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII AS:i:0 XN:i:0 XM:i:0 XO:i:0 XG:i:0 NM:i:0 MD:Z:100 YT:Z:UU
8 0 22:20000000-20999999 4538 255 100M * 0 0 CGGCCCCGCACCTGCCCGAACCTCTGCGGCGGCGGTGGCAGGGTACGCGGGACCGCTCCCTCCCAGCCGACTTACGAGAACATCCCCCGACCATCCAGCC IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII AS:i:0 XN:i:0 XM:i:0 XO:i:0 XG:i:0 NM:i:0 MD:Z:100 YT:Z:UU
9 16 22:20000000-20999999 4667 255 50M19567N50M * 0 0 CTTCCCCGGACTCTGGCCGCGTAGCCTCCGCCACCACTCCCAGTTCACAGACCTCGCGACCTGTGTCAGCAGAGCCGCCCTGCACCACCATGTGCATCAT IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII AS:i:-1 XN:i:0 XM:i:0 XO:i:0 XG:i:0 NM:i:0 MD:Z:100 YT:Z:UU XS:A:+
10 0 22:20000000-20999999 30948 255 20M9021N80M * 0 0 CAACAACGAGATCCTCAGTGGGCTGGACATGGAGGAAGGCAAGGAAGGAGGCACATGGCTGGGCATCAGCACACGTGGCAAGCTGGCAGCACTCACCAAC IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII AS:i:-1 XN:i:0 XM:i:0 XO:i:0 XG:i:0 NM:i:0 MD:Z:100 YT:Z:UU XS:A:+
11 16 22:20000000-20999999 40044 255 65M8945N35M * 0 0 TGGCAAGCTGGCAGCACTCACCAACTACCTGCAGCCGCAGCTGGACTGGCAGGCCCGAGGGCGAGGCACCTACGGGCTGAGCAACGCGCTGCTGGAGACT IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII AS:i:-1 XN:i:0 XM:i:0 XO:i:0 XG:i:0 NM:i:0 MD:Z:100 YT:Z:UU XS:A:+</code></pre>
<p>The first few lines (beginning with <code>@</code>) are SAM header lines, and the rest of the lines are SAM alignments, one line per read or mate. See the <a href="#sam-output">HISAT manual section on SAM output</a> and the <a href="http://samtools.sourceforge.net/SAM1.pdf">SAM specification</a> for details about how to interpret the SAM file format.</p>
<h2 id="paired-end-example">Paired-end example</h2>
<p>To align paired-end reads included with HISAT, stay in the same directory and run:</p>
<pre><code>$HISAT_HOME/hisat -x 22_20-21M_hisat -1 $HISAT_HOME/example/reads/reads_1.fq -2 $HISAT_HOME/example/reads/reads_2.fq -S eg2.sam</code></pre>
<p>This aligns a set of paired-end reads to the reference genome, with results written to the file <code>eg2.sam</code>.</p>
<h2 id="using-samtoolsbcftools-downstream">Using SAMtools/BCFtools downstream</h2>
<p><a href="http://samtools.sourceforge.net">SAMtools</a> is a collection of tools for manipulating and analyzing SAM and BAM alignment files. <a href="http://samtools.sourceforge.net/mpileup.shtml">BCFtools</a> is a collection of tools for calling variants and manipulating VCF and BCF files, and it is typically distributed with <a href="http://samtools.sourceforge.net">SAMtools</a>. Using these tools together allows you to get from alignments in SAM format to variant calls in VCF format. This example assumes that <code>samtools</code> and <code>bcftools</code> are installed and that the directories containing these binaries are in your <a href="http://en.wikipedia.org/wiki/PATH_(variable)">PATH environment variable</a>.</p>
<p>Run the paired-end example:</p>
<pre><code>$HISAT_HOME/hisat -x $HISAT_HOME/example/index/22_20-21M_hisat -1 $HISAT_HOME/example/reads/reads_1.fq -2 $HISAT_HOME/example/reads/reads_2.fq -S eg2.sam</code></pre>
<p>Use <code>samtools view</code> to convert the SAM file into a BAM file. BAM is a the binary format corresponding to the SAM text format. Run:</p>
<pre><code>samtools view -bS eg2.sam > eg2.bam</code></pre>
<p>Use <code>samtools sort</code> to convert the BAM file to a sorted BAM file.</p>
<pre><code>samtools sort eg2.bam eg2.sorted</code></pre>
<p>We now have a sorted BAM file called <code>eg2.sorted.bam</code>. Sorted BAM is a useful format because the alignments are (a) compressed, which is convenient for long-term storage, and (b) sorted, which is conveneint for variant discovery. To generate variant calls in VCF format, run:</p>
<pre><code>samtools mpileup -uf $HISAT_HOME/example/reference/22_20-21M.fa eg2.sorted.bam | bcftools view -bvcg - > eg2.raw.bcf</code></pre>
<p>Then to view the variants, run:</p>
<pre><code>bcftools view eg2.raw.bcf</code></pre>
<p>See the official SAMtools guide to <a href="http://samtools.sourceforge.net/mpileup.shtml">Calling SNPs/INDELs with SAMtools/BCFtools</a> for more details and variations on this process.</p>
|