macでインフォマティクス

macでインフォマティクス

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

複数のSVコーラーを動かし、結果を統合する Parliament2

2018 10/26 エラー修正

2018 10/28 エラー修正

2019 3/2 追記

2019 6/11 twitter追記

2019 7/1 dockerインストールをlatestタグに修正=>エラーがあったため0.1.17に戻した

2019 12/18 説明微修正

2020 12/22 論文引用

 

 構造変異(SV)は、ゲノムの大きな(50bp+)変異である[論文より ref.1,2]。これらのバリエーションは、個々のショート・リードのサイズに近いか、最も頻繁には、リードより大きいため、ショート・リード・データで直接検出することは難しく、スプリット・リード・マッピング、ソフト・クリッピング、リードペアの距離と方向の変化、カバレッジデプス変化、またはヘテロ接合性の変化[ref.3]によって推測される。 SNPおよびIndelの検出精度は99.9%を超えるが、、Genome in a Bottle [ref.5] (GIAB HP)の最近のベンチマークセットによると、SVパイプラインの精度は著しく低い。

 Breakdancer [ref.6]、CNVnator [ref.7]、Crest [ref.8]、Delly [ref.9] Lumpy [ref.10]、Manta [ref.11]、Pindel [ref.12]などのさまざまなSVコーラーは、様々なheuristicsを利用して、マップされたリードの信号を読み取り構造変化を推測する。これらツールのアプローチの多様性により、SVの検出感度がSVタイプのバリエーション(たとえば、 DEL(DEL)、INS(INS)、DUPDUP)、INV(INVA)、TRA(Translocation)やサイズにより変化する。
 アプローチとドメインパフォーマンスのこの多様性は、アンサンブル戦略を魅力的にする。 2つの方法:MetaSV [ref.13](紹介)とParliament1 [ref.14]は、3段階オーバーラップ - マージ -戦略を使用して複数のコーラー結果から高品質のコンセンサスセットに結合する。 MetaSVとParliament1の両方は、検証ステップにアセンブリベースの方法を使用している。これはParliament1では非常に正確だが、計算量が多く、イベントの最大サイズが制限されている。 MetaSVとParliament1は、すでに生成されたSVバリアントコールから開始するため、個々のSVコーラーをインストールして実行する負担をユーザに負わせている。
 ここでは、調整可能な感度と特異性を維持し1万人のWGSコホートスケールにSVコールを経済的に拡張するために設計されたParliament2(Parliament1の改良版)を提示する。 Parliament2を使用すると、Breakdancer、Breakseq、CNVnator、Delly、Lumpy、Manta(SV検出ツール紹介Manta紹介)の一部またはすべてを実行してコールを生成できる。 SURVIVOR [ref.15](紹介)を使用して、これらのオーバーラップがあるコーからコンセンサスコールを生成する。 SVTyper [ref.16](紹介)を使用してこれらのコールを検証する。
 Parliament2は、CPU、ディスクI / O、および各プログラムが所与の時間に持つRAMのさまざまな要件を利用して、コール元を同時に実行するためのさまざまな並列化戦略を使用する。これによりParliament2は、最も遅いコーラーであるCNVnatorとほぼ同じウォールクロックとCPU時間ですべてのコーラーの解析を完了させることができる。 16コアマシンならば、2〜5時間で35X Whole Genome Sequence(WGS)サンプルを処理できる。 Parliament2は、個々のコーラーのraw resultと、サポートされているすべてのコーラーの遺伝子型コンセンサスVCFの両方を生成する。
Parliament2はオープンソースであり、コードベースとしても、またはすべてのコーラーを単一、または複数で簡単に実行できるDockerイメージとしても利用できる。Parliament2は、DNAnexus上で公開されているアプリケーションである。これにより、必要に応じて個々のコンポーネントだけを実行することもできる。さらに、Parliament2は容易に拡張可能で、ユーザーはツールを実行してParliament2の高速実行を開始できる。オプションで、SVVIZ [ref.17](紹介)を使用してSVのPDFイメージを提供することもできる。


2018年10月現在、Preprintが発表されています。first authorとsecond authorはDNAnexus社 (wiki) の研究者の方です(*6)。

 

アナウンス

https://blog.dnanexus.com/2018-09-24-parliament2-fast-structural-variant-calling/

 

f:id:kazumaxneo:20181025203908j:plain

