Skip to main content

go-gocam-viewer

Overview

The GO-CAM Viewer component renders a GO-CAM as a graph of activities and their relationships. The sidebar displays a list of the activities, grouped by the larger GO biological_process in which the activity is a part, and showing additional details such as the gene product that carries out the activity and the GO cellular_component in which the activity occurs.

For advanced use cases, the legend can be displayed separately.

Usage

Basic Usage

<go-gocam-viewer gocam-id="635b1e3e00001811"></go-gocam-viewer>

Properties

PropertyAttributeDescriptionTypeDefault
apiUrlapi-urlThe url used to fetch GO-CAM graphs. Any occurrence of %ID in the string will be replaced by the GO-CAM ID.string"https://api.geneontology.org/api/go-cam/%ID"
gocamIdgocam-idID of the GO-CAM to be shown in this widget. If provided, the GO-CAM will automatically be fetched using this ID and the value of the api-url prop. If omitted, data will not automatically be fetched, but can be provided via the setModelData method. This may be useful if the host page already has the GO-CAM data.stringundefined
showLegendshow-legendShow/hide default legendbooleantrue

Events

EventDescriptionType
layoutChangeCustomEvent<any>
nodeClickCustomEvent<any>
nodeOutCustomEvent<any>
nodeOverCustomEvent<any>

Methods

resetView() => Promise<void>

Center the cytoscape graph to fit the whole graph

Returns

Type: Promise<void>

setAutoFocus(shouldAF: any) => Promise<void>

Define if the GO-CAM viz should capture the mouse scroll

Parameters

NameTypeDescription
shouldAFanyset to true if you want a mouse scroll to be captured by the component

Returns

Type: Promise<void>

setModelData(model: any) => Promise<void>

Manually supply GO-CAM data to be rendered. This will overwrite any data previously fetched using the gocamId and apiUrl props, if they were provided.

Parameters

NameTypeDescription
modelanyGO-CAM object

Returns

Type: Promise<void>

toggleComplex() => Promise<void>

Returns

Type: Promise<void>

Shadow Parts

PartDescription
"activities-panel"The panel containing the process and activities list
"activity"An activity in the process and activities list
"function-label"A function term name in process and activities list
"gene-product"A gene product name in process and activities list
"gocam-graph"The GO-CAM graph container
"gocam-panel"The panel containing the GO-CAM graph and legend
"gocam-title"The GO-CAM title
"legend-header"The header of the legend
"legend-section"An individual legend entry
"legend-sections"A group of entries in the legend
"process"A process group in the process and activities list
"process-label"A process label in the process and activities list

CSS Custom Properties

NameDescription
--activity-backgroundBackground of activity containers in processes and activities panel
--activity-background-activeBackground of activity containers in processes and activities panel when highlighted
--activity-border-colorBorder color of activity containers in processes and activities panel
--activity-border-widthBorder width of activity containers in processes and activities panel
--activity-colorText color of activity containers in processes and activities panel
--activity-color-activeText color of activity containers in processes and activities panel when highlighted
--activity-color-link-hoverAnchor link hover color in processes and activities panel
--activity-paddingPadding of activity containers in processes and activities panel
--border-colorDefault color of various borders used in the widget
--button-backgroundBackground of buttons in widget
--button-background-hoverBackground of buttons in widget on hover
--button-border-colorBorder color of buttons in widget
--button-border-radiusBorder radius of buttons in widget
--button-border-widthBorder width of buttons in widget
--button-colorText color of button text in widget
--function-label-backgroundBackground of molecular function term labels in processes and activities panel
--function-label-border-colorBorder color of molecular function term labels in processes and activities panel
--function-label-border-widthBorder width of molecular function term labels in processes and activities panel
--function-label-colorText color of molecular function term labels in processes and activities panel
--function-label-paddingPadding of molecular function term labels in processes and activities panel
--function-nodes-paddingPadding of related nodes container in processes and activities panel
--gene-product-backgroundBackground of gene product labels in processes and activities panel
--gene-product-border-colorBorder color of gene product labels in processes and activities panel
--gene-product-border-widthBorder width of gene product labels in processes and activities panel
--gene-product-colorText color of gene product labels in processes and activities panel
--gene-product-paddingPadding of gene product labels in processes and activities panel
--graph-heightHeight of GO-CAM graph container
--graph-paddingPadding of GO-CAM graph container
--legend-border-colorBorder color of legend container
--legend-border-widthBorder width of legend container
--legend-header-backgroundBackground of legend header
--legend-header-border-colorBorder color of legend header
--legend-header-border-widthBorder width of legend header
--legend-header-colorText color of legend header
--legend-header-paddingPadding of legend header
--legend-marginMargin of legend container
--legend-paddingPadding of legend container
--node-align-itemsAlign-items of related node info
--node-backgroundBackground of related node info in processes and activities panel
--node-border-colorBorder color of related node info in processes and activities panel
--node-border-widthBorder width of related node info in processes and activities panel
--node-colorText color of related node info in processes and activities panel
--node-paddingPadding of related node info in processes and activities panel
--panel-border-colorBorder color of the main panels of the widget
--panel-border-widthBorder width of the main panels of the widget
--panel-header-backgroundBackground of main panel headers
--panel-header-border-colorBorder color of main panel headers
--panel-header-border-widthBorder width of main panel headers
--panel-header-colorText color of main panel headers
--panel-header-font-weightText font weight of main panel headers
--panel-header-paddingPadding of main panel headers
--process-backgroundBackground of process containers in processes and activities panel
--process-border-colorBorder color of process containers in processes and activities panel
--process-border-widthBorder width of process containers in processes and activities panel
--process-colorText color of process containers in processes and activities panel
--process-label-backgroundBackground of process labels in processes and activities panel
--process-label-border-colorBorder color of process labels in processes and activities panel
--process-label-border-widthBorder width of process labels in processes and activities panel
--process-label-colorText color of process labels in processes and activities panel
--process-label-paddingPadding of process labels in processes and activities panel
--process-paddingPadding of process containers in processes and activities panel