macでインフォマティクス

macでインフォマティクス

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

metaplasmidSPAdes

2019 6/7 出力例 

 

 プラスミドは、それらの生存および適応にとって重要なさらなる遺伝物質を細菌宿主に提供するクロモソーム外に独立して複製されるDNA分子である。シーケンシング時代より昔は、抗生物質耐性または難治性有機化合物を分解する能力など、それらが宿主に与える様々な表現型の変化に基づいてプラスミドが検出されていた。しかしながら、シーケンシングエフォートは、宿主細胞の表現型に寄与しない多くの潜在的プラスミドを明らかにした。 RefSeqデータベースには約 10,000のプラスミドが記載されているが(Pruitt et al、2006)、ゲノムデータセットおよびメタゲノムデータセットからプラスミドを集める作業は些細なことではないので、多くのプラスミドが検出されないままである(Antipov et al., 2016, Rozov et al., 2017)。このように、最近の研究で見いだされた多くの以前には未知だったクラスのウイルスと同じように、多くのクラスのプラスミドが未知のままであり続けると推測する(Paez-Espino et al、2016、Roux et al、2016)。
 プラスミドは遺伝物質を宿主クロモソームと交換し、構造(環状または線状)、大きさ(数千から数百万ヌクレオチド)、および遺伝子含有量が異なるので、そのようなプラスミドにおけるプラスミドの概念を計算的に定義する方法や、クロモソームからそれらを区別することが可能であろう方法は明らかではない。また、プラスミドのアセンブリは、ショートリードシークエンシング技術を使用して解決することが困難である様々リピートによって複雑になる。
1、An intra-plasmidic repeat とは、プラスミド内のリピートをいう。 RefSeqデータベースの34%のプラスミドは、メタゲノム研究における典型的なインサートサイズである300ヌクレオチドより長いプラスミド内リピートを含んでいる。
2、An inter-plasmidic repeatとは、複数のプラスミドによって共有されるリピートを指す。
3、A shared repeatとは、プラスミドとクロモソームとの間で共有されるリピートをいう。単離サンプルの場合、リードによるプラスミドのカバー率がクロモソームのカバー率と著しく異なる場合、リピートを分離することができる(Antipov、2016)。しかしながら、細菌群集全体にわたって広い範囲のクロモソームおよびプラスミドのカバレッジを有するメタゲノム試料の場合、または増殖期の間にシーケンシングされた単離試料において、そのようなリピートを解決することは困難である (Antipov et al., 2016)。

 環状プラスミドは、ゲノムおよびメタゲノムアセンブリグラフ内で一様に覆われたサイクル、すなわち、リードによる比較的一様なカバレッジを有するサイクルを形成する(プラスミド内、プラスミド間、および共有リピートに対応する領域を除く)。これらのサイクルは、クロモソームエッジ(クロモソーム由来)とプラスミドエッジ(プラスミド由来)の両方を含む大きなアセンブリグラフ内に「隠れて」いるため、検出が困難である。さらに、プラスミド間リピートを有するプラスミドは、自己重複サイクル(これらのリピートに対応するエッジを2回以上横断する)を形成し、したがってそれらの検出をさらに複雑にする。
 plasmidSPAdes (Antipov et al., 2016) および Recycler (Rozov et al, 2017)は、SPAdesアセンブラ (Bankevich et al., 2012)によって構築されたアセンブリグラフにおいてプラスミドを一様に覆われた短いサイクルとして識別するプラスミドアセンブリツールである。どちらのツールも、共有されたリピートの問題について、プラスミドとクロモソーム間のカバー率の差を利用して解決を試みる(Recyclerはメタゲノムを扱うことができ、PlasmidSPAdesはゲノムの単離に限られている)。 PlasmidSPAdesとRecyclerは多くの新規プラスミドを明らかにしたが、それらは、特にクロモソームのカバー率が不均一である状況において、多くの偽陽性を報告している。 Arredondo-Alonso et al、2017は、148のプラスミドを用いて単離細菌ゲノムからサンプリングされたショートリードを含む42のデータセットについてこれらのツールをベンチマークし、plasmidSPAdesおよびRecyclerはそれぞれ0.78および0.30の精度を有すると推定した。精度が低く、均一なカバレッジに依存しているため、PlasmidSPAdesは、複数のゲノムにわたるカバレッジが大きく異なるメタゲノムデータセットには適用できない。メタゲノムデータセットは未発見のプラスミドのソースであるため、これは残念なことである(Jørgensenet al、2014、Li et al、2015)。

