macでインフォマティクス

macでインフォマティクス

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

TopHatのunmapped.bamを修復する TopHat-Recondition

 

tophatはスプライシングされた領域を跨ぐアライメントが可能なRNAマッピングツールだが、他のアライメントユーツとは異なり、tophatのすべてのバージョンはアライメントされなかったリードを独自形式で別のbamに書き込む。このフォーマットが理由で、unmapped.bamを使いさらに何か解析を行うときにgatk、picard、samtoolsなどで正しく扱えない問題がある。TopHat-Reconditionはtophat独自のsam/bamを他のツールが扱えるように修復するツールとして機能する。

 

インストール

Github

 condaで環境を構築できる。

conda install -c bioconda tophat-recondition

> tophat-recondition -h

user$ tophat-recondition -h

usage: tophat-recondition [-h] [-l LOGFILE] [-m MAPPED_FILE] [-q]

                          [-r RESULT_DIR] [-u UNMAPPED_FILE] [-v]

                          tophat_result_dir

 

Post-process TopHat unmapped reads. For detailed information on the issues

this software corrects, please consult the software homepage:

https://github.com/cbrueffer/tophat-recondition

 

positional arguments:

  tophat_result_dir     directory containing TopHat mapped and unmapped read

                        files.

 

optional arguments:

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

  -l LOGFILE, --logfile LOGFILE

                        log file (optional, (default: result_dir/tophat-

                        recondition.log)

  -m MAPPED_FILE, --mapped-file MAPPED_FILE

                        Name of the file containing mapped reads (default:

                        accepted_hits.bam)

  -q, --quiet           quiet mode, no console output

  -r RESULT_DIR, --result_dir RESULT_DIR

                        directory to write unmapped_fixup.bam to (default:

                        tophat_output_dir)

  -u UNMAPPED_FILE, --unmapped-file UNMAPPED_FILE

                        Name of the file containing unmapped reads (default:

                        unmapped.bam)

  -v, --version         show program's version number and exit

 

実行方法

tophatの出力ディレクトリを指定してランする。

tophat-recondition tophat_result_dir
  • -m MAPPED_FILE Name of the file containing mapped reads (default:accepted_hits.bam)
  • -u UNMAPPED_FILE-u UNMAPPED_FILE, --unmapped-file UNMAPPED_FILE Name of the file containing unmapped reads (default:  unmapped.bam)
  • -r directory to write unmapped_fixup.bam to (default: tophat_output_dir)

 -m-uフラグでmapとunmapのbamファイルを直接指定してもいいが、tophatの出力ディレクトリを指定すると自動でbamを見分けてくれる。ランが終わると、修復されたunmapped_fixup.bamとlogファイルが出力される。

 

 

引用

TopHat-Recondition: a post-processor for TopHat unmapped reads

Brueffer C, Saal LH

BMC Bioinformatics. 2016 May 4;17(1):199