Create bowtie2 index

Bowtie2 software tool

How to create a bowtie2 index database of multiple genomes?

Example of creating a bowtie2-index based on E. coli reference genomes.

# Merge all E. coli reference genomes into one genomes.fna file

cat ref_genomes/ecoli/*.fna > genomes.fna

# create bowtie2 index database (database name: ecoli)

bowtie2-build genomes.fna ecoli

# result: 6 .bt2 database files

ls

ecoli.1.bt2

ecoli.2.bt2

ecoli.3.bt2

ecoli.4.bt2

ecoli.rev.1.bt2

ecoli.rev.2.bt2

# use 'inspect' to check the content of your database

bowtie2-inspect -n ecoli

# define your BOWTIE2_INDEXES directory and move the database files into it

export BOWTIE2_INDEXES=/path/to/my/bowtie2/databases/

cp *.bt2 $BOWTIE2_INDEXES

# bowtie2 mapping: database is defined by option -x

bowtie2 -x ecoli ...

http://bowtie-bio.sourceforge.net/bowtie2/manual.shtml#the-bowtie2-build-indexer

Next

→ Bowtie2 mapping