Learn R Programming

ontologyPlot (version 1.0)

onto_plot: Get ontology_plot object

Description

Get ontology_plot object

Usage

onto_plot(ontology, term_sets = NULL, frequencies = NULL, terms = remove_uninformative_terms(ontology, lapply(term_sets, get_ancestors, ontology = ontology)), edge_attributes = list(color = "#000000", lty = "solid"), fillcolor = "powderblue", label = simple_labels, color = "transparent", width = 0.75, fontsize = 15, 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

write_dot

Examples

Run this code
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
)

Run the code above in your browser using DataLab