Parliament2のワークフロー。各ツールを並列で走らせた後、SURVIVORで統合し、SVtyperでgenotypingを行う(上は順番が逆?)。最後にsvvizを使ってSVイベント領域のリードを可視化する。アナウンスのHPより転載。

 

Parliament2に関するツイート

 

2019 6/11 twitter追記

 

インストール

dockerのubuntu16.04にてテストした(ホストOSはmac os10.12)。

本体 Github

dockerイメージをpullして使う(buildするとエラーが出た)。

git clone https://github.com/dnanexus/parliament2.git
cd parliament2/
dokcer build -t parliament2 .

#またはpullする(tag link)
#0.1.17
docker pull dnanexus/parliament2:0.1.7

#latest
docker pull dnanexus/parliament2:latest

> docker run -it dnanexus/parliament2:0.1.7 -h

$ docker run -it dnanexus/parliament2:0.1.8 -h

flag needs an argument: 'h' in -h

See 'docker run --help'.

——

user~/Desktop/6803T1_all_tools_referebce_GT-S: $ docker run -it ccb464d859a8 -h

usage: parliament2.py [-h] --bam BAM [--bai BAI] -r REF_GENOME [--fai FAI]

                      [--prefix PREFIX] [--filter_short_contigs]

                      [--breakdancer] [--breakseq] [--manta] [--cnvnator]

                      [--lumpy] [--delly_deletion] [--delly_insertion]

                      [--delly_inversion] [--delly_duplication] [--genotype]

                      [--svviz] [--svviz_only_validated_candidates]

 

Parliament2

 

optional arguments:

  -h, --help            show this help message and exit

  --bam BAM             The name of the Illumina BAM file for which to call

                        structural variants containing mapped reads.

  --bai BAI             (Optional) The name of the corresponding index for the

                        Illumina BAM file.

  -r REF_GENOME, --ref_genome REF_GENOME

                        The name of the reference file that matches the

                        reference used to map the Illumina inputs.

  --fai FAI             (Optional) The name of the corresponding index for the

                        reference genome file.

  --prefix PREFIX       (Optional) If provided, all output files will start

                        with this. If absent, the base of the BAM file name

                        will be used.

  --filter_short_contigs

                        If selected, SV calls will not be generated on contigs

                        shorter than 1 MB.

  --breakdancer         If selected, the program Breakdancer will be one of

                        the SV callers run.

  --breakseq            If selected, the program BreakSeq2 will be one of the

                        SV callers run.

  --manta               If selected, the program Manta will be one of the SV

                        callers run.

  --cnvnator            If selected, the program CNVnator will be one of the

                        SV callers run.

  --lumpy               If selected, the program Lumpy will be one of the SV

                        callers run.

  --delly_deletion      If selected, the deletion module of the program Delly2

                        will be one of the SV callers run.

  --delly_insertion     If selected, the insertion module of the program

                        Delly2 will be one of the SV callers run.

  --delly_inversion     If selected, the inversion module of the program

                        Delly2 will be one of the SV callers run.

  --delly_duplication   If selected, the duplication module of the program

                        Delly2 will be one of the SV callers run.

  --genotype            If selected, candidate events determined from the

                        individual callers will be genotyped and merged to

                        create a consensus output.

  --svviz               If selected, visualizations of genotyped SV events

                        will be produced with SVVIZ, one screenshot of support

                        per event. For this option to take effect, Genotype

                        must be selected.

  --svviz_only_validated_candidates

                        Run SVVIZ only on validated candidates? For this

                        option to be relevant, SVVIZ must be selected. NOT

                        selecting this will make the SVVIZ component run

                        longer.

——

 

実行方法

ランするのに必要なものは、.bamと.bam.bai、そのリファレンスのfasta.gzまたはfa.gzとおよび.faiファイルになる。fastaファイルは非圧縮にも対応している(*3)。

 

breakdancer、cnvnator、mantaでSVコールする。さらに結果を統合し、フィルタリングしてSVコールとそのリード分布可視化ファイルを得る。

#出力ディレクトリを指定する
cd /path/to/bam_data/ && mkdir output

docker run -v ${PWD}:/home/dnanexus/in \
-v ${PWD}/output/:/home/dnanexus/out dnanexus/parliament2:0.1.7 \
--bam input.bam --bai input.bam.bai -r ref_genome.fa.gz \
--breakdancer --cnvnator --manta \
--genotype --svviz --svviz_only_validated_candidates

