2019 6/17 インストール追記
次世代シーケンシングデータの視覚化は、研究者が結果の質を評価し仮説を生成することを可能にするゲノミクスの基本的な部分である。したがって、ゲノムデータをブラウズするためのいくつかのプログラムは、ゲノミクスコミュニティの間で広く普及しており、例えばIGV(Robinson et al、2011)またはArtemis(Carver et al、2012)が一般的な選択肢である。全てではないにしても、ほとんどのゲノムブラウザはグラフィカルユーザインタフェース(GUI)を利用しており、プログラミング経験のない研究者にとって特に適した直感的な環境を作り出す。しかし、多くのバイオインフォマティシャンにとって、コマンドラインインターフェースはGUIよりも好まれ、より効率的なデータ分析が可能になる。コマンドラインインターフェース)は、実行されたコマンドをより細かく制御し、繰り返しの作業を簡単に合理化する。さらに、実行されたコマンドはプロジェクトのドキュメントの一部になることがある。さらに、ゲノムデータはリモートサーバ上に存在することが多く、そのようなデータをローカルに転送することは非実用的ではない。特に、分析者がデータを大雑把な探索する必要がある場合は特にそうである。
ASCIIGenomeは、ターミナルから直接実行するように設計されたブラウザで、コマンドラインインターフェースを使用している。グラフィカル出力は、ターミナルウィンドウ上でASCII文字でレンダリングされるため、リモートサーバーで実行するのに適している。 UNIXのコマンドラインインターフェイスに慣れている研究者は、ASCIIGenomeも同様によく知られているはずである。 SAMTools tview(Li et al、2009)は端末ウィンドウ用に設計されているが、その機能は非常に限られている。一部のブラウザでは、データをバッチ処理(IGV)したり、コマンドラインオプション(Artemis)を受け入れることができるが、GUIの表示やインタラクティブブラウジングに頼っているブラウザもある。ASCIIGenomeは一般的なGUIブラウザと同様の機能を備えているが、コマンドラインで完全に操作して端末ウィンドウにデータを視覚化する。
マニュアル
http://asciigenome.readthedocs.io/en/latest/
インストール
https://github.com/dariober/ASCIIGenome
実行ファイルはリリースからもダウンロードできる。またはcondaかbrewで導入できる。
#bioconda(linux)
conda install -c bioconda -y asciigenome
#homebrew
brew install https://raw.githubusercontent.com/dariober/ASCIIGenome/master/install/brew/asciigenome.rb
$ asciigenome -h
usage: ASCIIGenome [-h] [--batchFile BATCHFILE] [--region REGION] [--fasta FASTA] [--exec EXEC] [--noFormat] [--nonInteractive] [--config CONFIG] [--showMem] [--showTime] [--debug {0,1,2}] [--version] [input [input ...]]
DESCRIPTION
Genome browser at the command line.
For details see http://asciigenome.readthedocs.io/
positional arguments:
input Input files to be displayed: bam, bed, gtf, bigwig, bedgraph, etc
optional arguments:
-h, --help show this help message and exit
--batchFile BATCHFILE, -b BATCHFILE
Bed or gff file of regions to process in batch. Use - to read from stdin. ASCIIGenome will iterate through the regions in this file
--region REGION, -r REGION
Go to region. Format 1-based as 'chrom:start-end' or 'chrom:start' or 'chrom'. E.g. chr1:1-1000
Optional reference fasta file.
If given, must be indexed, e.g. with `samtools faidx ref.fa`
--exec EXEC, -x EXEC Commands to be executed at the prompt. Either a single string, e.g. 'goto chr1 && next && seqRegex ACTG' or a file with one command per line.
--noFormat, -nf Do not format output with non ascii chars (colour, bold, etc.) (default: false)
--nonInteractive, -ni Non interactive mode: Exit after having processed cmd line args. (default: false)
--config CONFIG, -c CONFIG
Source of configuration settings. It can be a local file or a tag matching a built-in configuration: 'black_on_white', 'white_on_black', 'metal'. If null, first try to read configuration from file '~/.
asciigenome_config'. If this file is missing use a built-in setting. For examples of configuration files see https://github.com/dariober/ASCIIGenome/blob/master/resources/config/ (default: metal)
--showMem, -sm Show memory usage. Typically used for debugging only. (default: false)
--showTime, -st Show time elapsed to process tracks. Typically used for debugging only. (default: false)
--debug {0,1,2} Set debugging mode. 0: off; 1: print exception stack traces; 2: print stack traces and exit. (default: 0)
--version, -v
ラン
2サンプルのbamをリファレンス付きで表示する(3つ以上のbamも表示可能)
asciigenome -fa reference.fa input1.bam input2.bam
- f 右向きにウィンドウサイズの1/10だけ移動。
- ff 右向きにウィンドウサイズの半分だけ移動。
- +10000 右向きに10000bp移動。(-10000なら左向き)。
- 750000 ポジション750000にジャンプ(+/-はつけない)。
- goto chr19 chr19の先頭にジャンプ
- goto chr19: 3000 chr19のポジション3000にジャンプ
- r 左向きにウィンドウサイズの1/10だけ移動。
- rr 左向きにウィンドウサイズの半分だけ移動。
- Enter Enterだけ打つと直前のコマンドの繰り返し。
- zo 2 2倍に縮小。
- zi 2 2倍に拡大。
h + Enterでヘルプを表示できる。qで終了する。またfastaがなくても開くことができる。bed、gtfも表示できる。
オーサーが利点の1つとして挙げているように、GUIのないサーバーにいれておくと重宝すると思います。GUIが利用できる環境でも、IGVは立ち上がりが遅くクラッシュも多いので、特定の変異部位を確認するなどのタスクならASCIIGenomeのほうがはるかに高速かつ簡単だと思います。(起動してポジション手打ちすれば素早く表示できる。(5~10秒))。
引用
ASCIIGenome: a command line genome browser for console terminals.
Beraldi D
Bioinformatics. 2017 May 15;33(10):1568-1569.