onto_plot | R Documentation |
ontology_plot
objectA convenience wrapper for the get_ontology_plot
function, enabling functions to be passed to generate graphical parameters for terms
automatically.
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",
...
)
ontology |
|
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 |
label |
Character vector of labels (or function to set them). |
color |
Character vector of colours for borders of nodes representing |
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 |
fixedsize |
Character indicating whether nodes should be fixed size, |
shape |
Character vector of shape names for nodes (or function to set them). Defaults to |
... |
Other node attributes for dot format. |
ontology_plot
object.
get_ontology_plot
, write_dot
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
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.