fasta.gzを指定するとラン中に解凍される。2回目のランの時は注意する。

 

ジョブが終わると、各SVコーラー出力のvcfを保存したディレクトリ、マージしてgenotypingしたvcf、コール部位を1箇所ずつ可視化してtarにまとめたファイルなどが出力される。

f:id:kazumaxneo:20181025203902j:plain

 

 

 個別のSVコーラーのランも簡単に実行できる。

Cnvnatorのランのみ実行

docker run 
-v /home/uesaka/bam_data/:/home/dnanexus/in \
-v /home/uesaka/bam_data/output/:/home/dnanexus/out \
dnanexus/parliament2:0.1.7 \
--bam input.bam --bai input.bam.bai -r ref_genome.fa.gz \
--cnvnator

 

Mantaのランのみ実行

docker run 
-v /home/uesaka/bam_data/:/home/dnanexus/in \
-v /home/uesaka/bam_data/output/:/home/dnanexus/out \
dnanexus/parliament2:0.1.7 \
--bam input.bam --bai input.bam.bai -r ref_genome.fa.gz \
--cnvnator

 

全解析

docker run 
-v /home/uesaka/bam_data/:/home/dnanexus/in \
-v /home/uesaka/bam_data/output/:/home/dnanexus/out \
dnanexus/parliament2:0.1.7 \
--bam input.bam --bai input.bam.bai -r ref_genome.fa.gz \
--breakdancer --cnvnator --manta --breakseq \
--delly_deletion --delly_insertion --delly_inversion --delly_duplication \
--genotype --svviz

breakseqは1000genomeのhs37d5をリファレンスにした時のみ、結果を得られる(*5)。

 

補足

DNAnexus社の研究者が発表しているので、当然DNAnexusのクラウド解析サーバーでも使えるようになっています(*4)。確認のため、DNAnexusに登録して実行までの流れを調べましたが、マウスでファイルを追加してパラメータを決め、Runボタンを押すだけ実行直前まで進めました。費用の検討は必要ですが、この方法が一番簡単に使えそうです (*2)。データは、AWSやAzureのサーバーに置いてあっても使えるようです。

f:id:kazumaxneo:20181025144644j:plain

 

DNAnexusには、Parliament2以外にも様々なワークフローがready to goの状態で準備されています。例えば、最近論文が出たGoogleのDeepVariant(pubmed) (下の画像)も使えます (HP)(Googleから多額の出資があることも関係していそうですね *1)

f:id:kazumaxneo:20181025145332j:plain

 

必要な費用ですが、環境によって変わってきます(例えばスペック、転送量、使用時間など)。このあたり、他のクラウドコンピューティング環境と変わりませんね。

引用

Parliament2: Fast Structural Variant Calling Using Optimized Combinations of Calle

Samantha Zarate, Andrew Carroll, Olga Krashenina, Fritz J Sedlazeck, Goo Jun, William Salerno, Eric Boerwinkle, Richard Gibbs

bioRxiv preprint first posted online Sep. 23, 2018; doi:

doi.org/10.1101/424267.

 

2020 12/22

Parliament2: Accurate structural variant calling at scale
Samantha Zarate, Andrew Carroll, Medhat Mahmoud, Olga Krasheninina, Goo Jun, William J Salerno, Michael C Schatz, Eric Boerwinkle, Richard A Gibbs, Fritz J Sedlazeck
GigaScience, Volume 9, Issue 12, December 2020

 

参考

*1

マイクロソフトやGoogle、遺伝子情報プラットフォームのDNAnexusに5800万ドル出資 | HealthTechNews

マイクロソフト、ゲノム研究用クラウドツールの一般提供開始を発表 - News Center Japan

 

*2

無料だとデータのtransfer機能のみ使用できます。log in後、右上のupgrade nowからスペックを指定し、支払いをすませると解析できるようになります。

 

*3

svtyperのマージ付近でエラーが出たので、fastaのヘッダーに特殊文字が含まれないよう修正したら最後までランできるようになった。

 

*4

DNAnexus社のサーバーはAWSを使っているらしい。

 

*5

Google genomicsからダウンロードできる。

https://googlegenomics.readthedocs.io/en/latest/use_cases/discover_public_data/reference_genomes.html

 

*6

既にオーサーの方の1人はGoogle genomicsに移られたようなことをツイートされていますね(未確認)。間違ってたらすみません。

 

関連

Dockerについては前に簡単に説明しています。