CINXE.COM
Bowtie: Manual
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Bowtie: Manual</title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-7" /> <link rel="stylesheet" type="text/css" href="css/style.css" media="screen" /> <meta name="verify-v1" content="YJT1CfXN3kzE9cr+jvNB+Q73lTfHrv8eivoY+xjblc0=" /> </head> <body> <div id="wrap"> <div id="top"> <div class="lefts"> <table width="100%" cellpadding="2"> <tr> <td align="left" valign="middle" width="145"> <a href="./index.shtml"><img style="padding-left: 7pt; padding-top: 6pt" height="65" src="images/bowtie_logo.png"/></a> </td> <td align="left" valign="top"> <a href="./index.shtml"><h1>Bowtie</h1></a> <h2>An ultrafast memory-efficient short read aligner</h2> </td> <td align="right" valign="middle"> <a href="http://www.jhu.edu/"><img style="padding-top: 7pt; padding-right: 7pt" border=0 height="55" src="images/university.small.horizontal.white.png"></a> </td> </tr> </table> </div> </div> <div id="main"> <div id="rightside" style="padding-left: 20px"> <h2>Site Map</h2> <div class="box"> <ul> <li><a href="index.shtml">Home</a></li> <li><a href="news.shtml">News archive</a></li> <li><a href="tutorial.shtml">Getting started</a></li> <li><a href="manual.shtml">Manual</a></li> <li><a href="other_tools.shtml">Tools that use Bowtie</a></li> </ul> </div> <h2><u>Latest Release</u></h2> <div class="box"> <ul> <table width="100%"> <tr> <td colspan="2"><a href="http://bioconda.github.io/recipes/bowtie/README.html"><img src="https://img.shields.io/badge/install%20with-bioconda-brightgreen.svg?style=flat-square"/></a></td> </tr> <tr> <td> <a href="https://sourceforge.net/projects/bowtie-bio/files/bowtie/1.3.1">Bowtie 1.3.1</a> </td> <td align="right"> 09/13/21 </td> </tr> <tr> <td colspan=2> <li style="font-size: x-small; line-height: 130%">Please cite: Langmead B, Trapnell C, Pop M, Salzberg SL. <a href="http://genomebiology.com/2009/10/3/R25">Ultrafast and memory-efficient alignment of short DNA sequences to the human genome</a>. <i><a href="http://genomebiology.com">Genome Biol</a></i> 10:R25. </td> </tr> <tr> <td colspan=2> <li style="font-size: x-small; line-height: 130%">For release updates, subscribe to the <a href="https://lists.sourceforge.net/lists/listinfo/bowtie-bio-announce">mailing list</a>. </td> </tr> </table> </ul> </div> <h2>Links</h2> <div class="box"> <ul> <li><a href="https://github.com/BenLangmead/bowtie">Bowtie GitHub repository</a></li> <li><a href="https://github.com/BenLangmead/bowtie/issues">Report an issue</a></li> <!-- <li><a href="https://lists.sourceforge.net/lists/listinfo/bowtie-bio-announce">Bowtie Mailing list</a></li>--> </ul> </div> <h2>Related Tools</h2> <div class="box"> <ul> <table width="100%"> <tr> <td> <a href="./bowtie2/index.shtml">Bowtie 2</a>: Fast, accurate read alignment </td> </tr> <tr> <td> <a href="./crossbow/index.shtml">Crossbow</a>: Genotyping, cloud computing </td> </tr> <tr> <td> <a href="http://tophat.cbcb.umd.edu">Tophat</a>: RNA-Seq splice junction mapper </td> </tr> <tr> <td> <a href="http://cufflinks.cbcb.umd.edu">Cufflinks</a>: Isoform assembly, quantitation </td> </tr> <tr> <td> <a href="myrna">Myrna</a>: Cloud, differential gene expression </td> </tr> <tr> <td> <a href="https://github.com/mourisl/Lighter">Lighter</a>: Fast error correction </td> </tr> <tr> <td> <a href="other_tools.shtml">Other tools using Bowtie</a> </td> </tr> </table> </ul> </div> <a href="ftp://ftp.ccb.jhu.edu/pub/data/bowtie_indexes/"><h2><u>Pre-built indexes</u></h2></a> <div class="box"> <table width="100%"> <p style="font-size: small; line-height: 130%"> Consider using Illumina's <a href="http://support.illumina.com/sequencing/sequencing_software/igenome.ilmn">iGenomes</a> collection. Each iGenomes archive contains pre-built Bowtie and <a href="bowtie2">Bowtie 2</a> indexes. <br/><br/> </p> <!-- H. sapiens, NCBI GRCh38 no_alt --> <tr><td> <a href="ftp://ftp.ccb.jhu.edu/pub/data/bowtie_indexes/GRCh38_no_alt.zip"><i>H. sapiens</i>, NCBI GRCh38</a> </td><td align="right"> <b>2.7 GB</b> </td></tr> <!-- GRCh38 major-allele --> <tr><td> <a href="ftp://ftp.ccb.jhu.edu/pub/data/bowtie_indexes/grch38_1kgmaj_bt.zip"><i>H. sapiens</i>, NCBI GRCh38 <br/> with 1KGenomes major SNPs</a> </td><td align="right"> <b>2.7 GB</b> </td></tr> <tr><td colspan="2" style="font-size: x-small"> <a href="https://github.com/BenLangmead/bowtie-majref">How we built this</a>, <a href="ftp://ftp.ccb.jhu.edu/pub/data/bowtie_indexes/grch38_1kgmaj.fa.gz">FASTA</a> </td></tr> <!-- hg19 --> <tr><td> <a href="ftp://ftp.ccb.jhu.edu/pub/data/bowtie_indexes/hg19.ebwt.zip"><i>H. sapiens</i>, UCSC hg19</a> </td><td align="right"> <b>2.7 GB</b> </td></tr> <tr><td colspan=2><table width="100%"> <!-- <tr> <td> or: <a href="ftp://ftp.ccb.jhu.edu/pub/data/bowtie_indexes/hg19.ebwt.1.zip">part 1</a> - 1.7 GB, <a href="ftp://ftp.ccb.jhu.edu/pub/data/bowtie_indexes/hg19.ebwt.2.zip">part 2</a> - 1.0 GB</td> </tr> --> <tr> <td> colorspace: <a href="ftp://ftp.ccb.jhu.edu/pub/data/bowtie_indexes/hg19_c.ebwt.zip">full</a> <!-- , or <a href="ftp://ftp.ccb.jhu.edu/pub/data/bowtie_indexes/hg19_c.ebwt.1.zip">part 1</a>, <a href="ftp://ftp.ccb.jhu.edu/pub/data/bowtie_indexes/hg19_c.ebwt.2.zip">part 2</a></td> --> </tr></table> </td></tr> <!-- hg19 major-allele --> <tr><td> <a href="ftp://ftp.ccb.jhu.edu/pub/data/bowtie_indexes/hg19_1kgmaj_bt.zip"><i>H. sapiens</i>, UCSC hg19 <br/> with 1KGenomes major SNPs</a> </td><td align="right"> <b>2.7 GB</b> </td></tr> <tr><td colspan="2" style="font-size: x-small"> <a href="https://github.com/BenLangmead/bowtie-majref">How we built this</a>, <a href="ftp://ftp.ccb.jhu.edu/pub/data/bowtie_indexes/hg19_1kgmaj.fa.gz">FASTA</a> </td></tr> <!-- hg18 --> <tr><td> <a href="ftp://ftp.ccb.jhu.edu/pub/data/bowtie_indexes/hg18.ebwt.zip"><i>H. sapiens</i>, UCSC hg18</a> </td><td align="right"> <b>2.7 GB</b> </td></tr> <tr><td colspan=2><table width="100%"> <!-- <tr> <td> or: <a href="ftp://ftp.ccb.jhu.edu/pub/data/bowtie_indexes/hg18.ebwt.1.zip">part 1</a> - 1.7 GB, <a href="ftp://ftp.ccb.jhu.edu/pub/data/bowtie_indexes/hg18.ebwt.2.zip">part 2</a> - 1.0 GB</td> </tr> --> <tr> <td> colorspace: <a href="ftp://ftp.ccb.jhu.edu/pub/data/bowtie_indexes/hg18_c.ebwt.zip">full</a> <!-- , or <a href="ftp://ftp.ccb.jhu.edu/pub/data/bowtie_indexes/hg18_c.ebwt.1.zip">part 1</a>, <a href="ftp://ftp.ccb.jhu.edu/pub/data/bowtie_indexes/hg18_c.ebwt.2.zip">part 2</a></td> --> </tr></table> </td></tr> <!-- H. sapiens, NCBI 37.1 --> <tr><td> <a href="ftp://ftp.ccb.jhu.edu/pub/data/bowtie_indexes/h_sapiens_37_asm.ebwt.zip"><i>H. sapiens</i>, NCBI v37</a> </td><td align="right"> <b>2.7 GB</b> </td></tr> <tr><td colspan=2><table width="100%"> <!-- <tr> <td> or: <a href="ftp://ftp.ccb.jhu.edu/pub/data/bowtie_indexes/h_sapiens_37_asm.ebwt.1.zip">part 1</a> - 1.7 GB, <a href="ftp://ftp.ccb.jhu.edu/pub/data/bowtie_indexes/h_sapiens_37_asm.ebwt.2.zip">part 2</a> - 1.0 GB</td> </tr> --> <tr> <td> colorspace: <a href="ftp://ftp.ccb.jhu.edu/pub/data/bowtie_indexes/h_sapiens_37_asm_c.ebwt.zip">full</a> <!-- , or <a href="ftp://ftp.ccb.jhu.edu/pub/data/bowtie_indexes/h_sapiens_37_asm_c.ebwt.1.zip">part 1</a>, <a href="ftp://ftp.ccb.jhu.edu/pub/data/bowtie_indexes/h_sapiens_37_asm_c.ebwt.2.zip">part 2</a></td> --> </tr></table> </td></tr> <!-- H. sapiens, NCBI 36.3 --> <tr><td> <a href="ftp://ftp.ccb.jhu.edu/pub/data/bowtie_indexes/h_sapiens_asm.ebwt.zip"><i>H. sapiens</i>, NCBI v36</a> </td><td align="right"> <b>2.7 GB</b> </td></tr> <tr><td colspan=2><table width="100%"> <!-- <tr> <td> or: <a href="ftp://ftp.ccb.jhu.edu/pub/data/bowtie_indexes/h_sapiens_asm.ebwt.1.zip">part 1</a> - 1.7 GB, <a href="ftp://ftp.ccb.jhu.edu/pub/data/bowtie_indexes/h_sapiens_asm.ebwt.2.zip">part 2</a> - 1.0 GB</td> </tr> --> <tr> <td> colorspace: <a href="ftp://ftp.ccb.jhu.edu/pub/data/bowtie_indexes/h_sapiens_asm_c.ebwt.zip">full</a> <!-- , or <a href="ftp://ftp.ccb.jhu.edu/pub/data/bowtie_indexes/h_sapiens_asm_c.ebwt.1.zip">part 1</a>, <a href="ftp://ftp.ccb.jhu.edu/pub/data/bowtie_indexes/h_sapiens_asm_c.ebwt.2.zip">part 2</a></td> --> </tr></table> </td></tr> <!-- mm8 --> <tr><td> <a href="ftp://ftp.ccb.jhu.edu/pub/data/bowtie_indexes/mm8.ebwt.zip"><i>M. musculus</i>, UCSC mm8</a> </td><td align="right"> <b>2.4 GB</b> </td></tr> <tr><td colspan=2><table width="100%"> <!-- <tr> <td> or: <a href="ftp://ftp.ccb.jhu.edu/pub/data/bowtie_indexes/mm8.ebwt.1.zip">part 1</a> - 1.5 GB, <a href="ftp://ftp.ccb.jhu.edu/pub/data/bowtie_indexes/mm8.ebwt.2.zip">part 2</a> - 900 MB</td> </tr> --> <tr> <td> colorspace: <a href="ftp://ftp.ccb.jhu.edu/pub/data/bowtie_indexes/mm8_c.ebwt.zip">full</a> <!-- , or <a href="ftp://ftp.ccb.jhu.edu/pub/data/bowtie_indexes/mm8_c.ebwt.1.zip">part 1</a>, <a href="ftp://ftp.ccb.jhu.edu/pub/data/bowtie_indexes/mm8_c.ebwt.2.zip">part 2</a></td> --> </tr></table> </td></tr> <!-- mm9 --> <tr><td> <a href="ftp://ftp.ccb.jhu.edu/pub/data/bowtie_indexes/mm9.ebwt.zip"><i>M. musculus</i>, UCSC mm9</a> </td><td align="right"> <b>2.4 GB</b> </td></tr> <tr><td colspan=2><table width="100%"> <!-- <tr> <td> or: <a href="ftp://ftp.ccb.jhu.edu/pub/data/bowtie_indexes/mm9.ebwt.1.zip">part 1</a> - 1.5 GB, <a href="ftp://ftp.ccb.jhu.edu/pub/data/bowtie_indexes/mm9.ebwt.2.zip">part 2</a> - 900 MB</td> </tr> --> <tr> <td> colorspace: <a href="ftp://ftp.ccb.jhu.edu/pub/data/bowtie_indexes/mm9_c.ebwt.zip">full</a> <!-- , or <a href="ftp://ftp.ccb.jhu.edu/pub/data/bowtie_indexes/mm9_c.ebwt.1.zip">part 1</a>, <a href="ftp://ftp.ccb.jhu.edu/pub/data/bowtie_indexes/mm9_c.ebwt.2.zip">part 2</a></td> --> </tr></table> </td></tr> <!-- M. musculus, NCBI 37.1 --> <tr><td> <a href="ftp://ftp.ccb.jhu.edu/pub/data/bowtie_indexes/m_musculus_ncbi37.ebwt.zip"><i>M. musculus</i>, NCBI v37</a> </td><td align="right"> <b>2.4 GB</b> </td></tr> <tr><td colspan=2><table width="100%"> <!-- <tr> <td> or: <a href="ftp://ftp.ccb.jhu.edu/pub/data/bowtie_indexes/m_musculus_ncbi37.ebwt.1.zip">part 1</a> - 1.5 GB, <a href="ftp://ftp.ccb.jhu.edu/pub/data/bowtie_indexes/m_musculus_ncbi37.ebwt.2.zip">part 2</a> - 900 MB</td> </tr> --> <tr> <td> colorspace: <a href="ftp://ftp.ccb.jhu.edu/pub/data/bowtie_indexes/m_musculus_ncbi37_c.ebwt.zip">full</a> <!-- , or <a href="ftp://ftp.ccb.jhu.edu/pub/data/bowtie_indexes/m_musculus_ncbi37_c.ebwt.1.zip">part 1</a>, <a href="ftp://ftp.ccb.jhu.edu/pub/data/bowtie_indexes/m_musculus_ncbi37_c.ebwt.2.zip">part 2</a></td> --> </tr></table> </td></tr> <!-- rn4 --> <tr><td> <a href="ftp://ftp.ccb.jhu.edu/pub/data/bowtie_indexes/rn4.ebwt.zip"><i>R. norvegicus</i>, UCSC rn4</a> </td><td align="right"> <b>2.4 GB</b> </td></tr> <tr><td colspan=2><table width="100%"> <!-- <tr> <td> or: <a href="ftp://ftp.ccb.jhu.edu/pub/data/bowtie_indexes/rn4.ebwt.1.zip">part 1</a> - 1.5 GB, <a href="ftp://ftp.ccb.jhu.edu/pub/data/bowtie_indexes/rn4.ebwt.2.zip">part 2</a> - 900 MB</td> </tr> --> <tr> <td> colorspace: <a href="ftp://ftp.ccb.jhu.edu/pub/data/bowtie_indexes/rn4_c.ebwt.zip">full</a> <!-- , or <a href="ftp://ftp.ccb.jhu.edu/pub/data/bowtie_indexes/rn4_c.ebwt.1.zip">part 1</a>, <a href="ftp://ftp.ccb.jhu.edu/pub/data/bowtie_indexes/rn4_c.ebwt.2.zip">part 2</a></td> --> </tr></table> </td></tr> <!-- B. taurus --> <tr><td> <a href="ftp://ftp.ccb.jhu.edu/pub/data/bowtie_indexes/b_taurus.ebwt.zip"><i>B. taurus</i>, UMD v3.0</a> </td><td align="right"> <b>2.4 GB</b> </td></tr> <tr><td colspan=2><table width="100%"> <!-- <tr> <td> or: <a href="ftp://ftp.ccb.jhu.edu/pub/data/bowtie_indexes/b_taurus.ebwt.1.zip">part 1</a> - 1.5 GB, <a href="ftp://ftp.ccb.jhu.edu/pub/data/bowtie_indexes/b_taurus.ebwt.2.zip">part 2</a> - 900 MB</td> </tr> --> <tr> <td> colorspace: <a href="ftp://ftp.ccb.jhu.edu/pub/data/bowtie_indexes/b_taurus_c.ebwt.zip">full</a> <!-- , or <a href="ftp://ftp.ccb.jhu.edu/pub/data/bowtie_indexes/b_taurus_c.ebwt.1.zip">part 1</a>, <a href="ftp://ftp.ccb.jhu.edu/pub/data/bowtie_indexes/b_taurus_c.ebwt.2.zip">part 2</a></td> --> </tr></table> </td></tr> <!-- canFam2 --> <tr><td> <a href="ftp://ftp.ccb.jhu.edu/pub/data/bowtie_indexes/canFam2.ebwt.zip"><i>C. familiaris</i>, UCSC canFam2</a> </td><td align="right"> <b>2.4 GB</b> </td></tr> <tr><td colspan=2><table width="100%"> <!-- <tr> <td> or: <a href="ftp://ftp.ccb.jhu.edu/pub/data/bowtie_indexes/canFam2.ebwt.1.zip">part 1</a> - 1.5 GB, <a href="ftp://ftp.ccb.jhu.edu/pub/data/bowtie_indexes/canFam2.ebwt.2.zip">part 2</a> - 900 MB</td> </tr> --> <tr> <td> colorspace: <a href="ftp://ftp.ccb.jhu.edu/pub/data/bowtie_indexes/canFam2_c.ebwt.zip">full</a> <!-- , or <a href="ftp://ftp.ccb.jhu.edu/pub/data/bowtie_indexes/canFam2_c.ebwt.1.zip">part 1</a>, <a href="ftp://ftp.ccb.jhu.edu/pub/data/bowtie_indexes/canFam2_c.ebwt.2.zip">part 2</a></td> --> </tr></table> </td></tr> <!-- G. gallus --> <tr><td> <a href="ftp://ftp.ccb.jhu.edu/pub/data/bowtie_indexes/galGal3.ebwt.zip"><i>G. gallus</i>, UCSC, galGal3</a> </td><td align="right"> <b>1.1 GB</b> </td></tr> <tr><td colspan=2><table width="100%"><tr> <td> colorspace: <a href="ftp://ftp.ccb.jhu.edu/pub/data/bowtie_indexes/galGal3_c.ebwt.zip">full</a> </tr></table> </td></tr> <!-- D. melanogaster --> <tr><td> <a href="ftp://ftp.ccb.jhu.edu/pub/data/bowtie_indexes/d_melanogaster_fb5_22.ebwt.zip"><i>D. melanogaster</i>, Flybase, r5.22</a> </td><td align="right"> <b>150 MB</b> </td></tr> <tr><td colspan=2><table width="100%"><tr> <td> colorspace: <a href="ftp://ftp.ccb.jhu.edu/pub/data/bowtie_indexes/d_melanogaster_fb5_22_c.ebwt.zip">full</a> </tr></table> </td></tr> <!-- A. thaliana --> <tr><td> <a href="ftp://ftp.ccb.jhu.edu/pub/data/bowtie_indexes/a_thaliana.ebwt.zip"><i>A. thaliana</i>, TAIR, TAIR9</a> </td><td align="right"> <b>120 MB</b> </td></tr> <tr><td colspan=2><table width="100%"><tr> <td> colorspace: <a href="ftp://ftp.ccb.jhu.edu/pub/data/bowtie_indexes/a_thaliana_c.ebwt.zip">full</a> </tr></table> </td></tr> <!-- C. elegans --> <tr><td> <a href="ftp://ftp.ccb.jhu.edu/pub/data/bowtie_indexes/c_elegans_ws200.ebwt.zip"><i>C. elegans</i>, Wormbase, WS200</a> </td><td align="right"> <b>75 MB</b> </td></tr> <tr><td colspan=2><table width="100%"><tr> <td> colorspace: <a href="ftp://ftp.ccb.jhu.edu/pub/data/bowtie_indexes/c_elegans_ws200_c.ebwt.zip">full</a> </tr></table> </td></tr> <!-- S. cerevisiae --> <tr><td> <a href="ftp://ftp.ccb.jhu.edu/pub/data/bowtie_indexes/s_cerevisiae.ebwt.zip"><i>S. cerevisiae</i>, CYGD</a> </td><td align="right"> <b>15 MB</b> </td></tr> <tr><td colspan=2><table width="100%"><tr> <td> colorspace: <a href="ftp://ftp.ccb.jhu.edu/pub/data/bowtie_indexes/s_cerevisiae_c.ebwt.zip">full</a> </tr></table> </td></tr> <!-- E. coli --> <tr><td> <a href="ftp://ftp.ccb.jhu.edu/pub/data/bowtie_indexes/e_coli.ebwt.zip"><i>E. coli</i>, NCBI, st. 536</a> </td><td align="right"> <b>5 MB</b> </td></tr> <tr><td colspan=2><table width="100%"><tr> <td> colorspace: <a href="ftp://ftp.ccb.jhu.edu/pub/data/bowtie_indexes/e_coli_c.ebwt.zip">full</a> </tr></table> </td></tr> </table> <p style="font-size: x-small; line-height: 130%"> All indexes are for assemblies, not contigs. Unplaced or unlocalized sequences and alternate haplotype assemblies are excluded.</p> <p style="font-size: x-small; line-height: 130%"> Some unzip programs cannot handle archives >2 GB. If you have problems downloading or unzipping a >2 GB index, try downloading in two parts.</p> <p style="font-size: x-small; line-height: 130%">Check .zip file integrity with <a href="ftp://ftp.ccb.jhu.edu/pub/data/bowtie_indexes/md5sum.txt">MD5s</a>.</p> </div> <h2>Publications</h2> <div class="box"> <ul> <li style="font-size: x-small; line-height: 130%">Langmead B, Trapnell C, Pop M, Salzberg SL. <a href="http://genomebiology.com/2009/10/3/R25"><b>Ultrafast and memory-efficient alignment of short DNA sequences to the human genome</b></a>. <i><a href="http://genomebiology.com">Genome Biology</a></i> <b>10</b>:R25. <br/><br/> <li style="font-size: x-small; line-height: 130%">Langmead B, Schatz M, Lin J, Pop M, Salzberg SL. <a href="http://genomebiology.com/2009/10/11/R134"><b>Searching for SNPs with cloud computing</b></a>. <i><a href="http://genomebiology.com">Genome Biology</a></i> <b>10</b>:R134. <br/><br/> <li style="font-size: x-small; line-height: 130%">Trapnell C, Pachter L, Salzberg SL, <a href="http://bioinformatics.oxfordjournals.org/cgi/content/abstract/btp120"><b>TopHat: discovering splice junctions with RNA-Seq</b></a>. <i><a href="http://bioinformatics.oxfordjournals.org/">Bioinformatics</a></i> 2009 25(9):1105-1111.</li> </ul> </div> <!-- <h2>Other Documentation</h2> <div class="box"> <ul> <li>AGBT poster, 2/09 (<a href="http://www.cbcb.umd.edu/~langmead/AGBT_Feb2009.ppt">.ppt</a>, <a href="http://www.cbcb.umd.edu/~langmead/AGBT_Feb2009.pdf">.pdf</a>)</li> <li>NCBI Presentation, 11/08 (<a href="http://www.cbcb.umd.edu/~langmead/NCBI_Nov2008.ppt">.ppt</a>, <a href="http://www.cbcb.umd.edu/~langmead/NCBI_Nov2008.pdf">.pdf</a>)</li> <li>UMD Biosciences poster, 11/08 (<a href="http://www.cbcb.umd.edu/~langmead/UMD_Bioscience_Nov2008.ppt">.ppt</a>, <a href="http://www.cbcb.umd.edu/~langmead/UMD_Bioscience_Nov2008.pdf">.pdf</a>)</li> </ul> </div> --> <h2>Contributors</h2> <div class="box"> <ul> <li><a href="http://www.cs.jhu.edu/~langmea/index.shtml">Ben Langmead</a></li> <li><a href="http://www.broadinstitute.org/~cole/">Cole Trapnell</a></li> <li><a href="http://www.ccb.jhu.edu/people/infphilo">Daehwan Kim</a></li> <li>Rone Charles</li> <li>Chris Wilks</li> <li>Valentin Antonescu</li> </ul> </div> <h2>Related links</h2> <div class="box"> <ul> <li><a href="http://scholar.google.com/scholar?cites=9743535340779752835&as_sdt=20000005&sciodt=0,21&hl=en">Papers citing Bowtie</a></li> <li><a href="http://www.jhu.edu/">Johns Hopkins University</a></li> <li><a href="http://www.cs.jhu.edu/">JHU Computer Science</a></li> </ul> </div> </div> <!-- End of "rightside" --> <div id="manual"> <h1>Table of Contents</h1> <p>Bowtie 1.3.1</p> <nav id="TOC" role="doc-toc"> <ul> <li><a href="#what-is-bowtie">What is Bowtie?</a></li> <li><a href="#what-isnt-bowtie">What isn’t Bowtie?</a></li> <li><a href="#obtaining-bowtie">Obtaining Bowtie</a> <ul> <li><a href="#building-from-source">Building from source</a></li> </ul></li> <li><a href="#the-bowtie-aligner">The <code>bowtie</code> aligner</a> <ul> <li><a href="#the--n-alignment-mode">The <code>-n</code> alignment mode</a></li> <li><a href="#the--v-alignment-mode">The <code>-v</code> alignment mode</a></li> <li><a href="#strata">Strata</a></li> <li><a href="#reporting-modes">Reporting Modes</a> <ul> <li><a href="#example-1--a">Example 1: <code>-a</code></a></li> <li><a href="#example-2--k-3">Example 2: <code>-k 3</code></a></li> <li><a href="#example-3--k-6">Example 3: <code>-k 6</code></a></li> <li><a href="#example-4-default--k-1">Example 4: default (<code>-k 1</code>)</a></li> <li><a href="#example-5--a---best">Example 5: <code>-a --best</code></a></li> <li><a href="#example-6--a---best---strata">Example 6: <code>-a --best --strata</code></a></li> <li><a href="#example-7--a--m-3">Example 7: <code>-a -m 3</code></a></li> <li><a href="#example-8--a--m-5">Example 8: <code>-a -m 5</code></a></li> <li><a href="#example-9--a--m-3---best---strata">Example 9: <code>-a -m 3 --best --strata</code></a></li> </ul></li> <li><a href="#paired-end-alignment">Paired-end Alignment</a></li> <li><a href="#wrapper-scripts">Wrapper scripts</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="#main-arguments">Main arguments</a></li> <li><a href="#options">Options</a></li> </ul></li> <li><a href="#default-bowtie-output">Default <code>bowtie</code> output</a></li> <li><a href="#sam-bowtie-output">SAM <code>bowtie</code> output</a></li> </ul></li> <li><a href="#the-bowtie-build-indexer">The <code>bowtie-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-bowtie-inspect-index-inspector">The <code>bowtie-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> </ul> </nav> <!-- ! This manual is written in "markdown" format and thus contains some ! distracting clutter encoding information about how to convert to ! HTML. See 'MANUAL' for a clearer version of this document. --> <h1 id="what-is-bowtie">What is Bowtie?</h1> <p><a href="http://bowtie-bio.sf.net">Bowtie</a> is an ultrafast, memory-efficient short read aligner geared toward quickly aligning large sets of short DNA sequences (reads) to large genomes. It aligns 35-base-pair reads to the human genome at a rate of 25 million reads per hour on a typical workstation. Bowtie indexes the genome with a <a href="http://en.wikipedia.org/wiki/Burrows-Wheeler_transform">Burrows-Wheeler</a> index to keep its memory footprint small: for the human genome, the index is typically about 2.2 GB (for unpaired alignment) or 2.9 GB (for paired-end alignment). Multiple processors can be used simultaneously to achieve greater alignment speed. Bowtie can also output alignments in the standard <a href="http://samtools.sourceforge.net/SAM1.pdf">SAM</a> format, allowing Bowtie to interoperate with other tools supporting SAM, including the <a href="http://samtools.sourceforge.net/">SAMtools</a> consensus, SNP, and indel callers. Bowtie runs on the command line under Windows, Mac OS X, Linux, and Solaris.</p> <p><a href="http://bowtie-bio.sf.net">Bowtie</a> also forms the basis for other tools, including <a href="http://tophat.cbcb.umd.edu/">TopHat</a>: a fast splice junction mapper for RNA-seq reads, <a href="http://cufflinks.cbcb.umd.edu/">Cufflinks</a>: a tool for transcriptome assembly and isoform quantitiation from RNA-seq reads, <a href="http://bowtie-bio.sf.net/crossbow">Crossbow</a>: a cloud-computing software tool for large-scale resequencing data,and <a href="http://bowtie-bio.sf.net/myrna">Myrna</a>: a cloud computing tool for calculating differential gene expression in large RNA-seq datasets.</p> <p>If you use <a href="http://bowtie-bio.sf.net">Bowtie</a> for your published research, please cite the <a href="http://genomebiology.com/2009/10/3/R25">Bowtie paper</a>.</p> <h1 id="what-isnt-bowtie">What isn’t Bowtie?</h1> <p>Bowtie is not a general-purpose alignment tool like <a href="http://mummer.sourceforge.net/">MUMmer</a>, <a href="http://blast.ncbi.nlm.nih.gov/Blast.cgi">BLAST</a> or <a href="http://www.vmatch.de/">Vmatch</a>. Bowtie works best when aligning short reads to large genomes, though it supports arbitrarily small reference sequences (e.g. amplicons) and reads as long as 1024 bases. Bowtie is designed to be extremely fast for sets of short reads where (a) many of the reads have at least one good, valid alignment, (b) many of the reads are relatively high-quality, and (c) the number of alignments reported per read is small (close to 1).</p> <p>Bowtie does not yet report gapped alignments; this is future work.</p> <h1 id="obtaining-bowtie">Obtaining Bowtie</h1> <p>You may download either Bowtie sources or binaries for your platform from the <a href="https://sourceforge.net/projects/bowtie-bio/files/bowtie/">Download</a> section of the Sourceforge project site. Binaries are currently available for 64-bit Intel architectures running Linux, Windows, and Mac OS X.</p> <h2 id="building-from-source">Building from source</h2> <p>Building Bowtie from source requires a GNU-like environment that includes GCC, GNU Make and other basics. It should be possible to build Bowtie on a vanilla Linux or Mac installation. Bowtie can also be built on Windows using <a href="http://www.mingw.org/">MinGW</a>. We recommend <a href="http://www.tdragon.net/recentgcc/">TDM’s MinGW Build</a>. You also must also have <a href="http://www.mingw.org/wiki/msys">MSYS</a> installed.</p> <p>To build Bowtie, extract the sources, change to the extracted directory, and run GNU <code>make</code> (usually with the command <code>make</code>, but sometimes with <code>gmake</code>) with no arguments. If building with <a href="http://www.mingw.org/">MinGW</a>, run <code>make</code> from the <a href="http://www.mingw.org/wiki/msys">MSYS</a> command line.</p> <h1 id="the-bowtie-aligner">The <code>bowtie</code> aligner</h1> <p><code>bowtie</code> takes an index and a set of reads as input and outputs a list of alignments. Alignments are selected according to a combination of the <a href="#bowtie-options-v"><code>-v</code></a>/<a href="#bowtie-options-n"><code>-n</code></a>/<a href="#bowtie-options-e"><code>-e</code></a>/<a href="#bowtie-options-l"><code>-l</code></a> options (plus the <a href="#bowtie-options-I"><code>-I</code></a>/<a href="#bowtie-options-X"><code>-X</code></a>/<a href="#bowtie-options-fr"><code>--fr</code></a>/<a href="#bowtie-options-fr"><code>--rf</code></a>/ <a href="#bowtie-options-fr"><code>--ff</code></a> options for paired-end alignment), which define which alignments are legal, and the <a href="#bowtie-options-k"><code>-k</code></a>/<a href="#bowtie-options-a"><code>-a</code></a>/<a href="#bowtie-options-m"><code>-m</code></a>/<a href="#bowtie-options-m"><code>-M</code></a>/<a href="#bowtie-options-best"><code>--best</code></a>/<a href="#bowtie-options-strata"><code>--strata</code></a> options which define which and how many legal alignments should be reported.</p> <p>By default, Bowtie enforces an alignment policy similar to <a href="http://maq.sf.net">Maq</a>’s default quality-aware policy (<a href="#bowtie-options-n"><code>-n</code></a> 2 <a href="#bowtie-options-l"><code>-l</code></a> 28 <a href="#bowtie-options-e"><code>-e</code></a> 70). See <a href="#the--n-alignment-mode">the -n alignment mode</a> section of the manual for details about this mode. But Bowtie can also enforce a simpler end-to-end k-difference policy (e.g. with <a href="#bowtie-options-v"><code>-v</code></a> 2). See <a href="#the--v-alignment-mode">the -v alignment mode</a> section of the manual for details about that mode. <a href="#the--n-alignment-mode">The -n alignment mode</a> and <a href="#the--v-alignment-mode">the -v alignment mode</a> are mutually exclusive.</p> <p>Bowtie works best when aligning short reads to large genomes (e.g. human or mouse), though it supports arbitrarily small reference sequences and reads as long as 1024 bases. Bowtie is designed to be very fast for sets of short reads where a) many reads have at least one good, valid alignment, b) many reads are relatively high-quality, c) the number of alignments reported per read is small (close to 1). These criteria are generally satisfied in the context of modern short-read analyses such as RNA-seq, ChIP-seq, other types of -seq, and mammalian resequencing. You may observe longer running times in other research contexts.</p> <p>If <code>bowtie</code> is too slow for your application, try some of the performance-tuning hints described in the <a href="#performance-tuning">Performance Tuning</a> section below.</p> <p>Alignments involving one or more ambiguous reference characters (<code>N</code>, <code>-</code>, <code>R</code>, <code>Y</code>, etc.) are considered invalid by Bowtie. This is true only for ambiguous characters in the reference; alignments involving ambiguous characters in the read are legal, subject to the alignment policy. Ambiguous characters in the read mismatch all other characters. Alignments that “fall off” the reference sequence are not considered valid.</p> <p>The process by which <code>bowtie</code> chooses an alignment to report is randomized in order to avoid “mapping bias” - the phenomenon whereby an aligner systematically fails to report a particular class of good alignments, causing spurious “holes” in the comparative assembly. Whenever <code>bowtie</code> reports a subset of the valid alignments that exist, it makes an effort to sample them randomly. This randomness flows from a simple seeded pseudo-random number generator and is deterministic in the sense that Bowtie will always produce the same results for the same read when run with the same initial “seed” value (see <a href="#bowtie-options-seed"><code>--seed</code></a> option).</p> <p>In the default mode, <code>bowtie</code> can exhibit strand bias. Strand bias occurs when input reference and reads are such that (a) some reads align equally well to sites on the forward and reverse strands of the reference, and (b) the number of such sites on one strand is different from the number on the other strand. When this happens for a given read, <code>bowtie</code> effectively chooses one strand or the other with 50% probability, then reports a randomly-selected alignment for that read from among the sites on the selected strand. This tends to over assign alignments to the sites on the strand with fewer sites and under assign to sites on the strand with more sites. The effect is mitigated, though it may not be eliminated, when reads are longer or when paired-end reads are used. Running Bowtie in <a href="#bowtie-options-best"><code>--best</code></a> mode eliminates strand bias by forcing Bowtie to select one strand or the other with a probability that is proportional to the number of best sites on the strand.</p> <p>Gapped alignments are not currently supported in Bowtie, but they are supported in <a href="http://bowtie-bio.sourceforge.net/bowtie2">Bowtie 2</a>.</p> <h2 id="the--n-alignment-mode">The <code>-n</code> alignment mode</h2> <p>When the <a href="#bowtie-options-n"><code>-n</code></a> option is specified (which is the default), <code>bowtie</code> determines which alignments are valid according to the following policy, which is similar to <a href="http://maq.sf.net">Maq</a>’s default policy.</p> <ol type="1"> <li><p>Alignments may have no more than <code>N</code> mismatches (where <code>N</code> is a number 0-3, set with <a href="#bowtie-options-n"><code>-n</code></a>) in the first <code>L</code> bases (where <code>L</code> is a number 5 or greater, set with <a href="#bowtie-options-l"><code>-l</code></a>) on the high-quality (left) end of the read. The first <code>L</code> bases are called the “seed”.</p></li> <li><p>The sum of the <a href="http://en.wikipedia.org/wiki/FASTQ_format#Variations">Phred quality</a> values at <em>all</em> mismatched positions (not just in the seed) may not exceed <code>E</code> (set with <a href="#bowtie-options-e"><code>-e</code></a>). Where qualities are unavailable (e.g. if the reads are from a FASTA file), the <a href="http://en.wikipedia.org/wiki/FASTQ_format#Variations">Phred quality</a> defaults to 40.</p></li> </ol> <p>The <a href="#bowtie-options-n"><code>-n</code></a> option is mutually exclusive with the <a href="#bowtie-options-v"><code>-v</code></a> option.</p> <p>If there are many possible alignments satisfying these criteria, Bowtie gives preference to alignments with fewer mismatches and where the sum from criterion 2 is smaller. When the <a href="#bowtie-options-best"><code>--best</code></a> option is specified, Bowtie guarantees the reported alignment(s) are “best” in terms of these criteria (criterion 1 has priority), and that the alignments are reported in best-to-worst order. Bowtie is somewhat slower when <a href="#bowtie-options-best"><code>--best</code></a> is specified.</p> <p>Note that <a href="http://maq.sf.net">Maq</a> internally rounds base qualities to the nearest 10 and rounds qualities greater than 30 to 30. To maintain compatibility, Bowtie does the same. Rounding can be suppressed with the <a href="#bowtie-options-nomaqround"><code>--nomaqround</code></a> option.</p> <p>Bowtie is not fully sensitive in <a href="#bowtie-options-n"><code>-n</code></a> 2 and <a href="#bowtie-options-n"><code>-n</code></a> 3 modes by default. In these modes Bowtie imposes a “backtracking limit” to limit effort spent trying to find valid alignments for low-quality reads unlikely to have any. This may cause Bowtie to miss some legal 2- and 3-mismatch alignments. The limit is set to a reasonable default (125 without <a href="#bowtie-options-best"><code>--best</code></a>, 800 with <a href="#bowtie-options-best"><code>--best</code></a>), but the user may decrease or increase the limit using the <a href="#bowtie-options-maxbts"><code>--maxbts</code></a> and/or <a href="#bowtie-options-y"><code>-y</code></a> options. <a href="#bowtie-options-y"><code>-y</code></a> mode is relatively slow but guarantees full sensitivity.</p> <h2 id="the--v-alignment-mode">The <code>-v</code> alignment mode</h2> <p>In <a href="#bowtie-options-v"><code>-v</code></a> mode, alignments may have no more than <code>V</code> mismatches, where <code>V</code> may be a number from 0 through 3 set using the <a href="#bowtie-options-v"><code>-v</code></a> option. Quality values are ignored. The <a href="#bowtie-options-v"><code>-v</code></a> option is mutually exclusive with the <a href="#bowtie-options-n"><code>-n</code></a> option.</p> <p>If there are many legal alignments, Bowtie gives preference to alignments with fewer mismatches. When the <a href="#bowtie-options-best"><code>--best</code></a> option is specified, Bowtie guarantees the reported alignment(s) are “best” in terms of the number of mismatches, and that the alignments are reported in best-to-worst order. Bowtie is somewhat slower when <a href="#bowtie-options-best"><code>--best</code></a> is specified.</p> <h2 id="strata">Strata</h2> <p>In <a href="#the--n-alignment-mode">the -n alignment mode</a>, an alignment’s “stratum” is defined as the number of mismatches in the “seed” region, i.e. the leftmost <code>L</code> bases, where <code>L</code> is set with the <a href="#bowtie-options-l"><code>-l</code></a> option. In <a href="#the--v-alignment-mode">the -v alignment mode</a>, an alignment’s stratum is defined as the total number of mismatches in the entire alignment. Some of Bowtie’s options (e.g. <a href="#bowtie-options-strata"><code>--strata</code></a> and <a href="#bowtie-options-m"><code>-m</code></a> use the notion of “stratum” to limit or expand the scope of reportable alignments.</p> <h2 id="reporting-modes">Reporting Modes</h2> <p>With the <a href="#bowtie-options-k"><code>-k</code></a>, <a href="#bowtie-options-a"><code>-a</code></a>, <a href="#bowtie-options-m"><code>-m</code></a>, <a href="#bowtie-options-m"><code>-M</code></a>, <a href="#bowtie-options-best"><code>--best</code></a> and <a href="#bowtie-options-strata"><code>--strata</code></a> options, the user can flexibly select which alignments are reported. Below we demonstrate a few ways in which these options can be combined. All examples are using the <code>e_coli</code> index packaged with Bowtie. The <a href="#bowtie-options-suppress"><code>--suppress</code></a> option is used to keep the output concise and some output is elided for clarity.</p> <h3 id="example-1--a">Example 1: <code>-a</code></h3> <pre><code>$ ./bowtie -a -v 2 e_coli --suppress 1,5,6,7 -c ATGCATCATGCGCCAT - gi|110640213|ref|NC_008253.1| 148810 10:A>G,13:C>G - gi|110640213|ref|NC_008253.1| 2852852 8:T>A - gi|110640213|ref|NC_008253.1| 4930433 4:G>T,6:C>G - gi|110640213|ref|NC_008253.1| 905664 6:A>G,7:G>T + gi|110640213|ref|NC_008253.1| 1093035 2:T>G,15:A>T</code></pre> <p>Specifying <a href="#bowtie-options-a"><code>-a</code></a> instructs Bowtie to report <em>all</em> valid alignments, subject to the alignment policy: <a href="#bowtie-options-v"><code>-v</code></a> 2. In this case, Bowtie finds 5 inexact hits in the E. coli genome; 1 hit (the 2nd one listed) has 1 mismatch, and the other 4 hits have 2 mismatches. Four are on the reverse reference strand and one is on the forward strand. Note that they are not listed in best-to-worst order.</p> <h3 id="example-2--k-3">Example 2: <code>-k 3</code></h3> <pre><code>$ ./bowtie -k 3 -v 2 e_coli --suppress 1,5,6,7 -c ATGCATCATGCGCCAT - gi|110640213|ref|NC_008253.1| 148810 10:A>G,13:C>G - gi|110640213|ref|NC_008253.1| 2852852 8:T>A - gi|110640213|ref|NC_008253.1| 4930433 4:G>T,6:C>G</code></pre> <p>Specifying <a href="#bowtie-options-k"><code>-k</code></a> 3 instructs Bowtie to report up to 3 valid alignments. In this case, a total of 5 valid alignments exist (see <a href="#example-1">Example 1</a>); <code>bowtie</code> reports 3 out of those 5. <a href="#bowtie-options-k"><code>-k</code></a> can be set to any integer greater than 0.</p> <h3 id="example-3--k-6">Example 3: <code>-k 6</code></h3> <pre><code>$ ./bowtie -k 6 -v 2 e_coli --suppress 1,5,6,7 -c ATGCATCATGCGCCAT - gi|110640213|ref|NC_008253.1| 148810 10:A>G,13:C>G - gi|110640213|ref|NC_008253.1| 2852852 8:T>A - gi|110640213|ref|NC_008253.1| 4930433 4:G>T,6:C>G - gi|110640213|ref|NC_008253.1| 905664 6:A>G,7:G>T + gi|110640213|ref|NC_008253.1| 1093035 2:T>G,15:A>T</code></pre> <p>Specifying <a href="#bowtie-options-k"><code>-k</code></a> 6 instructs Bowtie to report up to 6 valid alignments. In this case, a total of 5 valid alignments exist, so <code>bowtie</code> reports all 5.</p> <h3 id="example-4-default--k-1">Example 4: default (<code>-k 1</code>)</h3> <pre><code>$ ./bowtie -v 2 e_coli --suppress 1,5,6,7 -c ATGCATCATGCGCCAT - gi|110640213|ref|NC_008253.1| 148810 10:A>G,13:C>G</code></pre> <p>Leaving the reporting options at their defaults causes <code>bowtie</code> to report the first valid alignment it encounters. Because <a href="#bowtie-options-best"><code>--best</code></a> was not specified, we are not guaranteed that Bowtie will report the best alignment, and in this case it does not (the 1-mismatch alignment from the previous example would have been better). The default reporting mode is equivalent to <a href="#bowtie-options-k"><code>-k</code></a> 1.</p> <h3 id="example-5--a---best">Example 5: <code>-a --best</code></h3> <pre><code>$ ./bowtie -a --best -v 2 e_coli --suppress 1,5,6,7 -c ATGCATCATGCGCCAT - gi|110640213|ref|NC_008253.1| 2852852 8:T>A + gi|110640213|ref|NC_008253.1| 1093035 2:T>G,15:A>T - gi|110640213|ref|NC_008253.1| 905664 6:A>G,7:G>T - gi|110640213|ref|NC_008253.1| 148810 10:A>G,13:C>G - gi|110640213|ref|NC_008253.1| 4930433 4:G>T,6:C>G</code></pre> <p>Specifying <a href="#bowtie-options-a"><code>-a</code></a> <a href="#bowtie-options-best"><code>--best</code></a> results in the same alignments being printed as if just <a href="#bowtie-options-a"><code>-a</code></a> had been specified, but they are guaranteed to be reported in best-to-worst order.</p> <h3 id="example-6--a---best---strata">Example 6: <code>-a --best --strata</code></h3> <pre><code>$ ./bowtie -a --best --strata -v 2 --suppress 1,5,6,7 e_coli -c ATGCATCATGCGCCAT - gi|110640213|ref|NC_008253.1| 2852852 8:T>A</code></pre> <p>Specifying <a href="#bowtie-options-strata"><code>--strata</code></a> in addition to <a href="#bowtie-options-a"><code>-a</code></a> and <a href="#bowtie-options-best"><code>--best</code></a> causes <code>bowtie</code> to report only those alignments in the best alignment “stratum”. The alignments in the best stratum are those having the least number of mismatches (or mismatches just in the “seed” portion of the alignment in the case of <a href="#bowtie-options-n"><code>-n</code></a> mode). Note that if <a href="#bowtie-options-strata"><code>--strata</code></a> is specified, <a href="#bowtie-options-best"><code>--best</code></a> must also be specified.</p> <h3 id="example-7--a--m-3">Example 7: <code>-a -m 3</code></h3> <pre><code>$ ./bowtie -a -m 3 -v 2 e_coli -c ATGCATCATGCGCCAT No alignments</code></pre> <p>Specifying <a href="#bowtie-options-m"><code>-m</code></a> 3 instructs bowtie to refrain from reporting any alignments for reads having more than 3 reportable alignments. The <a href="#bowtie-options-m"><code>-m</code></a> option is useful when the user would like to guarantee that reported alignments are “unique”, for some definition of unique.</p> <p>Example 1 showed that the read has 5 reportable alignments when <a href="#bowtie-options-a"><code>-a</code></a> and <a href="#bowtie-options-v"><code>-v</code></a> 2 are specified, so the <a href="#bowtie-options-m"><code>-m</code></a> 3 limit causes bowtie to output no alignments.</p> <h3 id="example-8--a--m-5">Example 8: <code>-a -m 5</code></h3> <pre><code>$ ./bowtie -a -m 5 -v 2 e_coli --suppress 1,5,6,7 -c ATGCATCATGCGCCAT - gi|110640213|ref|NC_008253.1| 148810 10:A>G,13:C>G - gi|110640213|ref|NC_008253.1| 2852852 8:T>A - gi|110640213|ref|NC_008253.1| 4930433 4:G>T,6:C>G - gi|110640213|ref|NC_008253.1| 905664 6:A>G,7:G>T + gi|110640213|ref|NC_008253.1| 1093035 2:T>G,15:A>T</code></pre> <p>Specifying <a href="#bowtie-options-m"><code>-m</code></a> 5 instructs bowtie to refrain from reporting any alignments for reads having more than 5 reportable alignments. Since the read has exactly 5 reportable alignments, the <a href="#bowtie-options-m"><code>-m</code></a> 5 limit allows <code>bowtie</code> to print them as usual.</p> <h3 id="example-9--a--m-3---best---strata">Example 9: <code>-a -m 3 --best --strata</code></h3> <pre><code>$ ./bowtie -a -m 3 --best --strata -v 2 e_coli --suppress 1,5,6,7 -c ATGCATCATGCGCCAT - gi|110640213|ref|NC_008253.1| 2852852 8:T>A</code></pre> <p>Specifying <a href="#bowtie-options-m"><code>-m</code></a> 3 instructs bowtie to refrain from reporting any alignments for reads having more than 3 reportable alignments. As we saw in Example 6, the read has only 1 reportable alignment when <a href="#bowtie-options-a"><code>-a</code></a>, <a href="#bowtie-options-best"><code>--best</code></a> and <a href="#bowtie-options-strata"><code>--strata</code></a> are specified, so the <a href="#bowtie-options-m"><code>-m</code></a> 3 limit allows <code>bowtie</code> to print that alignment as usual.</p> <p>Intuitively, the <a href="#bowtie-options-m"><code>-m</code></a> option, when combined with the <a href="#bowtie-options-best"><code>--best</code></a> and <a href="#bowtie-options-strata"><code>--strata</code></a> options, guarantees a principled, though weaker form of “uniqueness.” A stronger form of uniqueness is enforced when <a href="#bowtie-options-m"><code>-m</code></a> is specified but <a href="#bowtie-options-best"><code>--best</code></a> and <a href="#bowtie-options-strata"><code>--strata</code></a> are not.</p> <h2 id="paired-end-alignment">Paired-end Alignment</h2> <p><code>bowtie</code> can align paired-end reads when properly paired read files are specified using the <a href="#command-line"><code>-1</code></a> and <a href="#command-line"><code>-2</code></a> options (for pairs of raw, FASTA, or FASTQ read files), the <a href="#command-line"><code>--12</code></a> option (for Tab-delimited read files), or using the <a href="#command-line"><code>--interleaved</code></a> (for interleaved FASTQ). A valid paired-end alignment satisfies these criteria:</p> <ol type="1"> <li>Both mates have a valid alignment according to the alignment policy defined by the <a href="#bowtie-options-v"><code>-v</code></a>/<a href="#bowtie-options-n"><code>-n</code></a>/<a href="#bowtie-options-e"><code>-e</code></a>/<a href="#bowtie-options-l"><code>-l</code></a> options.</li> <li>The relative orientation and position of the mates satisfy the constraints defined by the <a href="#bowtie-options-I"><code>-I</code></a>/<a href="#bowtie-options-X"><code>-X</code></a>/<a href="#bowtie-options-fr"><code>--fr</code></a>/<a href="#bowtie-options-fr"><code>--rf</code></a>/<a href="#bowtie-options-fr"><code>--ff</code></a> options.</li> </ol> <p>Policies governing which paired-end alignments are reported for a given read are specified using the <a href="#bowtie-options-k"><code>-k</code></a>, <a href="#bowtie-options-a"><code>-a</code></a> and <a href="#bowtie-options-m"><code>-m</code></a> options as usual. The <a href="#bowtie-options-strata"><code>--strata</code></a> and <a href="#bowtie-options-best"><code>--best</code></a> options do not apply in paired-end mode.</p> <p>A paired-end alignment is reported as a pair of mate alignments, both on a separate line, where the alignment for each mate is formatted the same as an unpaired (singleton) alignment. The alignment for the mate that occurs closest to the beginning of the reference sequence (the “upstream” mate) is always printed before the alignment for the downstream mate. Reads files containing paired-end reads will sometimes name the reads according to whether they are the #1 or #2 mates by appending a <code>/1</code> or <code>/2</code> suffix to the read name. If no such suffix is present in Bowtie’s input, the suffix will be added when Bowtie prints read names in alignments (except in <a href="#bowtie-options-S"><code>-S</code></a> “SAM” mode, where mate information is encoded in the <code>FLAGS</code> field instead).</p> <p>Finding a valid paired-end alignment where both mates align to repetitive regions of the reference can be very time-consuming. By default, Bowtie avoids much of this cost by imposing a limit on the number of “tries” it makes to match an alignment for one mate with a nearby alignment for the other. The default limit is 100. This causes <code>bowtie</code> to miss some valid paired-end alignments where both mates lie in repetitive regions, but the user may use the <a href="#bowtie-options-pairtries"><code>--pairtries</code></a> or <a href="#bowtie-options-y"><code>-y</code></a> options to increase Bowtie’s sensitivity as desired.</p> <p>Paired-end alignments where one mate’s alignment is entirely contained within the other’s are considered invalid.</p> <p>Because Bowtie uses an in-memory representation of the original reference string when finding paired-end alignments, its memory footprint is larger when aligning paired-end reads. For example, the human index has a memory footprint of about 2.2 GB in single-end mode and 2.9 GB in paired-end mode.</p> <h2 id="wrapper-scripts">Wrapper scripts</h2> <p>The <code>bowtie</code>, <code>bowtie-build</code> and <code>bowtie-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. The appropriate index type is selected based on the input size.</p> <p>It is recommended that you always run the bowtie wrappers and not run the binaries directly.</p> <h2 id="small-and-large-indexes">Small and large indexes</h2> <p><code>bowtie-build</code> can index reference genomes of any size. For genomes less than about 4 billion nucleotides in length, <code>bowtie-build</code> builds a “small” index using 32-bit numbers in various parts of the index. When the genome is longer, <code>bowtie-build</code> builds a “large” index using 64-bit numbers. Small indexes are stored in files with the <code>.ebwt</code> extension, and large indexes are stored in files with the <code>.ebwtl</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 type="1"> <li><p>If your computer has multiple processors/cores, use <code>--threads</code></p> <p><a href="#bowtie-build-options-threads"><code>--threads</code></a> option causes Bowtie to launch a specified number of parallel threads. Each thread runs on a different processor/core. For alignment, this increases alignment throughput by approximately a multiple of the number of threads (though in practice, it is somewhat worse than linear). For index building, using multiple threads decreases building time.</p></li> <li><p>If reporting many alignments per read, try tweaking <code>bowtie-build --offrate</code></p> <p>If you are using the <a href="#bowtie-options-k"><code>-k</code></a>, <a href="#bowtie-options-a"><code>-a</code></a> or <a href="#bowtie-options-m"><code>-m</code></a> options and Bowtie is reporting many alignments per read (an average of more than about 10 per read) and you have some memory to spare, using an index with a denser SA sample can speed things up considerably.</p> <p>To do this, specify a smaller-than-default <a href="#bowtie-build-options-o"><code>-o</code>/<code>--offrate</code></a> value when running <code>bowtie-build</code>. A denser SA sample yields a larger index, but is also particularly effective at speeding up alignment when many alignments are reported per read. For example, decreasing the index’s <a href="#bowtie-build-options-o"><code>-o</code>/<code>--offrate</code></a> by 1 could as much as double alignment performance, and decreasing by 2 could quadruple alignment performance, etc.</p> <p>On the other hand, decreasing <a href="#bowtie-build-options-o"><code>-o</code>/<code>--offrate</code></a> increases the size of the Bowtie index, both on disk and in memory when aligning reads. At the default <a href="#bowtie-build-options-o"><code>-o</code>/<code>--offrate</code></a> of 5, the SA sample for the human genome occupies about 375 MB of memory when aligning reads. Decreasing the <a href="#bowtie-build-options-o"><code>-o</code>/<code>--offrate</code></a> by 1 doubles the memory taken by the SA sample, and decreasing by 2 quadruples the memory taken, etc.</p></li> <li><p>If bowtie “thrashes”, try increasing <code>bowtie --offrate</code></p> <p>If <code>bowtie</code> runs very slow on a low-memory machine (with less than about 4 GB of memory), then try setting <code>bowtie</code> <a href="#bowtie-options-o"><code>-o</code>/<code>--offrate</code></a> to a <em>larger</em> value. <code>bowtie-build</code>’s default <a href="#bowtie-build-options-o"><code>-o</code>/<code>--offrate</code></a> is 5 and all pre-built indexes available from the Bowtie website are built with <a href="#bowtie-build-options-o"><code>-o</code>/<code>--offrate</code></a> 5; so if <code>bowtie</code> thrashes when querying such an index, try using <code>bowtie</code> <a href="#bowtie-options-o"><code>--offrate</code></a> 6. If <code>bowtie</code> still thrashes, try <code>bowtie</code> <a href="#bowtie-options-o"><code>--offrate</code></a> 7, etc. A higher <a href="#bowtie-options-o"><code>-o</code>/<code>--offrate</code></a> causes <code>bowtie</code> to use a sparser sample of the suffix array than is stored in the index; this saves memory but makes alignment reporting slower (which is especially slow when using <a href="#bowtie-options-a"><code>-a</code></a> or large <a href="#bowtie-options-k"><code>-k</code></a> or <a href="#bowtie-options-m"><code>-m</code></a>).</p></li> </ol> <h2 id="command-line">Command Line</h2> <p>Usage:</p> <pre><code>bowtie [options]* -x <ebwt> {-1 <m1> -2 <m2> | --12 <r> | --interleaved <i> | <s>} [<hit>]</code></pre> <h3 id="main-arguments">Main arguments</h3> <table> <tr> <td id="bowtie-options-x"> <pre><code>-x <ebwt></code></pre> </td> <td> <p>The basename of the Bowtie, or Bowtie 2, index to be searched. The basename is the name of any of the index files up to but not including the final <code>.1.ebwt</code> / <code>.rev.1.ebwt</code> / <code>1.bt2</code> / etc. <code>bowtie</code> looks for the specified index first in the current directory, then in the <code>indexes</code> subdirectory under the directory where the <code>bowtie</code> executable is located, then looks in the directory specified in the <code>BOWTIE_INDEXES</code> environment variable. If a Bowtie and Bowtie 2 index are located in the same directory and share the same basename, <code>bowtie</code> will use the Bowtie 2 index.</p> </td> </tr> <tr> <td> <pre><code><m1></code></pre> </td> <td> <p>Comma-separated list of files containing the #1 mates (filename usually includes <code>_1</code>), or, if <a href="#bowtie-options-c"><code>-c</code></a> is specified, the mate sequences themselves. E.g., this might be <code>flyA_1.fq,flyB_1.fq</code>, or, if <a href="#bowtie-options-c"><code>-c</code></a> is specified, this might be <code>GGTCATCCT,ACGGGTCGT</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>bowtie</code> will read the #1 mates from the “standard in” filehandle.</p> </td> </tr> <tr> <td> <pre><code><m2></code></pre> </td> <td> <p>Comma-separated list of files containing the #2 mates (filename usually includes <code>_2</code>), or, if <a href="#bowtie-options-c"><code>-c</code></a> is specified, the mate sequences themselves. E.g., this might be <code>flyA_2.fq,flyB_2.fq</code>, or, if <a href="#bowtie-options-c"><code>-c</code></a> is specified, this might be <code>GGTCATCCT,ACGGGTCGT</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>bowtie</code> will read the #2 mates from the “standard in” filehandle.</p> </td> </tr> <tr> <td> <pre><code><r></code></pre> </td> <td> <p>Comma-separated list of files containing a mix of unpaired and paired-end reads in Tab-delimited format. Tab-delimited format is a 1-read-per-line format where unpaired reads consist of a read name, sequence and quality string each separated by tabs. A paired-end read consists of a read name, sequence of the #1 mate, quality values of the #1 mate, sequence of the #2 mate, and quality values of the #2 mate separated by tabs. Quality values can be expressed using any of the scales supported in FASTQ files. Reads may be a mix of different lengths and paired-end and unpaired reads may be intermingled in the same file. If <code>-</code> is specified, <code>bowtie</code> will read the Tab-delimited reads from the “standard in” filehandle.</p> </td> </tr> <tr> <td> <pre><code><i></code></pre> </td> <td> <p>A comma-separated list of interleaved paired-end FASTQ files, where the records for the mate #1s are interleaved with the records for the mate #2s. Reads may be a mix of different lengths. If <code>-</code> is specified, Bowtie reads from the “standard in” filehandle.</p> </td> </tr> <tr> <td> <pre><code><s></code></pre> </td> <td> <p>A comma-separated list of files containing unpaired reads to be aligned, or, if <a href="#bowtie-options-c"><code>-c</code></a> is specified, the unpaired read sequences themselves. E.g., this might be <code>lane1.fq,lane2.fq,lane3.fq,lane4.fq</code>, or, if <a href="#bowtie-options-c"><code>-c</code></a> is specified, this might be <code>GGTCATCCT,ACGGGTCGT</code>. Reads may be a mix of different lengths. If <code>-</code> is specified, Bowtie gets the reads from the “standard in” filehandle.</p> </td> </tr> <tr> <td> <pre><code><hit></code></pre> </td> <td> <p>File to write alignments to. By default, alignments are written to the “standard out” filehandle (i.e. the console).</p> </td> </tr> </table> <h3 id="options">Options</h3> <h4 id="input">Input</h4> <table> <tr> <td id="bowtie-options-q"> <pre><code>-q</code></pre> </td> <td> <p>The query input files (specified either as <code><m1></code> and <code><m2></code>, or as <code><s></code>) are FASTQ files (usually having extension <code>.fq</code> or <code>.fastq</code>). This is the default. See also: <a href="#bowtie-options-solexa-quals"><code>--solexa-quals</code></a> and <a href="#bowtie-options-integer-quals"><code>--integer-quals</code></a>.</p> </td> </tr> <tr> <td id="bowtie-options-f"> <pre><code>-f</code></pre> </td> <td> <p>The query input files (specified either as <code><m1></code> and <code><m2></code>, or as <code><s></code>) are FASTA files (usually having extension <code>.fa</code>, <code>.mfa</code>, <code>.fna</code> or similar). All quality values are assumed to be 40 on the <a href="http://en.wikipedia.org/wiki/FASTQ_format#Variations">Phred quality</a> scale.</p> </td> </tr> <tr> <td id="bowtie-options-F"> <pre><code>-F</code></pre> </td> <td> <p>Reads are substrings (k-mers) extracted from a FASTA file <code>s</code>. Specifically, for every reference sequence in FASTA file <code>s</code>, Bowtie 2 aligns the k-mers at offsets 1, 1+i, 1+2i, … until reaching the end of the reference. Each k-mer is aligned as a separate read. Quality values are set to all Is (40 on Phred scale). Each k-mer (read) is given a name like <code>sequence</code>_<code>offset</code>, where <code>sequence</code> is the name of the FASTA sequence it was drawn from and <code>offset</code> is its 0-based offset of origin with respect to the sequence. Only single k-mers, i.e. unpaired reads, can be aligned in this way.</p> </td> </tr> <tr> <td id="bowtie-options-r"> <pre><code>-r</code></pre> </td> <td> <p>The query input files (specified either as <code><m1></code> and <code><m2></code>, or as <code><s></code>) are Raw files: one sequence per line, without quality values or names. All quality values are assumed to be 40 on the <a href="http://en.wikipedia.org/wiki/FASTQ_format#Variations">Phred quality</a> scale.</p> </td> </tr> <tr> <td id="bowtie-options-c"> <pre><code>-c</code></pre> </td> <td> <p>The query 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.</p> </td> </tr> <tr> <td id="bowtie-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="bowtie-options-u"> <pre><code>-u/--qupto <int></code></pre> </td> <td> <p>Only align the first <code><int></code> reads or read pairs from the input (after the <a href="#bowtie-options-s"><code>-s</code>/<code>--skip</code></a> reads or pairs have been skipped). Default: no limit.</p> </td> </tr> <tr> <td id="bowtie-options-5"> <pre><code>-5/--trim5 <int></code></pre> </td> <td> <p>Trim <code><int></code> bases from high-quality (left) end of each read before alignment (default: 0).</p> </td> </tr> <tr> <td id="bowtie-options-3"> <pre><code>-3/--trim3 <int></code></pre> </td> <td> <p>Trim <code><int></code> bases from low-quality (right) end of each read before alignment (default: 0).</p> </td> </tr> <tr> <td id="bowtie-options-phred33-quals"> <pre><code>--phred33-quals</code></pre> </td> <td> <p>Input qualities are ASCII chars equal to the <a href="http://en.wikipedia.org/wiki/FASTQ_format#Variations">Phred quality</a> plus 33. Default: on.</p> </td> </tr> <tr> <td id="bowtie-options-phred64-quals"> <pre><code>--phred64-quals</code></pre> </td> <td> <p>Input qualities are ASCII chars equal to the <a href="http://en.wikipedia.org/wiki/FASTQ_format#Variations">Phred quality</a> plus 64. Default: off.</p> </td> </tr> <tr> <td id="bowtie-options-solexa-quals"> <pre><code>--solexa-quals</code></pre> </td> <td> <p>Convert input qualities from <a href="http://en.wikipedia.org/wiki/FASTQ_format#Variations">Solexa</a> (which can be negative) to <a href="http://en.wikipedia.org/wiki/FASTQ_format#Variations">Phred</a> (which can’t). This is usually the right option for use with (unconverted) reads emitted by GA Pipeline versions prior to 1.3. Default: off.</p> </td> </tr> <tr> <td id="bowtie-options-solexa1.3-quals"> <pre><code>--solexa1.3-quals</code></pre> </td> <td> <p>Same as <a href="#bowtie-options-phred64-quals"><code>--phred64-quals</code></a>. This is usually the right option for use with (unconverted) reads emitted by GA Pipeline version 1.3 or later. Default: off.</p> </td> </tr> <tr> <td id="bowtie-options-integer-quals"> <pre><code>--integer-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/FASTQ_format#Variations">Phred quality</a> scale unless <a href="#bowtie-options-solexa-quals"><code>--solexa-quals</code></a> is also specified. Default: off.</p> </td> </tr> <tr> <td id="bowtie-options-large-index"> <pre><code>--large-index</code></pre> </td> <td> <p>Force usage of a ‘large’ index (those ending in ‘.ebwtl’), even if a small one is present. Default: off.</p> </td> </tr> </table> <h4 id="alignment">Alignment</h4> <table> <tr> <td id="bowtie-options-v"> <pre><code>-v <int></code></pre> </td> <td> <p>Report alignments with at most <code><int></code> mismatches. <a href="#bowtie-options-e"><code>-e</code></a> and <a href="#bowtie-options-l"><code>-l</code></a> options are ignored and quality values have no effect on what alignments are valid. <a href="#bowtie-options-v"><code>-v</code></a> is mutually exclusive with <a href="#bowtie-options-n"><code>-n</code></a>.</p> </td> </tr> <tr> <td id="bowtie-options-n"> <pre><code>-n/--seedmms <int></code></pre> </td> <td> <p>Maximum number of mismatches permitted in the “seed”, i.e. the first <code>L</code> base pairs of the read (where <code>L</code> is set with <a href="#bowtie-options-l"><code>-l</code>/<code>--seedlen</code></a>). This may be 0, 1, 2 or 3 and the default is 2. This option is mutually exclusive with the <a href="#bowtie-options-v"><code>-v</code></a> option.</p> </td> </tr> <tr> <td id="bowtie-options-e"> <pre><code>-e/--maqerr <int></code></pre> </td> <td> <p>Maximum permitted total of quality values at <em>all</em> mismatched read positions throughout the entire alignment, not just in the “seed”. The default is 70. Like <a href="http://maq.sf.net">Maq</a>, <code>bowtie</code> rounds quality values to the nearest 10 and saturates at 30; rounding can be disabled with <a href="#bowtie-options-nomaqround"><code>--nomaqround</code></a>.</p> </td> </tr> <tr> <td id="bowtie-options-l"> <pre><code>-l/--seedlen <int></code></pre> </td> <td> <p>The “seed length”; i.e., the number of bases on the high-quality end of the read to which the <a href="#bowtie-options-n"><code>-n</code></a> ceiling applies. The lowest permitted setting is 5 and the default is 28. <code>bowtie</code> is faster for larger values of <a href="#bowtie-options-l"><code>-l</code></a>.</p> </td> </tr> <tr> <td id="bowtie-options-nomaqround"> <pre><code>--nomaqround</code></pre> </td> <td> <p><a href="http://maq.sf.net">Maq</a> accepts quality values in the <a href="http://en.wikipedia.org/wiki/FASTQ_format#Variations">Phred quality</a> scale, but internally rounds values to the nearest 10, with a maximum of 30. By default, <code>bowtie</code> also rounds this way. <a href="#bowtie-options-nomaqround"><code>--nomaqround</code></a> prevents this rounding in <code>bowtie</code>.</p> </td> </tr> <tr> <td id="bowtie-options-I"> <pre><code>-I/--minins <int></code></pre> </td> <td> <p>The minimum insert size 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="#bowtie-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="#bowtie-options-3"><code>-3</code></a> or <a href="#bowtie-options-5"><code>-5</code></a> are also used, the <a href="#bowtie-options-I"><code>-I</code></a> constraint is applied with respect to the untrimmed mates. Default: 0.</p> </td> </tr> <tr> <td id="bowtie-options-X"> <pre><code>-X/--maxins <int></code></pre> </td> <td> <p>The maximum insert size 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="#bowtie-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="#bowtie-options-3"><code>-3</code></a> or <a href="#bowtie-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. Default: 250.</p> </td> </tr> <tr> <td id="bowtie-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 mate1 appears upstream of the reverse complement of mate2 and the insert length constraints are met, that alignment is valid. Also, if mate2 appears upstream of the reverse complement of mate1 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 mate1 and a downstream mate2 to be forward-oriented.</p> </td> </tr> <tr> <td id="bowtie-options-allow-contain"> <pre><code>--allow-contain</code></pre> </td> <td> <p>Normally, Bowtie will not reported a paired-end alignment for a pair when the two ends overlap exactly the same reference interval, or if the alignment interval for one is contained within the other. This option causes Bowtie to report such cases as normal paired-end alignments.</p> </td> </tr> <tr> <td id="bowtie-options-nofw"> <pre><code>--nofw/--norc</code></pre> </td> <td> <p>If <code>--nofw</code> is specified, <code>bowtie</code> will not attempt to align against the forward reference strand. If <code>--norc</code> is specified, <code>bowtie</code> will not attempt to align against the reverse-complement reference strand. For paired-end reads using <a href="#bowtie-options-fr"><code>--fr</code></a> or <a href="#bowtie-options-fr"><code>--rf</code></a> modes, <code>--nofw</code> and <code>--norc</code> apply to the forward and reverse-complement pair orientations. I.e. specifying <code>--nofw</code> and <a href="#bowtie-options-fr"><code>--fr</code></a> will only find reads in the R/F orientation where mate 2 occurs upstream of mate 1 with respect to the forward reference strand.</p> </td> </tr> <tr> <td id="bowtie-options-maxbts"> <pre><code>--maxbts</code></pre> </td> <td> <p>The maximum number of backtracks permitted when aligning a read in <a href="#bowtie-options-n"><code>-n</code></a> 2 or <a href="#bowtie-options-n"><code>-n</code></a> 3 mode (default: 125 without <a href="#bowtie-options-best"><code>--best</code></a>, 800 with <a href="#bowtie-options-best"><code>--best</code></a>). A “backtrack” is the introduction of a speculative substitution into the alignment. Without this limit, the default parameters will sometimes require that <code>bowtie</code> try 100s or 1,000s of backtracks to align a read, especially if the read has many low-quality bases and/or has no valid alignments, slowing bowtie down significantly. However, this limit may cause some valid alignments to be missed. Higher limits yield greater sensitivity at the expensive of longer running times. See also: <a href="#bowtie-options-y"><code>-y</code>/<code>--tryhard</code></a>.</p> </td> </tr> <tr> <td id="bowtie-options-pairtries"> <pre><code>--pairtries <int></code></pre> </td> <td> <p>For paired-end alignment, this is the maximum number of attempts <code>bowtie</code> will make to match an alignment for one mate up with an alignment for the opposite mate. Most paired-end alignments require only a few such attempts, but pairs where both mates occur in highly repetitive regions of the reference can require significantly more. Setting this to a higher number allows <code>bowtie</code> to find more paired- end alignments for repetitive pairs at the expense of speed. The default is 100. See also: <a href="#bowtie-options-y"><code>-y</code>/<code>--tryhard</code></a>.</p> </td> </tr> <tr> <td id="bowtie-options-y"> <pre><code>-y/--tryhard</code></pre> </td> <td> <p>Try as hard as possible to find valid alignments when they exist, including paired-end alignments. This is equivalent to specifying very high values for the <a href="#bowtie-options-maxbts"><code>--maxbts</code></a> and <a href="#bowtie-options-pairtries"><code>--pairtries</code></a> options. This mode is generally much slower than the default settings, but can be useful for certain problems. This mode is slower when (a) the reference is very repetitive, (b) the reads are low quality, or (c) not many reads have valid alignments.</p> </td> </tr> <tr> <td id="bowtie-options-chunkmbs"> <pre><code>--chunkmbs <int></code></pre> </td> <td> <p>The number of megabytes of memory a given thread is given to store path descriptors in <a href="#bowtie-options-best"><code>--best</code></a> mode. Best-first search must keep track of many paths at once to ensure it is always extending the path with the lowest cumulative cost. Bowtie tries to minimize the memory impact of the descriptors, but they can still grow very large in some cases. If you receive an error message saying that chunk memory has been exhausted in <a href="#bowtie-options-best"><code>--best</code></a> mode, try adjusting this parameter up to dedicate more memory to the descriptors. Default: 64.</p> </td> </tr> <tr> <td id="bowtie-options-reads-per-batch"> <pre><code>--reads-per-batch <int></code></pre> </td> <td> <p>Part of bowtie’s batch parsing and used to specify the number of reads that bowtie will consume from the input file at once. Default: 16</p> </td> </tr> </table> <h4 id="reporting">Reporting</h4> <table> <tr> <td id="bowtie-options-k"> <pre><code>-k <int></code></pre> </td> <td> <p>Report up to <code><int></code> valid alignments per read or pair (default: 1). Validity of alignments is determined by the alignment policy (combined effects of <a href="#bowtie-options-n"><code>-n</code></a>, <a href="#bowtie-options-v"><code>-v</code></a>, <a href="#bowtie-options-l"><code>-l</code></a>, and <a href="#bowtie-options-e"><code>-e</code></a>). If more than one valid alignment exists and the <a href="#bowtie-options-best"><code>--best</code></a> and <a href="#bowtie-options-strata"><code>--strata</code></a> options are specified, then only those alignments belonging to the best alignment “stratum” will be reported. Bowtie is designed to be very fast for small <a href="#bowtie-options-k"><code>-k</code></a> but bowtie can become significantly slower as <a href="#bowtie-options-k"><code>-k</code></a> increases. If you would like to use Bowtie for larger values of <a href="#bowtie-options-k"><code>-k</code></a>, consider building an index with a denser suffix-array sample, i.e. specify a smaller <a href="#bowtie-build-options-o"><code>-o</code>/<code>--offrate</code></a> when invoking <code>bowtie-build</code> for the relevant index (see the <a href="#performance-tuning">Performance tuning</a> section for details).</p> </td> </tr> <tr> <td id="bowtie-options-a"> <pre><code>-a/--all</code></pre> </td> <td> <p>Report all valid alignments per read or pair (default: off). Validity of alignments is determined by the alignment policy (combined effects of <a href="#bowtie-options-n"><code>-n</code></a>, <a href="#bowtie-options-v"><code>-v</code></a>, <a href="#bowtie-options-l"><code>-l</code></a>, and <a href="#bowtie-options-e"><code>-e</code></a>). If more than one valid alignment exists and the <a href="#bowtie-options-best"><code>--best</code></a> and <a href="#bowtie-options-strata"><code>--strata</code></a> options are specified, then only those alignments belonging to the best alignment “stratum” will be reported. Bowtie is designed to be very fast for small <a href="#bowtie-options-k"><code>-k</code></a> but bowtie can become significantly slower if <a href="#bowtie-options-a"><code>-a</code>/<code>--all</code></a> is specified. If you would like to use Bowtie with <a href="#bowtie-options-a"><code>-a</code></a>, consider building an index with a denser suffix-array sample, i.e. specify a smaller <a href="#bowtie-build-options-o"><code>-o</code>/<code>--offrate</code></a> when invoking <code>bowtie-build</code> for the relevant index (see the <a href="#performance-tuning">Performance tuning</a> section for details).</p> </td> </tr> <tr> <td id="bowtie-options-m"> <pre><code>-m <int></code></pre> </td> <td> <p>Suppress all alignments for a particular read or pair if more than <code><int></code> reportable alignments exist for it. Reportable alignments are those that would be reported given the <a href="#bowtie-options-n"><code>-n</code></a>, <a href="#bowtie-options-v"><code>-v</code></a>, <a href="#bowtie-options-l"><code>-l</code></a>, <a href="#bowtie-options-e"><code>-e</code></a>, <a href="#bowtie-options-k"><code>-k</code></a>, <a href="#bowtie-options-a"><code>-a</code></a>, <a href="#bowtie-options-best"><code>--best</code></a>, and <a href="#bowtie-options-strata"><code>--strata</code></a> options. Default: no limit. Bowtie is designed to be very fast for small <a href="#bowtie-options-m"><code>-m</code></a> but bowtie can become significantly slower for larger values of <a href="#bowtie-options-m"><code>-m</code></a>. If you would like to use Bowtie for larger values of <a href="#bowtie-options-k"><code>-k</code></a>, consider building an index with a denser suffix-array sample, i.e. specify a smaller <a href="#bowtie-build-options-o"><code>-o</code>/<code>--offrate</code></a> when invoking <code>bowtie-build</code> for the relevant index (see the <a href="#performance-tuning">Performance tuning</a> section for details).</p> </td> </tr> <tr> <td id="bowtie-options-M"> <pre><code>-M <int></code></pre> </td> <td> <p>Behaves like <a href="#bowtie-options-m"><code>-m</code></a> except that if a read has more than <code><int></code> reportable alignments, one is reported at random. In <a href="#default-bowtie-output">default output mode</a>, the selected alignment’s 7th column is set to <code><int></code>+1 to indicate the read has at least <code><int></code>+1 valid alignments. In <a href="#bowtie-options-S"><code>-S</code>/<code>--sam</code></a> mode, the selected alignment is given a <code>MAPQ</code> (mapping quality) of 0 and the <code>XM:I</code> field is set to <code><int></code>+1. This option requires <a href="#bowtie-options-best"><code>--best</code></a>; if specified without <a href="#bowtie-options-best"><code>--best</code></a>, <a href="#bowtie-options-best"><code>--best</code></a> is enabled automatically.</p> </td> </tr> <tr> <td id="bowtie-options-best"> <pre><code>--best</code></pre> </td> <td> <p>Make Bowtie guarantee that reported singleton alignments are “best” in terms of stratum (i.e. number of mismatches, or mismatches in the seed in the case of <a href="#bowtie-options-n"><code>-n</code></a> mode) and in terms of the quality values at the mismatched position(s). Stratum always trumps quality; e.g. a 1-mismatch alignment where the mismatched position has <a href="http://en.wikipedia.org/wiki/FASTQ_format#Variations">Phred quality</a> 40 is preferred over a 2-mismatch alignment where the mismatched positions both have <a href="http://en.wikipedia.org/wiki/FASTQ_format#Variations">Phred quality</a> 10. When <a href="#bowtie-options-best"><code>--best</code></a> is not specified, Bowtie may report alignments that are sub-optimal in terms of stratum and/or quality (though an effort is made to report the best alignment). <a href="#bowtie-options-best"><code>--best</code></a> mode also removes all strand bias. Note that <a href="#bowtie-options-best"><code>--best</code></a> does not affect which alignments are considered “valid” by <code>bowtie</code>, only which valid alignments are reported by <code>bowtie</code>. When <a href="#bowtie-options-best"><code>--best</code></a> is specified and multiple hits are allowed (via <a href="#bowtie-options-k"><code>-k</code></a> or <a href="#bowtie-options-a"><code>-a</code></a>), the alignments for a given read are guaranteed to appear in best-to-worst order in <code>bowtie</code>’s output. <code>bowtie</code> is somewhat slower when <a href="#bowtie-options-best"><code>--best</code></a> is specified.</p> </td> </tr> <tr> <td id="bowtie-options-strata"> <pre><code>--strata</code></pre> </td> <td> <p>If many valid alignments exist and are reportable (e.g. are not disallowed via the <a href="#bowtie-options-k"><code>-k</code></a> option) and they fall into more than one alignment “stratum”, report only those alignments that fall into the best stratum. By default, Bowtie reports all reportable alignments regardless of whether they fall into multiple strata. When <a href="#bowtie-options-strata"><code>--strata</code></a> is specified, <a href="#bowtie-options-best"><code>--best</code></a> must also be specified.</p> </td> </tr> </table> <h4 id="output">Output</h4> <table> <tr> <td id="bowtie-options-t"> <pre><code>-t/--time</code></pre> </td> <td> <p>Print the amount of wall-clock time taken by each phase.</p> </td> </tr> <tr> <td id="bowtie-options-B"> <pre><code>-B/--offbase <int></code></pre> </td> <td> <p>When outputting alignments in Bowtie format, consider the first base of a reference sequence to have offset <code><int></code>. This option has no effect in <a href="#bowtie-options-S"><code>-S</code>/<code>--sam</code></a> mode, since SAM mandates 1-based offsets. Default: 0.</p> </td> </tr> <tr> <td id="bowtie-options-quiet"> <pre><code>--quiet</code></pre> </td> <td> <p>Print nothing besides alignments.</p> </td> </tr> <tr> <td id="bowtie-options-refidx"> <pre><code>--refidx</code></pre> </td> <td> <p>When a reference sequence is referred to in a reported alignment, refer to it by 0-based index (its offset into the list of references that were indexed) rather than by name.</p> </td> </tr> <tr> <td id="bowtie-options-al"> <pre><code>--al <filename></code></pre> </td> <td> <p>Write all reads for which at least one alignment was reported to a file with name <code><filename></code>. Written reads will appear as they did in the input, without any of the trimming or translation of quality values that may have taken place within <code>bowtie</code>. Paired-end reads will be written to two parallel files with <code>_1</code> and <code>_2</code> inserted in the filename, e.g., if <code><filename></code> is <code>aligned.fq</code>, the #1 and #2 mates that align at least once will be written to <code>aligned_1.fq</code> and <code>aligned_2.fq</code> respectively.</p> </td> </tr> <tr> <td id="bowtie-options-un"> <pre><code>--un <filename></code></pre> </td> <td> <p>Write all reads that could not be aligned to a file with name <code><filename></code>. Written reads will appear as they did in the input, without any of the trimming or translation of quality values that may have taken place within Bowtie. Paired-end reads will be written to two parallel files with <code>_1</code> and <code>_2</code> inserted in the filename, e.g., if <code><filename></code> is <code>unaligned.fq</code>, the #1 and #2 mates that fail to align will be written to <code>unaligned_1.fq</code> and <code>unaligned_2.fq</code> respectively. Unless <a href="#bowtie-options-max"><code>--max</code></a> is also specified, reads with a number of valid alignments exceeding the limit set with the <a href="#bowtie-options-m"><code>-m</code></a> option are also written to <code><filename></code>.</p> </td> </tr> <tr> <td id="bowtie-options-max"> <pre><code>--max <filename></code></pre> </td> <td> <p>Write all reads with a number of valid alignments exceeding the limit set with the <a href="#bowtie-options-m"><code>-m</code></a> option to a file with name <code><filename></code>. Written reads will appear as they did in the input, without any of the trimming or translation of quality values that may have taken place within <code>bowtie</code>. Paired-end reads will be written to two parallel files with <code>_1</code> and <code>_2</code> inserted in the filename, e.g., if <code><filename></code> is <code>max.fq</code>, the #1 and #2 mates that exceed the <a href="#bowtie-options-m"><code>-m</code></a> limit will be written to <code>max_1.fq</code> and <code>max_2.fq</code> respectively. These reads are not written to the file specified with <a href="#bowtie-options-un"><code>--un</code></a>.</p> </td> </tr> <tr> <td id="bowtie-options-suppress"> <pre><code>--suppress <cols></code></pre> </td> <td> <p>Suppress columns of output in the <a href="#default-bowtie-output">default output mode</a>. E.g. if <code>--suppress 1,5,6</code> is specified, the read name, read sequence, and read quality fields will be omitted. See <a href="#default-bowtie-output">Default Bowtie output</a> for field descriptions. This option is ignored if the output mode is <a href="#bowtie-options-S"><code>-S</code>/<code>--sam</code></a>.</p> </td> </tr> <tr> <td id="bowtie-options-fullref"> <pre><code>--fullref</code></pre> </td> <td> <p>Print the full reference sequence name, including whitespace, in alignment output. By default <code>bowtie</code> prints everything up to but not including the first whitespace.</p> </td> </tr> </table> <h4 id="sam">SAM</h4> <table> <tr> <td id="bowtie-options-S"> <pre><code>-S/--sam</code></pre> </td> <td> <p>Print alignments in <a href="http://samtools.sourceforge.net/SAM1.pdf">SAM</a> format. See the <a href="#sam-bowtie-output">SAM output</a> section of the manual for details. To suppress all SAM headers, use <a href="#bowtie-options-sam-nohead"><code>--sam-nohead</code></a> in addition to <code>-S/--sam</code>. To suppress just the <code>@SQ</code> headers (e.g. if the alignment is against a very large number of reference sequences), use <a href="#bowtie-options-sam-nosq"><code>--sam-nosq</code></a> in addition to <code>-S/--sam</code>. <code>bowtie</code> does not write BAM files directly, but SAM output can be converted to BAM on the fly by piping <code>bowtie</code>’s output to <code>samtools view</code>.</p> </td> </tr> <tr> <td id="bowtie-options-mapq"> <pre><code>--mapq <int></code></pre> </td> <td> <p>If an alignment is non-repetitive (according to <a href="#bowtie-options-m"><code>-m</code></a>, <a href="#bowtie-options-strata"><code>--strata</code></a> and other options) set the <code>MAPQ</code> (mapping quality) field to this value. See the <a href="http://samtools.sourceforge.net/SAM1.pdf">SAM Spec</a> for details about the <code>MAPQ</code> field Default: 255.</p> </td> </tr> <tr> <td id="bowtie-options-sam-nohead"> <pre><code>--sam-nohead</code></pre> </td> <td> <p>Suppress header lines (starting with <code>@</code>) when output is <a href="#bowtie-options-S"><code>-S</code>/<code>--sam</code></a>. This must be specified <em>in addition to</em> <a href="#bowtie-options-S"><code>-S</code>/<code>--sam</code></a>. <code>--sam-nohead</code> is ignored unless <a href="#bowtie-options-S"><code>-S</code>/<code>--sam</code></a> is also specified.</p> </td> </tr> <tr> <td id="bowtie-options-sam-nosq"> <pre><code>--sam-nosq</code></pre> </td> <td> <p>Suppress <code>@SQ</code> header lines when output is <a href="#bowtie-options-S"><code>-S</code>/<code>--sam</code></a>. This must be specified <em>in addition to</em> <a href="#bowtie-options-S"><code>-S</code>/<code>--sam</code></a>. <code>--sam-nosq</code> is ignored unless <a href="#bowtie-options-S"><code>-S</code>/<code>--sam</code></a> is also specified.</p> </td> </tr> <tr> <td id="bowtie-options-sam-RG"> <pre><code>--sam-RG <text></code></pre> </td> <td> <p>Add <code><text></code> (usually of the form <code>TAG:VAL</code>, e.g. <code>ID:IL7LANE2</code>) as a field on the <code>@RG</code> header line. Specify <code>--sam-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. Note that, if any <code>@RG</code> fields are set using this option, the <code>ID</code> and <code>SM</code> fields must both be among them to make the <code>@RG</code> line legal according to the <a href="http://samtools.sourceforge.net/SAM1.pdf">SAM Spec</a>. <code>--sam-RG</code> is ignored unless <a href="#bowtie-options-S"><code>-S</code>/<code>--sam</code></a> is also specified.</p> </td> </tr> <tr> <td id="bowtie-options-no-unal"> <pre><code>--no-unal</code></pre> </td> <td> <p>Suppress SAM records for reads that failed to align.</p> </td> </tr> </table> <h4 id="performance">Performance</h4> <table> <tr> <td id="bowtie-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="bowtie-options-p"> <pre><code>-p/--threads <int></code></pre> </td> <td> <p>Launch <code><int></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 fairly close to linear.</p> </td> </tr> <tr> <td id="bowtie-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="#bowtie-options-p"><code>-p</code></a> is set greater than 1. Specifying <code>--reorder</code> and setting <a href="#bowtie-options-p"><code>-p</code></a> greater than 1 causes Bowtie to run somewhat slower than if <code>--reorder</code> were not specified. Has no effect if <a href="#bowtie-options-p"><code>-p</code></a> is set to 1, since output order will naturally correspond to input order in that case. It is an error to specify <code>--reorder</code> without the <a href="#bowtie-options-S"><code>-S</code></a> parameter. N.B. <code>--reorder</code> does not affect the outputs of <a href="#bowtie-options-al"><code>--al</code></a>/<a href="#bowtie-options-max"><code>--max</code></a>/<a href="#bowtie-options-un"><code>--un</code></a>.</p> </td> </tr> <tr> <td id="bowtie-options-mm"> <pre><code>--mm</code></pre> </td> <td> <p>Use memory-mapped I/O to load the index, rather than normal C file I/O. Memory-mapping the index 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="#bowtie-options-p"><code>-p</code></a> is not possible.</p> </td> </tr> <tr> <td id="bowtie-options-shmem"> <pre><code>--shmem</code></pre> </td> <td> <p>Use shared memory to load the index, rather than normal C file I/O. Using shared memory allows many concurrent bowtie 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="#bowtie-options-p"><code>-p</code></a> is not desirable. Unlike <a href="#bowtie-options-mm"><code>--mm</code></a>, <code>--shmem</code> installs the index into shared memory permanently, or until the user deletes the shared memory chunks manually. See your operating system documentation for details on how to manually list and remove shared memory chunks (on Linux and Mac OS X, these commands are <code>ipcs</code> and <code>ipcrm</code>). You may also need to increase your OS’s maximum shared-memory chunk size to accommodate larger indexes; see your OS documentation.</p> </td> </tr> </table> <h4 id="other">Other</h4> <table> <tr> <td id="bowtie-options-seed"> <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 id="bowtie-options-verbose"> <pre><code>--verbose</code></pre> </td> <td> <p>Print verbose output (for debugging).</p> </td> </tr> <tr> <td id="bowtie-options-version"> <pre><code>--version</code></pre> </td> <td> <p>Print version information and quit.</p> </td> </tr> <tr> <td id="bowtie-options-h"> <pre><code>-h/--help</code></pre> </td> <td> <p>Print usage information and quit.</p> </td> </tr> </table> <h2 id="default-bowtie-output">Default <code>bowtie</code> output</h2> <p><code>bowtie</code> outputs one alignment per line. Each line is a collection of 8 fields separated by tabs; from left to right, the fields are:</p> <ol type="1"> <li><p>Name of read that aligned.</p> <p>Note that the [SAM specification] disallows whitespace in the read name. If the read name contains any whitespace characters, Bowtie 2 will truncate the name at the first whitespace character. This is similar to the behavior of other tools.</p></li> <li><p>Reference strand aligned to, <code>+</code> for forward strand, <code>-</code> for reverse</p></li> <li><p>Name of reference sequence where alignment occurs, or numeric ID if no name was provided</p></li> <li><p>0-based offset into the forward reference strand where leftmost character of the alignment occurs</p></li> <li><p>Read sequence (reverse-complemented if orientation is <code>-</code>).</p></li> <li><p>ASCII-encoded read qualities (reversed if orientation is <code>-</code>). The encoded quality values are on the Phred scale and the encoding is ASCII-offset by 33 (ASCII char <code>!</code>).</p></li> <li><p>If <a href="#bowtie-options-m"><code>-M</code></a> was specified and the prescribed ceiling was exceeded for this read, this column contains the value of the ceiling, indicating that at least that many valid alignments were found in addition to the one reported.</p> <p>Otherwise, this column contains the number of other instances where the same sequence aligned against the same reference characters as were aligned against in the reported alignment. This is <em>not</em> the number of other places the read aligns with the same number of mismatches. The number in this column is generally not a good proxy for that number (e.g., the number in this column may be ‘0’ while the number of other alignments with the same number of mismatches might be large).</p></li> <li><p>Comma-separated list of mismatch descriptors. If there are no mismatches in the alignment, this field is empty. A single descriptor has the format offset:reference-base>read-base. The offset is expressed as a 0-based offset from the high-quality (5’) end of the read.</p></li> </ol> <h2 id="sam-bowtie-output">SAM <code>bowtie</code> 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>bowtie</code> when the <a href="#bowtie-options-S"><code>-S</code>/<code>--sam</code></a> option is specified. For more details, see the <a href="http://samtools.sourceforge.net/SAM1.pdf">SAM format specification</a>.</p> <p>When <a href="#bowtie-options-S"><code>-S</code>/<code>--sam</code></a> is specified, <code>bowtie</code> prints a SAM header with <code>@HD</code>, <code>@SQ</code> and <code>@PG</code> lines. When one or more <a href="#bowtie-options-sam-RG"><code>--sam-RG</code></a> arguments are specified, <code>bowtie</code> will also print an <code>@RG</code> line that includes all user-specified <a href="#bowtie-options-sam-RG"><code>--sam-RG</code></a> tokens separated by tabs.</p> <p>Each subsequent line corresponds to a read or an alignment. Each line is a collection of at least 12 fields separated by tabs; from left to right, the fields are:</p> <ol type="1"> <li><p>Name of read that aligned</p></li> <li><p>Sum of all applicable flags. Flags relevant to Bowtie 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 the first (#1) mate in a pair</p> </td> </tr> <tr> <td> <pre><code>128</code></pre> </td> <td> <p>The read is the second (#2) mate 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, or ordinal ID if no name was provided</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 insert size. Size is negative if the mate’s alignment occurs upstream of this alignment. Size is 0 if there is no mate.</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/FASTQ_format#Variations">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. For descriptions of all possible optional fields, see the SAM format specification. <code>bowtie</code> outputs some of these optional fields for each alignment, depending on the type of the alignment:</p></li> </ol> <table> <tr> <td> <pre><code> MD:Z:<S></code></pre> </td> <td> <p>For aligned reads, <code><S></code> is 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.</p> </td> </tr> <tr> <td> <pre><code> XA:i:<N></code></pre> </td> <td> <p>Aligned read belongs to stratum <code><N></code>. See <a href="#strata">Strata</a> for definition.</p> </td> </tr> <tr> <td> <pre><code> XM:i:<N></code></pre> </td> <td> <p>For a read with no reported alignments, <code><N></code> is 0 if the read had no alignments. If <a href="#bowtie-options-m"><code>-m</code></a> was specified and the read’s alignments were suppressed because the <a href="#bowtie-options-m"><code>-m</code></a> ceiling was exceeded, <code><N></code> equals the <a href="#bowtie-options-m"><code>-m</code></a> ceiling + 1, to indicate that there were at least that many valid alignments (but all were suppressed). In <a href="#bowtie-options-m"><code>-M</code></a> mode, if the alignment was randomly selected because the <a href="#bowtie-options-m"><code>-M</code></a> ceiling was exceeded, <code><N></code> equals the <a href="#bowtie-options-m"><code>-M</code></a> ceiling + 1, to indicate that there were at least that many valid alignments (of which one was reported at random).</p> </td> </tr> </table> <h1 id="the-bowtie-build-indexer">The <code>bowtie-build</code> indexer</h1> <p><code>bowtie-build</code> builds a Bowtie index from a set of DNA sequences. <code>bowtie-build</code> outputs a set of 6 files with suffixes <code>.1.ebwt</code>, <code>.2.ebwt</code>, <code>.3.ebwt</code>, <code>.4.ebwt</code>, <code>.rev.1.ebwt</code>, and <code>.rev.2.ebwt</code>. (If the total length of all the input sequences is greater than about 4 billion, then the index files will end in <code>ebwtl</code> instead of <code>ebwt</code>.) These files together constitute the index: they are all that is needed to align reads to that reference. The original sequence files are no longer used by Bowtie 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>bowtie-build</code> to trade off between running time and memory usage. <code>bowtie-build</code> has three options governing how it makes this trade: <a href="#bowtie-build-options-p"><code>-p</code>/<code>--packed</code></a>, <a href="#bowtie-build-options-bmax"><code>--bmax</code></a>/<a href="#bowtie-build-options-bmaxdivn"><code>--bmaxdivn</code></a>, and <a href="#bowtie-build-options-dcv"><code>--dcv</code></a>. By default, <code>bowtie-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="#bowtie-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="#bowtie-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://portal.acm.org/citation.cfm?id=796543">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>The Bowtie index is based on the <a href="http://portal.acm.org/citation.cfm?id=796543">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>bowtie-build [options]* <reference_in> <ebwt_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="#bowtie-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="#bowtie-build-options-c"><code>-c</code></a> is specified, this might be <code>GGTCATCCT,ACGGGTCGT,CCGTTCTATGCGGCTTA</code>.</p> </td> </tr> <tr> <td> <pre><code><ebwt_base></code></pre> </td> <td> <p>The basename of the index files to write. By default, <code>bowtie-build</code> writes files named <code>NAME.1.ebwt</code>, <code>NAME.2.ebwt</code>, <code>NAME.3.ebwt</code>, <code>NAME.4.ebwt</code>, <code>NAME.rev.1.ebwt</code>, and <code>NAME.rev.2.ebwt</code>, where <code>NAME</code> is <code><ebwt_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="bowtie-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> <tr> <td id="bowtie-build-options-a"> <pre><code>-a/--noauto</code></pre> </td> <td> <p>Disable the default behavior whereby <code>bowtie-build</code> automatically selects values for the <a href="#bowtie-build-options-bmax"><code>--bmax</code></a>, <a href="#bowtie-build-options-dcv"><code>--dcv</code></a> and <a href="#bowtie-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="bowtie-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="#bowtie-build-options-a"><code>-a</code>/<code>--noauto</code></a> to configure manually.</p> </td> </tr> <tr> <td id="bowtie-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="#bowtie-build-options-bmax"><code>--bmax</code></a>, or <a href="#bowtie-build-options-bmaxdivn"><code>--bmaxdivn</code></a>. Default (in terms of the <a href="#bowtie-build-options-bmaxdivn"><code>--bmaxdivn</code></a> parameter) is <a href="#bowtie-build-options-bmaxdivn"><code>--bmaxdivn</code></a> 4 * <a href="#bowtie-build-options-threads"><code>--threads</code></a>. This is configured automatically by default; use <a href="#bowtie-build-options-a"><code>-a</code>/<code>--noauto</code></a> to configure manually.</p> </td> </tr> <tr> <td id="bowtie-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="#bowtie-build-options-bmax"><code>--bmax</code></a>, or <a href="#bowtie-build-options-bmaxdivn"><code>--bmaxdivn</code></a>. Default: <a href="#bowtie-build-options-bmaxdivn"><code>--bmaxdivn</code></a> 4. This is configured automatically by default; use <a href="#bowtie-build-options-a"><code>-a</code>/<code>--noauto</code></a> to configure manually.</p> </td> </tr> <tr> <td id="bowtie-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="#bowtie-build-options-a"><code>-a</code>/<code>--noauto</code></a> to configure manually.</p> </td> </tr> <tr> <td id="bowtie-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.ebwt</code> and <code>NAME.4.ebwt</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 <em>only</em> the <code>NAME.3.ebwt</code> and <code>NAME.4.ebwt</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="bowtie-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="#bowtie-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 5 (every 32nd row is marked; for human genome, annotations occupy about 340 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="bowtie-build-options-threads"> <pre><code>--threads <int></code></pre> </td> <td> <p>Launch <code><int></code> parallel index building threads (default: 1). Index building is only partly parallelizable, so expect to see average CPU utilization less than <code><int></code> at some times. This option is only available if linked against a multithreading library.</p> </td> </tr> <tr> <td id="bowtie-build-options-ntoa"> <pre><code>--ntoa</code></pre> </td> <td> <p>Convert Ns in the reference sequence to As before building the index. By default, Ns are simply excluded from the index and <code>bowtie</code> will not report alignments that overlap them.</p> </td> </tr> <tr> <td id="bowtie-build-options-big-little"> <pre><code>--big --little</code></pre> </td> <td> <p>Endianness to use when serializing integers to the index file. Default: little-endian (recommended for Intel- and AMD-based architectures).</p> </td> </tr> <tr> <td id="bowtie-build-options-seed"> <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>-q/--quiet</code></pre> </td> <td> <p><code>bowtie-build</code> is verbose by default. With this option <code>bowtie-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-bowtie-inspect-index-inspector">The <code>bowtie-inspect</code> index inspector</h1> <p><code>bowtie-inspect</code> extracts information from a Bowtie 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="#bowtie-build-options-n"><code>-n</code>/<code>--names</code></a> option or a more verbose summary using the <a href="#bowtie-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>bowtie-inspect [options]* <ebwt_base></code></pre> <h3 id="main-arguments-2">Main arguments</h3> <table> <tr> <td> <pre><code><ebwt_base></code></pre> </td> <td> <p>The basename of the Bowtie or Bowtie 2 index to be inspected. The basename is name of any of the index files but with the <code>.X.ebwt</code> / <code>.rev.X.ebwt</code> / <code>1.bt2</code>, etc, suffix omitted. <code>bowtie-inspect</code> first looks in the current directory for the index files, then looks in the <code>indexes</code> subdirectory under the directory where the currently-running <code>bowtie</code> executable is located, then looks in the directory specified in the <code>BOWTIE_INDEXES</code> environment variable. If a Bowtie and Bowtie 2 index are located in the same directory and share the same basename, <code>bowtie-inspect</code> will use the Bowtie 2 index.</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="bowtie-build-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="bowtie-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>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.</p> </td> </tr> <tr> <td id="bowtie-inspect-options-e"> <pre><code>-e/--ebwt-ref</code></pre> </td> <td> <p>By default, when <code>bowtie-inspect</code> is run without <a href="#bowtie-options-S"><code>-s</code></a> or <a href="#bowtie-options-n"><code>-n</code></a>, it recreates the reference nucleotide sequences using the bit-encoded reference nucleotides kept in the <code>.3.ebwt</code> and <code>.4.ebwt</code> index files. When <code>-e/--ebwt-ref</code> is specified, <code>bowtie-inspect</code> recreates the reference sequences from the Burrows-Wheeler-transformed reference sequence in the <code>.1.ebwt</code> file instead. The reference recreation process is much slower when <code>-e/--ebwt-ref</code> is specified.</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> </div> </div> <div id="footer"> <table width="100%" cellspacing=15><tr><td> This research was supported in part by NIH grants R01-LM006845, R01-GM083873 and P41HG004059. </td></tr> </table> <center><a href="http://www.sourceforge.net"><img src="./images/sflogo.png" alt="Sourceforge.net" style="border-style: none"></img></a></center> </div> </div> <!-- Google analytics code --> <script type="text/javascript"> var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); </script> <script type="text/javascript"> var pageTracker = _gat._getTracker("UA-5334290-1"); pageTracker._trackPageview(); </script> <!-- End google analytics code --> </body> </html>