macでインフォマティクス

macでインフォマティクス

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

miniasmでアセンブリして得たGFAをポリッシュする minipolish

 

Miniasmはパワフルで高速なロングリードのアセンブリツールだが、polishステップを持たないため、実質、得られた配列は連結されたロングリードである。polishにはraconが使用できるが、raconはFASTAファイルで動作し、Miniasmが出力するGFAをファイルを入力とし、グラフの情報を保持したままpolishすることはできない。minipolishはこのため開発されたツールで、このツールはraconを使ってGFAファイルをpolishする。また以下の様な情報も加えてくれる。

Githubの文章

  • Adding read depth information to contigs
  • Fixing sequence truncation that can occur in Racon
  • Adding circularising links to circular contigs if not already present (so they display better in Bandage)
  • 'Rotating' circular contigs between polishing rounds to ensure clean circularisation

 

インストール

依存

  • You'll need Python 3.6 or later to run Minipolish.
  • Minipolish assumes that you have minimap2 and Racon installed and available in your PATH.
  • You'll also need pytest if you want to run Minipolish's unit tests.

本体 Github

git clone https://github.com/rrwick/Minipolish.git
pip3 install ./Minipolish

> minipolish -h

$ minipolish -h

usage: minipolish [-t THREADS] [--rounds ROUNDS] [--pacbio] [--skip_initial] [-h] [--version] reads assembly

 

Minipolish

 

Positional arguments:

  reads                          Long reads for polishing (FASTA or FASTQ format)

  assembly                       Miniasm assembly to be polished (GFA format)

 

Settings:

  -t THREADS, --threads THREADS  Number of threads to use for alignment and polishing (default: 8)

  --rounds ROUNDS                Number of full Racon polishing rounds (default: 2)

  --pacbio                       Use this flag for PacBio reads to make Minipolish use the map-pb Minimap2 preset (default: assumes Nanopore reads and uses the map-ont

                                 preset)

  --skip_initial                 Skip the initial polishing round - appropriate if the input GFA does not have "a" lines (default: do the initial polishing round

 

Other:

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

  --version                      Show program's version number and exit

 

 

 

実行方法

アセンブリ後のGFAファイルを入力とする。

minimap2 -t 8 -x ava-ont long_reads.fastq.gz long_reads.fastq.gz > overlaps.paf
miniasm -f long_reads.fastq.gz overlaps.paf > assembly.gfa
minipolish -t 8 long_reads.fastq.gz assembly.gfa > polished.gfa

 

レポジトリに付属しているスクリプトを使えば、上の工程を1コマンドで実行できる。

スレッド数8で実行。

miniasm_and_minipolish.sh long_reads.fastq.gz 8 > polished.gfa

 

BandageにGFAを読み込めば変化を視覚的に確認できる。 ここではターミナルで叩いて実行する。

Bandage image polished.gfa polished.svg

 

引用

https://github.com/rrwick/Minipolish

 

関連