Get ontology_plot object

Share:

Description

A convenience wrapper for the get_ontology_plot function, enabling functions to be passed to generate graphical parameters for terms automatically.

Usage

1
2
3
4
5
6
onto_plot(ontology, term_sets = NULL, frequencies = NULL,
  terms = remove_uninformative_terms(ontology, term_sets),
  edge_attributes = list(color = "#000000", lty = "solid"),
  fillcolor = "powderblue", label = simple_labels, color = "transparent",
  width = 0.75, fontsize = 30, style = "filled", fixedsize = "true",
  shape = "circle", ...)

Arguments

ontology

ontology_index object

term_sets

List of character vectors of ontological term IDs

frequencies

Numeric vector of term frequencies named by term IDs

terms

Character vector of ontological terms

edge_attributes

List of properties to set for arrows (note, these properties will be used for all arrow).

fillcolor

Character vector of colours to fill nodes corresponding to terms with. Alternatively a function to set the colours of the nodes in the graph based on term_sets.

label

Character vector of labels (or function to set them).

color

Character vector of colours for borders of nodes representing terms (or function to set them).

width

Numeric vector of widths for nodes (of function to set them).

fontsize

Numeric vector of font sizes for the text to be placed in the nodes (or function to set them).

style

Display style for nodes, defaults to "filled".

fixedsize

Character indicating whether nodes should be fixed size, "true", or adjusted to fit around the contained text, "false".

shape

Character vector of shape names for nodes (or function to set them). Defaults to "circle".

...

Other node attributes for dot format.

Value

ontology_plot object.

See Also

get_ontology_plot, write_dot

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
library(ontologyIndex)
data(hpo)
hpo_phenotypes <- c(
	A=c("HP:0001382","HP:0004272","HP:0007917","HP:0004912","HP:0001596"),
	B=c("HP:0001382","HP:0004272","HP:0002165","HP:0004800","HP:0004912"),
	C=c("HP:0004800","HP:0001382","HP:0004912","HP:0007917","HP:0008743"),
	D=c("HP:0001257","HP:0001382","HP:0007917","HP:0012623","HP:0002165"),
	E=c("HP:0007917","HP:0004800","HP:0004272","HP:0001596","HP:0002165")
)

onto_plot(
	ontology=hpo,
	term_sets=hpo_phenotypes
)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.