macでインフォマティクス

macでインフォマティクス

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

バクテリアの高精度なアセンブリツール Platanus_B

2020 11/6 誤字修正

 

 ショート DNA リードのデノボアセンブリは、特に大規模プロジェクトや疫学における高解像度の変異解析に不可欠な技術であり続けている。しかし、既存のツールでは、近縁の菌株を比較するのに必要な十分な精度が得られないことが多い。このような細菌ゲノムの研究を容易にするために、著者らは複数のエラー除去アルゴリズムの繰り返しを採用したデノボアセンブラであるPlatanus_Bを開発した。ベンチマークでは、Platanus_Bの優れた精度と高いコンティギュイティが実証され、さらにショートリードとナノポアロングリードの両方のハイブリッドアセンブリを強化する能力も実証された。ショートリードとロングリードのハイブリッド戦略は、ほぼ完全長のゲノムを達成するのに有効であったが、Platanus_Bで生成されたショートリードのみのアセンブリは、ほとんどの場合、90%以上の正確なコーディング配列を得るのに十分であることがわかった。また、ナノポアのロングリードオンリーアセンブリでは微細な精度が不足していたが、ショートリードを含めることで精度を向上させることができた。したがって、Platanus_Bは、細菌病原体の包括的なゲノム調査や、広範囲の細菌の高分解能系統図解析に使用することができる。

 

Platanus HP

http://platanus.bio.titech.ac.jp/platanus-b

 

インストール

ubuntu18.04のdockerイメージでテストした。オーサーらが提供しているpre-buildのバイナリを使った。

依存

  • OpenMP

    To compile the source code.

  • Minimap2

    https://github.com/lh3/minimap2
    Included in this package.
    Only required to use Oxford-Nanopore/PacBio long reads.

  • Perl

    To execute the scripts in this package, which .

Github

git clone https://github.com/rkajitani/Platanus_B.git
cd Platanus_B/
make

./platanus_b

# ./platanus_b   

platanus_b version: 1.3.2

./platanus_b 

 

Usage: platanus_b Command [options]

 

Command: assemble, iterate, combine (solve_DBG, gap_close, divide, kmer_divide)

./platanus_b assemble -h

# ./platanus_b assemble -h

platanus_b version: 1.3.2

./platanus_b assemble -h 

 

 

Usage platanus_b assemble [Options]

Options:

    -o STR               : prefix of output files (default out, length <= 200)

    -f FILE1 [FILE2 ...] : reads file (fasta or fastq, number <= 100)

    -k INT               : initial k-mer size (default 32)

    -K FLOAT             : maximum-k-mer factor (maximum-k = FLOAT*read-length, default  0.5)

    -s INT               : step size of k-mer extension (>= 1, default 10)

    -n INT               : initial k-mer coverage cutoff (default 0, 0 means auto)

    -c INT               : minimun k-mer coverage (default 1)

    -a FLOAT             : k-mer extension safety level (default 10.0)

    -u FLOAT             : maximum difference for bubble crush (identity, default 0)

    -d FLOAT             : maximum difference for branch cutting (coverage ratio, default 0.5)

    -e FLOAT             : k-mer coverage depth (k = initial k-mer size specified by -k) of homozygous region (default auto)

    -t INT               : number of threads (<= 100, default 1)

    -m INT               : memory limit for making kmer distribution (GB, >=1, default 16)

    -tmp DIR             : directory for temporary files (default .)

    -kmer_occ_only       : only output k-mer occurrence table (out_kmer_occ.bin; default off) 

    -repeat              : mode to assemble repetitive sequences (e.g. 16s rRNA))

 

 

Input format:

    Uncompressed and compressed (gzip or bzip2) files are accepted for -f option.

 

 

Outputs:

    PREFIX_contig.fa

    PREFIX_kmerFrq.tsv

 

Note, PREFIX is specified by -o

./platanus_b iterate -h

# ./platanus_b iterate -h

platanus_b version: 1.3.2

./platanus_b iterate -h 

 

 

Usage: platanus_b iterate [Options]

