RapMapはRNAのアライナー。非常に高速で、ほかのツールと比較すると、Bowtie2より数十倍高速で、高速なSTARと比べても2倍以上高速にアライメントできる(Figure2参照)。アライメントが 具体的には7500万のリードをヒトトランスクリプトームに10分程度でアライメントできるとされる(シングルコア使用時)。アライメント精度の指標となるrecallやprecisionは他のRNAのアライナーKallisto、STAR、Bowiteと同程度となっている。
インストール
ビルドにCMakeが必要。なければbrewで導入しておく。
https://github.com/COMBINE-lab/RapMap
ダウンロードしてビルドする。
git clone https://github.com/COMBINE-lab/RapMap.git
cd RapMap/
mkdir build && cd build
cmake ..
make
make install
cd ../bin
./rapmap -h
> ./rapmap -h
$ ./rapmap -h
RapMap Transcriptome Aligner v0.5.0
=====================================
There are currently 4 RapMap subcommands
pseudoindex --- builds a k-mer-based index
pseudomap --- map reads using a k-mer-based index
quasiindex --- builds a suffix array-based (SA) index
quasimap --- map reads using the SA-based index
Run a corresponding command "rapmap <cmd> -h" for
more information on each of the possible RapMap
commands.
パスを通しておく。
ラン
1、 indexの作成。
rapmap quasiindex -t ref.fa -i ref_index
hashサイズを最小にしてメモリ使用量を削減する。
rapmap quasiindex -t ref.fa -i ref_index -p -x 4
- -p enables the minimum perfect hash
- -x <INT> tells RapMap to use up to <int> threads when building the perfect hash
2、ペアードエンドのマッピング(samtolsにパイプしてbam出力している)。
rapmap quasimap -i ref_index -1 <(gunzip -c r1.fq.gz) -2 <(gunzip -c r2.fq.gz) -t 8 -o mapped_reads.sam | samtools view -Sb -@ 4 - > mapped_reads.bam
シングルエンドは"-1、-2"の代わりに"-r"で指定します。リード数が数百万だと本当に動作しているのか不安になるほど短い時間でアライメントを完了します。indexの作成にかかる時間もSTARよりずっと短くて済むため、トータルで考えると、STARよりずっと短時間でアライメントできます。"laptop"のマッパーというプログラム名に偽りなしです。
アライメントの感度と精度については、私のデータではbowtieと同じぐらいでした。
引用
RapMap: a rapid, sensitive and accurate tool for mapping RNA-seq reads to transcriptomes.
Srivastava A, Sarkar H, Gupta N, Patro R.
Bioinformatics. 2016 Jun 15;32(12):i192-i200.