macでインフォマティクス

macでインフォマティクス

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

ロングリードを使い環状DNAかどうか調べる Circlator

2019 2/26 condaインストール追記

 

 デノボアセンブリの課題は、世界初の自動DNAシーケンサーの登場以来ずっと存在していた。初期ゲノムシーケンスデータのアセンブリは、大きく2つの戦略に基づいていた:BAC / YACタイリングまたは全ゲノムショットガン[論文より ref.1]。これらのストラテジーは、今日ではリファレンスゲノムとして頻繁に使用される高品質のゲノム配列作製を可能にするが、それらは低速で高価であり、そして必要な場合には、ゲノム配列の完成および最終段階で手間と費用がかかる手動の仕上げ作業が必要である。ハイスループットなシークエンシング技術が導入されたことにより、高度な全ゲノム配列データを生成するのに必要な時間とコストが大幅に削減された。しかし、これらのデータからのデノボゲノムアセンブリは、断片化されたゲノムしか生成されないのが一般的であり、その結果、ほとんどのショートリードアセンブリアルゴリズムは完成したゲノムの環状化などの問題に取り組まない。

 最近、Pacific Biosciences(PacBio)とOxford Nanopore Technologies(ONT)の高スループット、ロングリード(数十キロベースまで)のシーケンシング技術が利用できるようになり、自動化されたデノボアセンブリの連続性が向上した。DNA分子あたり1つのコンティグの生産が、細菌および小規模な真核生物のゲノムにとって前例のない規模で可能になっている[ref.2]。ショートリードの技術と比較して、PacBio、特にONTリードのエラー率は高いが、これはシーケンサースループットの高さおよびランダムエラーモデルを利用することによって軽減される。セルフマッピングを使用したrawシーケンシングリードのエラーを修正することによりエラーは訂正され、それからオーバーラップレイアウトコンセンサスアセンブリアプローチ(例えばHGAP [ref.3]、PBcR [ref.4]、およびSPRAI [ ref.5])によってアセンブルされる。

 これらの新しい技術は、ゲノム配列のルーティンな自動完成の率を高めているが、現在のロングリードアセンブリソフトウェアは、典型的には、それらが生成するコンティグが線形であると仮定している。対照的に、ほとんどすべての種のゲノムは、少なくとも1つの環状DNA構造で、例えばバクテリアのクロモソームとプラスミドならびに真核生物の色素体およびミトコンドリアゲノムがこれに含まれる。これらの分子の正確な完了および環化は、臨床診療において日常的に使用される場合には不可欠である。全ゲノムシークエンシングは、すでに細菌疫学において改善された分解能を提供しており[ref.6]、抗菌抵抗性のin silico予測を可能にしている[ref.7]。多くの重要な抗菌剤耐性および病原性決定因子がプラスミド上に担持され、これらの環状配列について完全で正確な情報を有することの重要性が示される。同様に、ヒトにおいて、ミトコンドリアゲノムは、うつ病[ref.8,9]、Leber遺伝性視神経症[ref.10]、および筋障害および真性糖尿病[ref.11]のような表現型の制御に関与している。

 従って、環状DNA構造の正確な表現を自動生成できることは明らかに重要である。しかし、環状DNA構造を表すためにアセンブリプログラムによって生成された直線状のコンティグは、エラーを含む可能性がある。コンティグの両端には、ほぼ同一のオーバーラップがしばしば見られる。これを解決するには、かなりの手動介入が必要になる(論文 図1a)。あるいは、配列は不完全であり、コンティグの終わりに合流する短い配列を欠いていてもよい(論文 図1b)。最後に、アセンブルされる配列がいくつかのリード長よりも短い場合、それは環状ゲノム全体の複数の重複として誤ったアセンブルデータを含む可能性がある(図1c)。現在、各コンティグ末端で共通配列を同定するアプローチが2つ存在する。それらはBLAST [ref.12]およびMinimus2 [ref.13]である。著者らの評価では、これらの方法は、新規のアセンブラによって生成された重大な不正確な構造表現に対処することができず、従って、環状DNA構造の正確な表現を生成するためにさらなる手動作業を必要とする。

 本論文では、環状DNA構造を生成するためのアセンブリ後の改良ツールキットCirclatorを紹介する。 このツールはコンティグの末端でエラー訂正されたロングリードのローカルアセンブリを使用してコンティグを環状化する。 これにより、低品質のコンティグ端の間で共通のシーケンスを探すことを回避し、重複が存在しない場合でも循環を可能にする。 Circlatorは広範なバクテリア、ヒトゲノム、Plasmodiumサンプルを用いて評価され、現在の方法より優れていることを示した。

  

 

公式サイト

http://sanger-pathogens.github.io/circlator/

wiki

https://github.com/sanger-pathogens/circlator/wiki

  

インストール

依存

  • Python3
  • BWA version >= 0.7.12
  • prodigal version >= 2.6
  • SAMtools (versions 0.1.9 to 1.3)
  • MUMmer version >= 3.23
  • Canu and/or SPAdes. SPAdes version 3.6.2 or higher is required, but 3.7.1 is recommended (marginally gave the best results on NCTC data from the Circlator publication, tested on all SPAdes versions 3.6.2-3.9.0).