Options:

    -o STR                             : prefix of output file and directory (do not use "/", default out, length <= 200)

    -c FILE1 [FILE2 ...]               : contig (or scaffold) file (fasta format)

    -i INT                             : number of iterations (default 6)

    -l INT                             : -l value of "scaffold" step

    -u FLOAT                           : maximum difference for bubble crush (identity, default 0)

    -ip{INT} PAIR1 [PAIR2 ...]         : lib_id inward_pair_file (reads in 1 file, fasta or fastq)

    -IP{INT} FWD1 REV1 [FWD2 REV2 ...] : lib_id inward_pair_files (reads in 2 files, fasta or fastq)

    -op{INT} PAIR1 [PAIR2 ...]         : lib_id outward_pair_file (reads in 1 file, fasta or fastq)

    -OP{INT} FWD1 REV1 [FWD2 REV2 ...] : lib_id outward_pair_files (reads in 2 files, fasta or fastq)

    -ont FILE1 [FILE2 ...]             : Oxford Nanopore long-read file (fasta or fastq)

    -p FILE1 [FILE2 ...]               : PacBio long-read file (fasta or fastq)

    -gc FILE1 [FILE2 ...]              : Guiding contig file; i.e. other assemblies, synthetic long-reads or corrected reads (fasta or fastq)

    -t INT                             : number of threads (default 1)

    -m INT                             : memory limit for making kmer distribution (GB, >=1, default 1)

    -tmp DIR                           : directory for temporary files (default .)

    -sub_bin DIR                       : directory for binary files which platanus_b use internally (e.g. minimap2) (default /data/Platanus_B/sub_bin)

    -keep_file                         : keep intermediate files (default, off)

    -trim_overlap                      : trim overlapping edges of scaffolds (default, off)

 

Input format:

    Uncompressed and compressed (gzip or bzip2) files are accepted for -c, -ip, -IP, -op, -OP, -ont, -p and -gc options.

 

 

Outputs:

    PREFIX_iterativeAssembly.fa

./platanus_b combine -h

# ./platanus_b combine -h

platanus_b version: 1.3.2

./platanus_b combine -h 

 

 

Usage: platanus_b combine [Options]

Options:

    -o STR                             : prefix of output file and directory (do not use "/", default out, length <= 200)

    -c FILE1 [FILE2 ...]               : contig (or scaffold) file (fasta format)

    -gc FILE1 [FILE2 ...]              : Guiding contig file; i.e. other assemblies, synthetic long-reads or corrected reads (fasta or fastq)

    -p FILE1 [FILE2 ...]               : PacBio long-read file (fasta or fastq)

    -ont FILE1 [FILE2 ...]             : Oxford Nanopore long-read file (fasta or fastq)

    -t INT                             : number of threads (default 1)

    -tmp DIR                           : directory for temporary files (default .)

    -sub_bin DIR                       : directory for binary files which platanus_b use internally (e.g. minimap2) (default /data/Platanus_B/sub_bin)

    -no_gap_close                      : not close gaps by guiding contigs (default, false)

    -keep_file                         : keep intermediate files (default, off)

 

Input format:

    Uncompressed and compressed (gzip or bzip2) files are accepted for -c, -gc, -ont and -p options.

 

 

Outputs:

    PREFIX_combined.fa

 

 

実行方法 

1、assemble

非圧縮、またはgzip | bzip2 圧縮のペアエンドfastqファイルを指定する。

platanus_b assemble -f R1.fastq R2.fastq -t 8 -o out

#logを保存
platanus_b assemble -f R1.fastq R2.fastq -t 8 -o out 2>log

#respetitive sequencesのアセンブリ
platanus_b assemble -f R1.fastq R2.fastq -t 8 -o out -repeat 2>log
  • -f FILE1 [FILE2 ...] : reads file (fasta or fastq, number <= 100)
  • -o <STR> : prefix of output files (default out, length <= 200)
  • -k <INT>  : initial k-mer size (default 32)
  • -K <FLOAT> : maximum-k-mer factor (maximum-k = FLOAT*read-length, default  0.5)
  • -s <INT> : step size of k-mer extension (>= 1, default 10)  
  • -repeat : mode to assemble repetitive sequences (e.g. 16s rRNA) (default off)

最後にout_contig.faが出力される。

 

2、iterate - 配列の拡張、ギャップクロージング、エラー除去の繰り返し

1の出力であるout_contig.faとペアエンドfastqを指定する。

platanus_b iterate -c out_contig.fa -IP1 PE_1.fq PE_2.fq -t 8 -ont ONT.fq 2>iterate.log
  • -i <INT>: number of iterations (default 6)

デフォルトでは6回繰り返されるため、6つのディレクトリができる。

出力

f:id:kazumaxneo:20201105165039p:plain

 

iterateモードではONT | Pacbioのロングリードも使ってより連続性の高い配列を構築できる。

platanus_b iterate -c out_contig.fa -IP1 PE_1.fq PE_2.fq -t 8 -ont ONT.fq 2>iterate.log

Platanus version: 1.1.0の配布版では"-ont"オプションを利用できなかった(2020/11/5時点での最新はv.1.3.2。v.1.3.2では"-ont"オプションを利用できる。*1)。

 

他に consensus配列を出すコマンド とエラーの可能性がある領域をカットするコマンドがありますが、まだよく理解できていないので掲載は控えます。

引用

Platanus_B: an accurate de novo assembler for bacterial genomes using an iterative error-removal process
Rei Kajitani, Dai Yoshimura, Yoshitoshi Ogura, Yasuhiro Gotoh, Tetsuya Hayashi, Takehiko Itoh
DNA Research, Volume 27, Issue 3, June 2020

 

関連


 

*1 実際に試しています。