Sunburst plot for enriched GO term

sunburstGO(
  df,
  org,
  g,
  termID = "ID",
  fill = "qvalue",
  sub_rect = NULL,
  GO_annotation_level_cutoff = 4,
  filterNodesByEdgeNumber = 2,
  mustkeep = c(),
  onlyKeep = c(),
  fillNAby0 = TRUE,
  onto = c("BP", "CC", "MF"),
  plotBy = c("plotly", "ggplot2"),
  ...
)

Arguments

df

A data frame with enriched GO terms

org

An OrgDb object

g

An igraph graph. Output of getGraph.

termID

Column name in df which store the GO IDs

fill

Column name in df used to set the fill colors

sub_rect

Column name in df used to set the area of a proportional sub-rectangle, which represent a share of the whole. The values should be a number in the range from 0 to 1. If it is a count number, it will be convert to a proportion by divided the total number of features in the term. Otherwise, will simply re-scale to .

GO_annotation_level_cutoff

The cutoff of the GO annotation levels

filterNodesByEdgeNumber

Filter the sub graphs by the edge numbers.

mustkeep

The GO terms must be kept.

onlyKeep

Only keep branches with give GO terms.

fillNAby0

Fill the NA values by 0 or not for the color column.

onto

The ontology category of the GO IDs

plotBy

plot tools, plotly or ggplot2.

...

parameter passed to ggSunburst.

Value

A plot handle

Examples

library(org.Dr.eg.db)
df <- data.frame(
    ID = c("GO:0007267", "GO:0099536", "GO:0099537", "GO:0098916"),
    qvalue = -10 * log10(runif(4, max = 0.05))
)
sunburstGO(df, org.Dr.eg.db)