本著者らは、ここでplasmidSPAdesおよびRecyclerを改良する新しいプラスミド検証ツールを提示する。これは(i)メタゲノムアセンブリグラフからカバレッジを徐々に増加させながらサブグラフを繰り返し抽出すること、(ii)これらのサブグラフ内で一様に覆われたサイクルとして推定プラスミドを発見すること、および(iii)発見を検証することに基づく。我々(著者ら)は、plasmidSPAdes+(PlasmVerifyによって補完されたPlasmVSPAdes)およびmetaplasmidSPAdesを多様なゲノムおよびメタゲノムサンプルに適用し、現在知られているプラ​​スミドと有意な相同性を持たないプラスミド、および抗生物質耐性遺伝子を保有するプラスミドを何千も得られたことを明らかにした。

 

インストール

2019年6月5日現在、 early preview versionが提供されている。

GIthub リリース

解凍してノーマルのspadesと同じようにコンパイルする。

cd spades-metaplasmid-paper/assembler/
./spades_compile.sh

ls -al

$ ls -al

total 480

drwxr-xr-x@ 36 kazuma  staff   1152  6  4 21:44 ./

drwxr-xr-x@  9 kazuma  staff    288  3  1 04:37 ../

-rwxr-xr-x@  1 kazuma  staff    261  3  1 04:37 .gitignore*

-rwxr-xr-x@  1 kazuma  staff  17987  3  1 04:37 GPLv2.txt*

-rwxr-xr-x@  1 kazuma  staff   2911  3  1 04:37 LICENSE*

-rwxr-xr-x@  1 kazuma  staff    375  3  1 04:37 README_metaplasmidspades.txt*

-rwxr-xr-x@  1 kazuma  staff     19  3  1 04:37 VERSION*

drwxr-xr-x   3 kazuma  staff     96  6  4 21:44 __pycache__/

drwxr-xr-x  17 kazuma  staff    544  6  4 21:43 bin/

drwxr-xr-x  18 kazuma  staff    576  6  4 21:43 build_spades/

-rwxr-xr-x@  1 kazuma  staff   9594  3  1 04:37 changelog.html*

-rwxr-xr-x@  1 kazuma  staff    531  3  1 04:37 changer_of_K.py*

-rwxr-xr-x@  1 kazuma  staff    123  3  1 04:37 compare_saves.sh*

drwxr-xr-x@  9 kazuma  staff    288  3  1 04:37 configs/

-rwxr-xr-x@  1 kazuma  staff    900  3  1 04:37 editcfg*

drwxr-xr-x@  6 kazuma  staff    192  3  1 04:37 ext/

-rwxr-xr-x@  1 kazuma  staff   1125  3  1 04:37 makefile*

-rwxr-xr-x@  1 kazuma  staff  64051  3  1 04:37 manual.html*

lrwxr-xr-x   1 kazuma  staff      9  6  4 21:37 metaplasmidspades.py@ -> spades.py

lrwxr-xr-x   1 kazuma  staff      9  6  4 21:37 metaspades.py@ -> spades.py

lrwxr-xr-x   1 kazuma  staff      9  6  4 21:37 plasmidspades.py@ -> spades.py

-rwxr-xr-x@  1 kazuma  staff    984  3  1 04:37 prepare_cfg*

lrwxr-xr-x   1 kazuma  staff      9  6  4 21:37 rnaspades.py@ -> spades.py

-rwxr-xr-x@  1 kazuma  staff   7109  3  1 04:37 rnaspades_manual.html*

-rwxr-xr-x@  1 kazuma  staff   1070  3  1 04:37 run*

drwxr-xr-x   3 kazuma  staff     96  6  4 21:43 share/

-rwxr-xr-x@  1 kazuma  staff  58850  3  1 04:37 spades.py*

-rwxr-xr-x@  1 kazuma  staff    648  3  1 04:37 spades_compile.sh*

-rwxr-xr-x@  1 kazuma  staff    175  3  1 04:37 spades_dev.sh*

-rwxr-xr-x@  1 kazuma  staff   1645  3  1 04:37 spades_init.py*

drwxr-xr-x@ 13 kazuma  staff    416  3  1 04:37 src/

drwxr-xr-x@  9 kazuma  staff    288  3  1 04:37 test_dataset/

drwxr-xr-x@  4 kazuma  staff    128  3  1 04:37 test_dataset_plasmid/

drwxr-xr-x@  6 kazuma  staff    192  3  1 04:37 test_dataset_truspades/

-rwxr-xr-x@  1 kazuma  staff   8761  3  1 04:37 truspades.py*

-rwxr-xr-x@  1 kazuma  staff  10769  3  1 04:37 truspades_manual.html*

 > ./metaplasmidspades.py

$ ./metaplasmidspades.py 

SPAdes genome assembler v3.13.0-metaplasmid [metaplasmidSPAdes mode]

 

Usage: ./metaplasmidspades.py [options] -o <output_dir>

 

Basic options:

-o <output_dir> directory to store all the resulting files (required)

--iontorrent this flag is required for IonTorrent data

--test runs SPAdes on toy dataset

-h/--help prints this usage message

-v/--version prints version

 

Input data:

--12 <filename> file with interlaced forward and reverse paired-end reads

-1 <filename> file with forward paired-end reads

