Skip to contents

This function could be called in two scenarios:

  1. With create_document = FALSE: To retrieve an image of that event's Diagram.

  2. With create_document = TRUE: To retrieve a PDF document with the event's diagram image and additional information.

see "Details section" for more information


  save_to = NULL,
  create_document = FALSE,
  resource = "TOTAL",
  diagram_profile = "Modern",
  analysis_profile = "Standard",
  token = NULL,
  exp_column = NULL,
  document_level = 1,
  output_format = "png",
  image_quality = 5,
  flag_element = NULL,
  flg_interactors = TRUE,
  sel = NULL,
  title = TRUE,
  margin = 15,
  ehld = FALSE,



Reactome event's identifier.


NULL or Character:

  • NULL: Save the file to an automatically-generated path.

  • Character string: A valid file path to save the file to.


logical: Create PDF document instead of image? ( default = FALSE)


The analysis resource for which the results will be overlaid on top of the given pathways overview,


Color profile of diagrams, should be either "Modern" (default) or "Standard".


Color profile of analysis, should be one of: "Standard" (default), "Strosobar" or "Copper Plus"


The analysis Token for which the results will be overlaid on top of the given pathways overview. see: rba_reactome_analysis.


numeric: (only if token is supplied) Specify the expression column for the overlay.


numeric: (Only if "create_document" is TRUE) if 0 (default) the event's children will not be included in the PDF document. Set this to 1 to include event's children.


(Only if "create_document" is FALSE) Image format of the saved diagram. Can be one of: png (default), jpeg, svg or gif.


Numeric: (Only if "create_document" is FALSE), a number ranging from 1 to 10. 1 is the lowest quality and 10 is the highest (default = 5).


(Only if "create_document" is FALSE) gene name, protein ID, chemical ID or Reactome ID of a diagram's element to be flagged.


Logical: (Only if "create_document" is FALSE) Should the interactor be considered when flagging a diagram element? (default = TRUE)


(Only if "create_document" is FALSE) CSV line for highlighting element(s) selection in the diagram.


Logical: (Only if "create_document" is FALSE) Should the pathway name be displayed below the image? (default = TRUE)


Numeric: (Only if "create_document" is FALSE) A number ranging from 0 to 20 to set as the image's margin. (default = 15)


logical: (Only if "create_document" is FALSE) Should "Enhanced High Level Diagram" be considered?


rbioapi option(s). See rba_options's arguments manual for more information on available options.


NULL, Based to the inputs, an image or PDF file will be saved to disk.


If the function is called with create_document = FALSE:
The result will be an image with the format supplied in "output_format" argument. If the supplied event ID refers to a pathway, the image's content will be the that pathways diagram. If the supplied event ID refers to a sub-pathway or reaction event, the parent pathway's diagram will be exported, with that reaction or sub-pathway's events highlighted.
Note that to export an image of reaction-like event separately, you should use rba_reactome_exporter_reaction.
If the function is called with create_document = TRUE:
A PDF document will contain an image of the event's diagram and the following information of that events: Summation, Literature references, Edit history type, location, compartments and diseases. note that if you call the function with "document level = 1", information of your supplied event's children will also be included.

Corresponding API Resources

"GET .ext" "GET identifier.pdf"


  • Marc Gillespie, Bijay Jassal, Ralf Stephan, Marija Milacic, Karen Rothfels, Andrea Senff-Ribeiro, Johannes Griss, Cristoffer Sevilla, Lisa Matthews, Chuqiao Gong, Chuan Deng, Thawfeek Varusai, Eliot Ragueneau, Yusra Haider, Bruce May, Veronica Shamovsky, Joel Weiser, Timothy Brunson, Nasim Sanati, Liam Beckman, Xiang Shao, Antonio Fabregat, Konstantinos Sidiropoulos, Julieth Murillo, Guilherme Viteri, Justin Cook, Solomon Shorser, Gary Bader, Emek Demir, Chris Sander, Robin Haw, Guanming Wu, Lincoln Stein, Henning Hermjakob, Peter D’Eustachio, The reactome pathway knowledgebase 2022, Nucleic Acids Research, 2021;, kab1028,

  • Griss J, Viteri G, Sidiropoulos K, Nguyen V, Fabregat A, Hermjakob H. ReactomeGSA - Efficient Multi-Omics Comparative Pathway Analysis. Mol Cell Proteomics. 2020 Sep 9. doi: 10.1074/mcp. PubMed PMID: 32907876.

  • Reactome Content Services API Documentation

  • Citations note on Reactome website


if (FALSE) {
rba_reactome_exporter_diagram(event_id = "R-HSA-177929",
  create_document = FALSE)
if (FALSE) {
rba_reactome_exporter_diagram(event_id = "R-HSA-6787403",
    create_document = FALSE)
if (FALSE) {
rba_reactome_exporter_diagram(event_id = "R-HSA-177929",
    create_document = TRUE)
if (FALSE) {
rba_reactome_exporter_diagram(event_id = "R-HSA-177929",
    output_format = "svg",
    save_to = "reactome_event_diagram.svg")