{"id":2092,"date":"2019-01-21T15:17:56","date_gmt":"2019-01-21T15:17:56","guid":{"rendered":"http:\/\/ri.itservices.manchester.ac.uk\/csf3\/?page_id=2092"},"modified":"2025-09-10T09:41:50","modified_gmt":"2025-09-10T08:41:50","slug":"bowtie2","status":"publish","type":"page","link":"https:\/\/ri.itservices.manchester.ac.uk\/csf3\/software\/applications\/bowtie2\/","title":{"rendered":"Bowtie2"},"content":{"rendered":"<h2>Overview<\/h2>\n<p><a href=\"http:\/\/bowtie-bio.sourceforge.net\/bowtie2\/\">Bowtie2<\/a> is an ultrafast and memory-efficient tool for aligning sequencing reads to long reference sequences. It is particularly good at aligning reads of about 50 up to 100s or 1,000s of characters to relatively long (e.g. mammalian) genomes.<\/p>\n<p>Bowtie 2 is not a &#8220;drop-in&#8221; replacement for <a href=\"\/csf-apps\/software\/applications\/bowtie\/\">Bowtie 1<\/a>. Bowtie 2&#8217;s command-line arguments and genome index format are both different from Bowtie 1&#8217;s. See the section in the bowtie2 manual on <a href=\"http:\/\/bowtie-bio.sourceforge.net\/bowtie2\/manual.shtml#how-is-bowtie-2-different-from-bowtie-1\">how they differ<\/a>.<\/p>\n<h2>Restrictions on use<\/h2>\n<p>All users may access and use Bowtie. The software is open source using the GPL3 license. Users should consult the following file for further information:<\/p>\n<pre>$BOWTIE2_HOME\/LICENSE<\/pre>\n<p>For citation information see the <a href=\"http:\/\/bowtie-bio.sourceforge.net\/bowtie2\/index.shtml\">Bowtie2 website<\/a>.<\/p>\n<h2>Set up procedure<\/h2>\n<p>Please load <em>one<\/em> of the following modulefiles &#8211; we recommend doing this in your jobscript:<\/p>\n<pre>\r\nmodule load apps\/binapps\/bowtie2\/2.5.4\r\nmodule load apps\/binapps\/bowtie2\/2.4.1\r\n<\/pre>\n<p>The previous version required two commands:<\/p>\n<pre>module load apps\/bioinf libs\/gcc\/system\r\nmodule load apps\/bowtie2\/2.2.6\/gcc-4.8.5<\/pre>\n<p>Indexes &#8211; for both versions no pre-built indexes have been installed. Users should download and build their own indexes and set the variable <code>BOWTIE2_INDEXES<\/code> on the command line or in .bashrc . For example, in your scratch area:<\/p>\n<pre>export BOWTIE2_INDEXES=$HOME\/scratch\/my_indexes<\/pre>\n<h2>Running the application<\/h2>\n<p>Please do not run bowtie2 commands on the login node. qrsh is recommended for some commands. Computationally intense work should be done via the batch system.<\/p>\n<h3>Examples<\/h3>\n<p>The following example first runs <code>bowtie2-build<\/code> as a serial job. We then run <code>bowtie2<\/code> using multi-core processing.<\/p>\n<p>To create an index for the Lambda phage reference genome included with Bowtie 2, create a jobscript containing:<\/p>\n<pre class=\"slurm\">\r\n#!\/bin\/bash --login\r\n#SBATCH -p serial     # (or --partition=) 1-core job\r\n#SBATCH -t 4-0        # 4-day wallclock (max permitted is 7 days)\r\n\r\n# Start with a clean environment in Slurm\r\nmodule purge\r\nmodule load apps\/binapps\/bowtie2\/2.4.1\r\n\r\nbowtie2-build $BOWTIE2_HOME\/example\/reference\/lambda_virus.fa lambda_virus\r\n<\/pre>\n<p>and submit the job using <code>sbatch <em>jobscript<\/em><\/code> where jobscript is the name of your job script file.<\/p>\n<p>Now create a jobscript to run the Bowtie 2 aligner (<code>bowtie2<\/code>), which aligns a set of unpaired reads to the Lambda phage reference genome using the index generated in the previous step. We run this with multiple threads.<\/p>\n<pre class=\"slurm\">\r\n#!\/bin\/bash --login\r\n#SBATCH -p multicore     # (or --partition=) Use the AMD 168-core nodes\r\n#SBATCH -n 8             # (or --ntasks=) Run in parallel with 8 threads (max is 168 in multicore)\r\n#SBATCH -t 2-0           # 2-day wallclock (7-0 is max permitted)\r\n\r\n# Start with a clean environment in Slurm\r\nmodule purge\r\nmodule load apps\/binapps\/bowtie2\/2.4.1\r\n\r\n# Use -p $SLURM_NTASKS to tell bowtie2 to use the number of threads requested above\r\nbowtie2 -p $SLURM_NTASKS -x lambda_virus -U $BOWTIE2_HOME\/example\/reads\/reads_1.fq -S eg1.sam\r\n<\/pre>\n<p>and submit the job using <code>sbatch <em>jobscript<\/em><\/code> where jobscript is the name of your job script file.<\/p>\n<p>To view the first few lines of the output file use<\/p>\n<pre>head eg1.sam<\/pre>\n<h2>Further info<\/h2>\n<ul>\n<li><a href=\"http:\/\/bowtie-bio.sourceforge.net\/bowtie2\/manual.shtml\">Bowtie 2 Manual<\/a><\/li>\n<li>Related applications available on the CSF:\n<ul>\n<li><a href=\"\/csf-apps\/software\/applications\/bowtie\">Bowtie<\/a><\/li>\n<li><a href=\"\/csf-apps\/software\/applications\/cufflinks\">Cufflinks<\/a><\/li>\n<li><a href=\"\/csf3\/software\/applications\/samtools\/\">Samtools<\/a><\/li>\n<li><a href=\"\/csf-apps\/software\/applications\/tophat\">Tophat<\/a><\/li>\n<\/ul>\n<\/li>\n<li>Panagiotis Papastamoulis, from FLS, has very kindly provided some documentaion illustrating <a href=\"http:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/wp-content\/uploads\/cufflinksExample.pdf\">how to use Cufflinks on the CSF<\/a> which includes some Bowtie2 examples.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Overview Bowtie2 is an ultrafast and memory-efficient tool for aligning sequencing reads to long reference sequences. It is particularly good at aligning reads of about 50 up to 100s or 1,000s of characters to relatively long (e.g. mammalian) genomes. Bowtie 2 is not a &#8220;drop-in&#8221; replacement for Bowtie 1. Bowtie 2&#8217;s command-line arguments and genome index format are both different from Bowtie 1&#8217;s. See the section in the bowtie2 manual on how they differ. Restrictions.. <a href=\"https:\/\/ri.itservices.manchester.ac.uk\/csf3\/software\/applications\/bowtie2\/\">Read more &raquo;<\/a><\/p>\n","protected":false},"author":7,"featured_media":0,"parent":86,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-2092","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf3\/wp-json\/wp\/v2\/pages\/2092","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf3\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf3\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf3\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf3\/wp-json\/wp\/v2\/comments?post=2092"}],"version-history":[{"count":20,"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf3\/wp-json\/wp\/v2\/pages\/2092\/revisions"}],"predecessor-version":[{"id":10914,"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf3\/wp-json\/wp\/v2\/pages\/2092\/revisions\/10914"}],"up":[{"embeddable":true,"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf3\/wp-json\/wp\/v2\/pages\/86"}],"wp:attachment":[{"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf3\/wp-json\/wp\/v2\/media?parent=2092"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}