Skip to content

Latest commit

 

History

History
135 lines (104 loc) · 6.01 KB

README_go_plot.md

File metadata and controls

135 lines (104 loc) · 6.01 KB

Plot the GO hierarchy with go_plot.py

Plot six GO terms (listed in a file) using different colors and their ancestors

The colorized GO terms use the colors from the lightbright color palette and an orange (#ffe5b4) from the favorite pink based oranges color palette.

The file, go_heartjogging6.txt, contains the GO terms and user-defined colors:

#fad2fa GO:0072359  # BP 643 D04 circulatory system development (magenta)
#d2fafa GO:0003007  # BP 197 D04 heart morphogenesis (blue)
#fafad2 GO:0035050  # BP  26 D05 embryonic heart tube development (yellow)
#ffe5b4 GO:0003304  # BP   0 D06 myocardial epithelial involution involved in heart jogging (orange)
#e6fad2 GO:0061371  # BP  11 D06 determination of heart left/right asymmetry (green)
#d2d2fa GO:0003146  # BP   6 D07 heart jogging (purple)

Six different-colored GO terms without relationships

The six GO IDs listed in go_heartjogging6.txt and their ancestors up to the root GO are plotted.

scripts/go_plot.py --go_file=tests/data/go_plot/go_heartjogging6.txt -o heartjogging6_r0.png

heart_jogging_r0

Six different-colored GO terms with relationships

The -r argument causes relationships to be plotted.

scripts/go_plot.py --go_file=tests/data/go_plot/go_heartjogging6.txt -r -o heartjogging6_r1.png

heart_jogging_r0

Plot one GO term and its ancestors

Plot one term and all ancestors using the 'is_a' attribute.

scripts/go_plot.py GO:0003304

heart_jogging_r0

Plot one GO term and its ancestors (with relationships)

Plot one term and all ancestors using the 'is_a' attribute and all relationships (--r).
The 'part_of' relationships are represented by dashed magenta arrows.

scripts/go_plot.py GO:0003304 --r

heart_jogging_r1

Plot two GO terms and their ancestors

Plot two terms and all ancestors using the 'is_a' attribute.

scripts/go_plot.py GO:0003304 GO:0003146 -o heart_jogging.png

heart_jogging_r0

Plot two GO terms and their ancestors (with relationships)

Plot two terms and all ancestors using the 'is_a' attribute and all relationships (--r).
The 'part_of' relationships are represented by dashed magenta arrows.

scripts/go_plot.py GO:0003304 GO:0003146 --r -o heart_jogging_r1.png

heart_jogging_r1

Plot two GO terms (listed in a file) using different colors and their ancestors

Plot two terms and all ancestors using the 'is_a' attribute. The heart jogging GO term, GO:0003146, is colored in ice.

The file, go_file1.txt, contains the GO terms and user-defined colors:

GO:0003304
GO:0003146 #d6fffa http://klaash.github.io/xkcdcolorpicker/#ice
scripts/go_plot.py --go_file=tests/data/go_plot/go_file1.txt -o heart_jogging_ice_gofile1.png

heart_jogging_r0

Plot two GO terms using different colors and their ancestors

Plot two terms and all ancestors using the 'is_a' attribute.
The heart jogging GO term, GO:0003146, is colored in ice.

scripts/go_plot.py GO:0003304 GO:0003146#d6fffa -o heart_jogging_ice.png

heart_jogging_r0

Plot two GO terms using different colors and their ancestors (with relationships)

Plot two terms ('heart jogging' (GO:0003146) colored in ice) and all ancestors using the 'is_a' attribute and all relationships (--r).
The 'part_of' relationships are represented by dashed magenta arrows.

scripts/go_plot.py GO:0003304 GO:0003146#d6fffa --r -o heart_jogging_ice_r1.png

heart_jogging_r1

Chage orietation of plot output

With graphviz, it is possible to change the orientation of the graph output, which may be convenient for large graphs. Options are TB, LR, BT and RL mirroring GraphViz https://graphviz.org/docs/attrs/rankdir/

# top -> bottom (default)
scripts/go_plot.py GO:0000010 -o orientation_TB.png --obo=tests/data/mini_obo.obo --rankdir=TB

TB

# left -> right
scripts/go_plot.py GO:0000010 -o orientation_LR.png --obo=tests/data/mini_obo.obo --rankdir=LR

LR

Copyright (C) 2010-2018, DV Klopfenstein, Haibao Tang et al. All rights reserved.