macでインフォマティクス

macでインフォマティクス

HTS (NGS) 関連のインフォマティクス情報についてまとめています。

マルチマッピングを補正する MMR

 

 ハイスループットシーケンシングデータのリファレンス配列への迅速かつ正確なマッピングの必要性に対処するために、過去数年間に多くの異なるソフトウェアツールが開発されてきており、その多くは頻繁に更新および改良されている(論文より Dobin et al、2013; Jean et et al、2010; Kim et al、2013; Li and Durbin、2009)。開発者は、RNAシーケンシングデータのスプライスアライメントのため、ギャップおよびミスマッチなど考慮するなど多くの課題に対処してきたが、一般的なアライメントツールの多くではあいまいなリードのマッピング問題が解決されていない。リード長、アライメント感度、リピートなどの要因に応じて、リードの大部分はターゲットにユニークにアライメントされ、正確に1つのマッピング位置が報告される。しかし、残りの、依然として非常に大きな割合のリード(アラインメント感度にもよるが、≒10-20%)で複数のマッピング可能なポジションが存在する。現在のところ、下流の分析では、これらのリードに対処するために異なる戦略が採用されている。そのほとんどは不都合なサイドエフェクトを伴う。アライメント結果からあいまいなアラインメントを破棄すると、あいまいなマッピングを伴うゲノム領域の定量を過小に評価することになる。一方ランダムアライメントまたはすべてのアライメントに均一にウエイトを分配するのは適切な生物学的正当性を持たない。著者らは、論文補足セクションA.5で、関連するアプローチ(Hashimoto et al。、2009; Li et al。、2010; Mortazavi et al。、2008; Wang et al。、2010; Zhang et al。、2013)の簡潔なレビューを記す 。

 ここでは、multi-mapper resolution (MMR)ツールと呼ばれるシンプルで強力なツールを紹介する。このツールは、ゲノム全体のリードのカバレッジができるだけ均一になるように各リードをユニークなマッピング位置にアサインする。 MMRは、ゲノム全体のカバレッジができる限り均一になるように、あいまいなマッピングになったリードのアライメントを繰り返し選ぶ。 MMR開発の動機は、転写物の定量および予測を改善するよう、RNA-Seqアラインメントの後処理を行うことである。MMRがDNA-Seqアライメントの後処理にも適用可能であることを示す。

 

公式ページ

http://www.raetschlab.org/suppl/MMR

原理

f:id:kazumaxneo:20180609193854j:plain

 

論文では、スピアマンの順位相関係数を使い、補正後のbamのほうがよりground truthとの正の相関がより高いことを示している。51-bpのベリーショートリードを使っているが、これはあいまいなマッピングがより起こりやすい条件でテストしているためと考えられる。

 

インストール

cent os6でテストした。

依存

  • samtools (最近のsamtoolsでは動かなかったが、0.1.19では動作した)

本体 Github

https://github.com/ratschlab/mmr

git clone https://github.com/ratschlab/mmr.git
cd mmr/
make

./mmr

$ ./mmr

Usage:

./mmr -o OUTFILE [options] IN_BAM

 

Available Options:

 

 

Input handling and paralellization:

-P --parse-complete parse complete file into memory [off]

-t --threads number of threads to use (must be > 2) [1]

-S --strand-specific alignments are strand specific [off]

-C --init-secondary  choose initial alignment also from secondary lines (flag 256) [off]

  --no-sort-check  input files are not checked to be sorted by read ID [off]

 

Input file filtering:

-f --pre-filter-off switch off pre filter for alignments that have F more edit ops than the best [on]

-F --filter-dist [INT] filter distance F for pre-filter [1]

-V --use-variants use variant alignments for filtering (different edit op count,

requires XG and XM Tag in alignment files) [off]

-L --max-list-length [INT] max length of alignment list per read (after filtering) [1000]

-r --trim-id trim this many positions from the end of each read ID [0]

 

Paired alignment handling:

-p --pair-usage pre use pair information in the reads [off]

-i --max-fragment-size upper limit of GENOMIC fragment length [1 000 000]

-A --max-pair-list-length [INT] max no of valid pairs before not using pair modus [10000]

 

Output handling:

-b --best-only print only best alignment [off]

-u --keep-unmapped print unmapped reads from input [off]

 

Options for using the variance optimization:

-w --windowsize  [INT] size of coverage window around read [20]

-I --iterations  [INT] number of iterations to smooth the coverage [5]

-a --annotation annotation file in GTF format to infer segment boundaries

-B --burn-in use the first iteration to fill coverage map only [off]

 

Options for using the MiTie objective for smoothing:

-m --mitie-objective use objective from MiTie instead of local variance [off]

-s --segmentfile MiTie segment file required for MiTie optimization

-l --lossfile MiTie loss parameter file required for MiTie optimization []

-R --read-len  [INT] average length of the reads [75]

-M --mitie-variance use variance smoothing for regions with no MiTie prediction [off]

-z --zero-expect-unpred initializes all covered but not predicted positions with expectation 0.0 [off]

 

General:

-v --verbose switch on verbose output [off]

-h --help print usage info

 

 

ラン

テストラン。

make test

 example/で以下のコマンドが走っている。

mmr -F 0 -b -v -o example_file_small.ID_sorted.mmr.bam example_file_small.ID_sorted.bam
  • -F    filter distance F for pre-filter [1]
  • -b    print only best alignment [off]
  • -v    switch on verbose output [off]

終わると example_file_small.ID_sorted.mmr.bam が出力される。同様に"make bigtest"でラージbamをつかったテストができる。

 

論文ではRNA seqのほか、カバレッジの高いExomeシーケンス、ラージゲノムのDNAシーケンスで大きな効果があるだろうとまとめている。

 

新しいsamtoolsでは動作しません。注意してください。  

引用

MMR: a tool for read multi-mapper resolution

André Kahles, Jonas Behr, Gunnar Rätsch

Bioinformatics. 2016 Mar 1; 32(5): 770–772.