The graphical fragment assembly (GFA) フォーマットは、シーケンスグラフを表現するための新しい標準フォーマットである。GFA 1は主にアセンブリグラフを対象としていたが、新しい GFA 2 フォーマットはいくつかの機能を導入しており、scaffoldingグラフ、バリエーショングラフ、アラインメントグラフ、カラーメタゲノムグラフなど、他の種類の情報を表現するのに適している。ここでは、GFAフォーマットの配列グラフを可視化するためのインタラクティブなグラフィカルツールであるGfaVizを紹介する。このソフトウェアは、GFA 2のすべての新機能をサポートし、その可視化のための規約を紹介している。ユーザーは、単一の要素やグループを表現するために、2つの異なるレイアウトと複数のスタイルから選択することができる。すべてのカスタマイズは、外部の設定ファイルを必要とせずに、GFAフォーマットのカスタムタグに保存することができる。スタイルシートは、ファイルのグループの標準設定オプションを保存するためにサポートされている。ビジュアライゼーションは、ラスターおよびベクターグラフィック形式にエクスポートすることができる。コマンドラインインターフェースにより、画像のバッチ生成が可能になっている。GfaVizは https://github.com/ggonnella/gfaviz から入手できる。
specification of the Graphical Fragment Assembly (GFA) format.
GitHub - GFA-spec/GFA-spec: Graphical Fragment Assembly (GFA) Format Specification
インストール
ubuntu18.04にでソースからビルドしてテストした。qmake-qtの代わりにqmakeを使用してmakefile を生成した。
ビルド依存
- Qt framework. For this reason, Qt5 needs to be installed on your system (link)
- GCC version 7.1.0 or newer and clang version 3.8.0 or newer
本体 Github
git clone https://github.com/ggonnella/gfaviz
cd gfaviz
qmake-qt5
#SVG support
qmake-qt5 NOSVG=true
make
> ./gfaviz -h
$ ./gfaviz -h
Warning: QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-kazu'
Usage: ./gfaviz [options] [filenames...]
Options:
-h, --help Displays this help.
-r, --render Render graph(s) into file(s).
-o, --output <filename> Render graph(s) into <filename>
-f, --output-format <format> File format for the output. If no value
is specified, format will be inferred
from the file suffix specified in the
--output option. Possible values: BMP,
PNG, JPG, JPEG, PBM, XBM, XPM, SVG.
Default: PNG
-W, --width <width> Width of the output file in pixels.
-H, --height <height> Height of the output file in pixels.
-t, --transparency Transparent background in rendered
images (only png).
-s, --usestyle <filename> Use the style options represented by the
stylesheet <filename>.
--bg-color <value> Background color.
Default: #00ffffff
--labels Add all labels to the graph.
Default: false
--seg-labels Add segment labels to the graph.
Default: false
--edge-labels Add edge labels to the graph.
Default: false
--gap-labels Add gap labels to the graph.
Default: false
--group-labels Add group labels to the graph.
Default: false
--fragment-labels Add fragment labels to the graph.
Default: false
--no-gaps Do not show gaps in the graph.
Default: false
--no-fragments Do not show fragments in the graph.
Default: false
--no-groups Do not show groups in the graph.
Default: false
--seg-width <value> Width of the segments.
Default: 2.00
--seg-outline-width <value> Width of the segment outline.
Default: 0.50
--seg-color <value> Color of the segment.
Default: #e9ffdd
--seg-outline-color <value> Color of the segment outline.
Default: #000000
--seg-max-sub <value> Maximum number of subsegments in segment
representation.
Default: 10
--seg-as-arrow Indicate segment direction with arrow.
Default: false
--edge-width <value> Width of the links/edges.
Default: 1.00
--edge-color <value> Color of the links/edges.
Default: #000000
--edge-highlights-show Always show highlight of the overlapped
parts of edges on segments.
Default: false
--edge-highlights-color <value> Color of the edge-highlights on
segments. Tip: use low alpha value.
Default: #32ff0000
--edge-highlights-color-random Randomize color of the edge-highlights
on segments.
Default: false
--dovetail-width <value> Width of dovetail links.
Default: 1.00
--dovetail-length <value> Length of dovetail links.
Default: 10.00
--dovetail-color <value> Color of dovetail links.
Default: #000000
--internal-width <value> Width of non-dovetail links.
Default: 1.00
--internal-length <value> Length of internal links.
Default: 80.00
--internal-color <value> Color of non-dovetail links.
Default: #000000
--group-width <value> Width of the groups.
Default: 1.20
--group-colors <value> Colors of the groups, separated by
commas.
Default: red,orange,pink,green
--gap-width <value> Width of the gaps.
Default: 1.00
--gaps-as-edges Use gaps as edges in layout computation.
Default: false
--gap-length <value> Gap length factor if --gaps-as-edges is
set.
Default: 10.00
--gap-color <value> Color of positive-length gaps.
Default: #668074
--neg-gap-color <value> Color of negative-length gaps.
Default: #c09090
--fragment-width <value> Width of the fragments.
Default: 1.00
--fragment-color <value> Color of the fragments.
Default: #009000
--rev-fragment-color <value> Color of the fragments in rev
orientation.
Default: #cf0000
--fwd-fragment-color <value> Color of the fragments in fwd
orientation.
Default: #009000
--fragment-dist <value> Distance of fragments from segments.
Default: 1.00
--fragment-conn-color <value> Color of connection of fragments to
segments.
Default: #000000
--fragment-conn-width <value> Width of connection of fragments to
segments.
Default: 0.50
--fragment-minlength <value> Min length of fragment representation.
Default: 0.10
--fragment-multlength <value> Multiplier of fragment length.
Default: 1.00
--fragment-highlights-show Always show highlight of the overlapped
parts of fragments on segments.
Default: false
--fragment-highlights-color <value> Color of the fragment-highlights on
segments. Tip: use low alpha value.
Default: #32ff00ff
--label-font <value> Font family of all labels.
Default: Arial
--label-size <value> Font point size of all labels.
Default: 4.50
--label-color <value> Font color of all labels.
Default: #000000
--label-outline-width <value> Font outline width of all labels.
Default: 1.00
--label-outline-color <value> Font outline color of all labels.
Default: #ffffff
--seg-label-font <value> Font family of the segment labels.
Default: Arial
--seg-label-size <value> Font point size of the segment labels.
Default: 4.50
--seg-label-color <value> Font color of the segment labels.
Default: #000000
--seg-label-outline-width <value> Font outline width of the segment
labels.
Default: 1.00
--seg-label-outline-color <value> Font outline color of the segment
labels.
Default: #ffffff
--edge-label-font <value> Font family of the edge labels.
Default: Arial
--edge-label-size <value> Font point size of the edge labels.
Default: 4.50
--edge-label-color <value> Font color of the edge labels.
Default: #000000
--edge-label-outline-width <value> Font outline width of the edge labels.
Default: 1.00
--edge-label-outline-color <value> Font outline color of the edge labels.
Default: #ffffff
--group-label-font <value> Font family of the group labels.
Default: Arial
--group-label-size <value> Font point size of the group labels.
Default: 4.50
--group-label-color <value> Font color of the group labels.
Default: #000000
--group-label-outline-width <value> Font outline width of the group labels.
Default: 1.00
--group-label-outline-color <value> Font outline color of the group labels.
Default: #ffffff
--gap-label-font <value> Font family of the gap labels.
Default: Arial
--gap-label-size <value> Font point size of the gap labels.
Default: 4.50
--gap-label-color <value> Font color of the gap labels.
Default: #000000
--gap-label-outline-width <value> Font outline width of the gap labels.
Default: 1.00
--gap-label-outline-color <value> Font outline color of the gap labels.
Default: #ffffff
--frag-label-font <value> Font family of the fragment labels.
Default: Arial
--frag-label-size <value> Font point size of the fragment labels.
Default: 4.50
--frag-label-color <value> Font color of the fragment labels.
Default: #000000
--frag-label-outline-width <value> Font outline width of the fragment
labels.
Default: 1.00
--frag-label-outline-color <value> Font outline color of the fragment
labels.
Default: #ffffff
--seg-label-showlength Show segment length in label.
Default: false
--seg-label-seq Show segment sequence as label.
Default: false
--minweight <value> Minimum length of fragments and
segments, expressed in fraction of the
longest segment length divided by the max
number of subsegments.
Default: 0.20
--weight-factor <value> Weight factor for the computation of
segments and fragment lengths.
Default: 1.00
--fmmm Use the FMMM layouting algorithm, which
is faster than the default (SM).
Default: false
Arguments:
filenames Name of the file(s) to be opened.
実行方法
ここではGUI版を使う。CUI版を使うには"--no-gui"フラグを立てる。
./gfaviz
File => Open GFA fileからGFAファイルを読み込む。 GFA1とGFA2に対応している。
グラフを選択すると、そのグラフに関する情報が右のウィンドウに表示される。
labelにチェックを付けた。
GFAファイルの修正はGfaPyの使用が推奨されている。
引用
GfaViz: flexible and interactive visualization of GFA sequence graphs
Giorgio Gonnella, Niklas Niehus, Stefan Kurtz Author Notes
Bioinformatics, Volume 35, Issue 16, 15 August 2019, Pages 2853–2855
関連