-2 <filename> file with reverse paired-end reads

-s <filename> file with unpaired reads

--merged <filename> file with merged forward and reverse paired-end reads

--pe<#>-12 <filename> file with interlaced reads for paired-end library number <#> (<#> = 1,2,...,9)

--pe<#>-1 <filename> file with forward reads for paired-end library number <#> (<#> = 1,2,...,9)

--pe<#>-2 <filename> file with reverse reads for paired-end library number <#> (<#> = 1,2,...,9)

--pe<#>-s <filename> file with unpaired reads for paired-end library number <#> (<#> = 1,2,...,9)

--pe<#>-m <filename> file with merged reads for paired-end library number <#> (<#> = 1,2,...,9)

--pe<#>-<or> orientation of reads for paired-end library number <#> (<#> = 1,2,...,9; <or> = fr, rf, ff)

--s<#> <filename> file with unpaired reads for single reads library number <#> (<#> = 1,2,...,9)

--mp<#>-12 <filename> file with interlaced reads for mate-pair library number <#> (<#> = 1,2,..,9)

--mp<#>-1 <filename> file with forward reads for mate-pair library number <#> (<#> = 1,2,..,9)

--mp<#>-2 <filename> file with reverse reads for mate-pair library number <#> (<#> = 1,2,..,9)

--mp<#>-s <filename> file with unpaired reads for mate-pair library number <#> (<#> = 1,2,..,9)

--mp<#>-<or> orientation of reads for mate-pair library number <#> (<#> = 1,2,..,9; <or> = fr, rf, ff)

--hqmp<#>-12 <filename> file with interlaced reads for high-quality mate-pair library number <#> (<#> = 1,2,..,9)

--hqmp<#>-1 <filename> file with forward reads for high-quality mate-pair library number <#> (<#> = 1,2,..,9)

--hqmp<#>-2 <filename> file with reverse reads for high-quality mate-pair library number <#> (<#> = 1,2,..,9)

--hqmp<#>-s <filename> file with unpaired reads for high-quality mate-pair library number <#> (<#> = 1,2,..,9)

--hqmp<#>-<or> orientation of reads for high-quality mate-pair library number <#> (<#> = 1,2,..,9; <or> = fr, rf, ff)

--nxmate<#>-1 <filename> file with forward reads for Lucigen NxMate library number <#> (<#> = 1,2,..,9)

--nxmate<#>-2 <filename> file with reverse reads for Lucigen NxMate library number <#> (<#> = 1,2,..,9)

--sanger <filename> file with Sanger reads

--pacbio <filename> file with PacBio reads

--nanopore <filename> file with Nanopore reads

--tslr <filename> file with TSLR-contigs

--trusted-contigs <filename> file with trusted contigs

--untrusted-contigs <filename> file with untrusted contigs

 

Pipeline options:

--only-error-correction runs only read error correction (without assembling)

--only-assembler runs only assembling (without read error correction)

--careful tries to reduce number of mismatches and short indels

--continue continue run from the last available check-point

--restart-from <cp> restart run with updated options and from the specified check-point ('ec', 'as', 'k<int>', 'mc', 'last')

--disable-gzip-output forces error correction not to compress the corrected reads

--disable-rr disables repeat resolution stage of assembling

 

Advanced options:

--dataset <filename> file with dataset description in YAML format

-t/--threads <int> number of threads

[default: 16]

-m/--memory <int> RAM limit for SPAdes in Gb (terminates if exceeded)

[default: 250]

--tmp-dir <dirname> directory for temporary files

[default: <output_dir>/tmp]

-k <int,int,...> comma-separated list of k-mer sizes (must be odd and

less than 128) [default: 'auto']

--cov-cutoff <float> coverage cutoff value (a positive float number, or 'auto', or 'off') [default: 'off']

--phred-offset <33 or 64> PHRED quality offset in the input reads (33 or 64)

[default: auto-detect]

 

 

実行方法
ペアエンドfastqを指定する。

metaplasmidspades.py -1 pair_1.fq.gz -2 pair_2.fq.gz -t 40 -k auto -o output

メタゲノム用なのでcarefulなどのオプションは無くなっている。 

 

テストラン

mock metagenome communityのデータセットを使いテストした。 (link)

metaplasmidspades.py -1 pair_1.fq.gz -2 pair_2.fq.gz -t 40 -k auto -o output
cd output/
spades_contig_graph.py -c assembly_graph.fastg scaffolds.fasta scaffolds.paths output_coverage.fastq

output_coverage.fastq をBandageで可視化.

f:id:kazumaxneo:20190607112059j:plain

出力にはchromosomeなどのcontig配列は含まれない。 

 

引用

Plasmid detection and assembly in genomic and metagenomic datasets
Dmitry Antipov, Mikhail Raiko, Alla Lapidus, Pavel A. Pevzner

Genome Research. Accepted April 24, 2019.

 

関連