標準ではspadesアセンブラを利用するため、canuはインストールされてなくても動く。環境変数$CIRCLATOR_SPADESをspadesのパスに定義して置かないと、spadesのパスを探す 。spades3.7をインストールすることが推奨されているので、最新のspadesを使っているなら、spades3.7を別にインストールして$CIRCLATOR_SPADESをexportしとく(See Github)。

 

本体 Github

https://github.com/sanger-pathogens/circlator

#anaxcondaを使っているなら
conda install -c bioconda -y circlator


#または
pip install circlator

 #動作テスト

circlator progcheck

$ circlator progcheck

Circlator version: 1.5.5

 

External dependencies:

bwa 0.7.17 /usr/local/bin/bwa

canu 1.6 /usr/local/bin/canu

nucmer 3.1 /usr/local/bin/nucmer

prodigal 2.6.3 /usr/local/bin/prodigal

samtools 1.6 /Users/user/.pyenv/versions/anaconda3-4.2.0/bin/samtools

WARNING: SPAdes version 3.11.0 is being used. It will work, but better results are usually obtained from Circlator using SPAdes version 3.7.1. Although 3.7.1 is not the latest version, we recommend it for Circlator.

spades 3.11.0 /usr/local/bin/spades.py

 

Python version:

3.5.2 |Anaconda custom (64-bit)| (default, Jul  2 2016, 17:52:12) 

[GCC 4.2.1 Compatible Apple LLVM 4.2 (clang-425.0.28)]

 

Python dependencies:

openpyxl 2.3.2 /Users/user/.pyenv/versions/anaconda3-4.2.0/lib/python3.5/site-packages/openpyxl/__init__.py

pyfastaq 3.17.0 /Users/user/.pyenv/versions/anaconda3-4.2.0/lib/python3.5/site-packages/pyfastaq/__init__.py

pymummer 0.10.3 /Users/user/.pyenv/versions/anaconda3-4.2.0/lib/python3.5/site-packages/pymummer/__init__.py

pysam 0.13 /Users/user/.pyenv/versions/anaconda3-4.2.0/lib/python3.5/site-packages/pysam/__init__.py

 

#ヘルプ

> circlator 

$ circlator

Usage: circlator <command> [options] <required arguments>

 

To get minimal usage for a command use:

circlator command

 

To get full help for a command use one of:

circlator command -h

circlator command --help

 

 

Available commands:

 

all        Run mapreads, bam2reads, assemble, merge, clean, fixstart

mapreads   Map reads to assembly

bam2reads  Make reads from mapping to be reassembled

assemble   Run assembly using reads from bam2reads

merge      Merge original assembly and new assembly made by assemble

clean      Remove small and completely contained contigs from assembly

fixstart   Change start position of circular sequences

minimus2   Run the minimus2 based circularisation pipeline

get_dnaa   Download file of dnaA (or other of user's choice) genes

progcheck  Checks dependencies are installed

test       Run Circlator on a small test set

version    Print version and exit

allモードでは上記のコマンドのいくつかが順に実行されている。

 

 

ラン

Circulatorのパイプラインは、上のコマンドを順番に進めるモードと、一気にランするモード(all)がある。allは以下のコマンドで実行できる。

 

Pacbioのシーケンスデータ。

circlator all assembly.fasta long_reads.fq.gz output_directory --verbose --threads 20
  • --threads    Number of threads [1] 
  • --verbose   Be verbose

 

Nanoporeのデータ。シーケンスエラーが多いため、Pacbiの時より少し緩和したパラメータで動かす。

circlator all --merge_min_id 85 --merge_breaklen 1000 assembly.fasta long_reads.fq.gz output_directory --verbose --threads 20
  • --merge_breaklen    breaklen option used by nucmer [500] 
  • --merge_min_id     Nucmer minimum percent identity [95]

 

....................................................................................................

# CONSTRUCTIONTIME /usr/local/Cellar/mummer/3.23_2/mummer p.ntref 1.82

# reading input file "/Volumes/3TB4/E_coli_nanopore/circular_output2/05.clean.remove_small.fa" of length 4404394

# matching query-file "/Volumes/3TB4/E_coli_nanopore/circular_output2/05.clean.remove_small.fa"

# against subject-file "p.ntref"

# COMPLETETIME /usr/local/Cellar/mummer/3.23_2/mummer p.ntref 5.80

# SPACE /usr/local/Cellar/mummer/3.23_2/mummer p.ntref 8.54

4: FINISHING DATA

 

______________________________ Running fixstart _______________________________

[fixstart] loaded input contigs

[fixstart] Running promer to look for reference genes

[fixstart] Running prodigal on sequences that had no promer match

[fixstart] Fixing start positions of contigs

[fixstart] Writing final FASTA file of contigs

___________________________________ Summary ___________________________________

Number of input contigs: 1

Number of contigs after merging: 1

Circularized 0 of 1 contig(s)

ランが終わると、circularと判断されたFASTA配列が出力される。

 

引用

Circlator: automated circularization of genome assemblies using long sequencing reads.

Hunt M, Silva ND, Otto TD, Parkhill J, Keane JA, Harris SR

Genome Biol. 2015 Dec 29;16:294.