Previously I ran mapping by Hisat2, and did view it by IGV
- Sequencing: Run mapping - Another Japan in the World
- Sequencing: view mapped genome on IGV (Integrative Genomics Viewer) - Another Japan in the World
This time, I try to do mapping by another tool Bowtie2. It seems that Bowtie2 has simpler functions than Hisat2.
At first, see Bowtie2's official web site . The source code on Github is here .
The installation is easy on Mac. I might introduce it before.
$ brew install bowtie2
Prepare index file.
To do mapping by Bowtie2, the index file for the reference genome is necessary.
The file can be created by
bowtie2-build command from the raw reference genome file .
But this time, just download the file from the Bowtie2 official web site .
Go to . Then right side Indexes section "H. sapiens, UCSC hg19", click or copy the linked URL.
$ wget ftp://ftp.ccb.jhu.edu/pub/data/bowtie2_indexes/hg19.zip $ unzip hg19.zip $ mkdir hg19 $ mv <extracted_files> hg19/
The files are like this.
$ ls /Users/jun.aruga/doc/dev/bio/reference_genome/hg19/hg19* /Users/jun.aruga/doc/dev/bio/reference_genome/hg19/hg19.1.bt2 /Users/jun.aruga/doc/dev/bio/reference_genome/hg19/hg19.2.bt2 /Users/jun.aruga/doc/dev/bio/reference_genome/hg19/hg19.3.bt2 /Users/jun.aruga/doc/dev/bio/reference_genome/hg19/hg19.4.bt2 /Users/jun.aruga/doc/dev/bio/reference_genome/hg19/hg19.rev.1.bt2 /Users/jun.aruga/doc/dev/bio/reference_genome/hg19/hg19.rev.2.bt2
$ cd /path/to/read_files_directory $ mkdir bowtie2_out
Then run mapping. The command line options are same with Hisat2.
$ bowtie2 -x /Users/jun.aruga/doc/dev/bio/reference_genome/hg19/hg19 -1 SRR747784_1_val_1.fq -2 SRR747784_2_val_2.fq -S bowtie2_out/SRR747784.sam 847491 reads; of these: 847491 (100.00%) were paired; of these: 48974 (5.78%) aligned concordantly 0 times 714077 (84.26%) aligned concordantly exactly 1 time 84440 (9.96%) aligned concordantly >1 times ---- 48974 pairs aligned concordantly 0 times; of these: 451 (0.92%) aligned discordantly 1 time ---- 48523 pairs aligned 0 times concordantly or discordantly; of these: 97046 mates make up the pairs; of these: 90541 (93.30%) aligned 0 times 3201 (3.30%) aligned exactly 1 time 3304 (3.40%) aligned >1 times 94.66% overall alignment rate
View the outputted sam file
Menu: Tools -> Run igvtools
Command: Sort Input file: SRR747784.bam Output file: SRR747784.sorted.sam
Command: Index Input file: SRR747784.sorted.sam
=> SRR747784.sorted.bam.sai is created.
Menu: File -> Load from file Specify SRR747784.sorted.sam.