Skip to main content

go-annotation-ribbon-strips

Overview

The Annotation Ribbon Strips component displays a grid of cells. Each row in the grid represents a subject (typically a gene), and each column represents a GO term. The color of each cell indicates the relative number of GO annotations for that subject to the term or one of its descendants in the ontology hierarchy. The columns are additionally grouped into categories which are visually separated in the display.

Events are fired when cells or cell headers (groups) are clicked or hovered over.

Properties

PropertyAttributeDescriptionTypeDefault
apiEndpointapi-endpointURL for the API endpoint to fetch the ribbon data when subjects are provided.string"https://api.geneontology.org/api/ontology/ribbon/"
binaryColorbinary-colorIf true, show only two colors (minColor and maxColor) to indicate the values of a cell. Otherwise, the color of a cell will be interpolated between minColor and maxColor based on the number of annotations or classes.booleanfalse
colorBycolor-byWhether to color cells by annotations or classes."annotations" | "classes""annotations"
colorScaleExponentcolor-scale-exponentExponent used to scale the color interpolation. A value of 1 will make the scale linear. Values less than 1 will make the color scale more sensitive to smaller values, while values greater than 1 will make it more sensitive to larger values.number0.25
groupClickablegroup-clickableIf true, the group labels are clickable and will trigger the groupClick eventbooleantrue
groupMaxLabelSizegroup-max-label-sizeMaximum size of group labels in characters.number60
maxColormax-colorColor of cells with the most number of annotations or classes. Any valid CSS color string can be used, such as "rgb(24,73,180)", "#1849b4", or "blue".string"rgb(24,73,180)"
maxColorLevelmax-color-levelMaximum number of annotations or classes before maxColor is applied. If 0, the maximum value is determined from the data.number0
minColormin-colorColor of cells with the least number of annotations or classes. Any valid CSS color string can be used, such as "rgb(255,255,255)", "#ffffff", or "white".string"rgb(255,255,255)"
selectedselectedIf no value is provided, the ribbon will load without any group selected. If a value is provided, the ribbon will show the requested group as selected The value should be the id of the group to be selectedstringundefined
selectionModeselection-modeSelection mode for the ribbon cells."cell" | "column""cell"
showAllAnnotationsGroupshow-all-annotations-groupIf true, show the "all annotations" group.booleantrue
showOtherGroupshow-other-groupIf true, show the "Other" group for each category.booleanfalse
subjectBaseUrlsubject-base-urlBase URL used when rendering subject label links.string"https://amigo.geneontology.org/amigo/gene_product/"
subjectOpenNewTabsubject-open-new-tabIf true, clicking a subject label will open the link in a new tab.booleantrue
subjectPositionsubject-positionPosition subject labels."left" | "none" | "right""left"
subjectssubjectsComma-separated list of gene IDs (e.g. RGD:620474,RGD:3889)stringundefined
subsetsubsetName of the GO subset used for grouping annotations.string"goslim_agr"

Events

EventDescriptionType
cellClickEmitted when a ribbon cell is clicked.CustomEvent<RibbonCellEvent>
cellEnterEmitted when the mouse enters a ribbon cell.CustomEvent<RibbonCellEvent>
cellLeaveEmitted when the mouse leaves a ribbon cell.CustomEvent<RibbonCellEvent>
groupClickEmitted when a group label is clicked.CustomEvent<RibbonGroupEvent>
groupEnterEmitted when the mouse enters a group label.CustomEvent<RibbonGroupEvent>
groupLeaveEmitted when the mouse leaves a group label.CustomEvent<RibbonGroupEvent>

Methods

setData(data: RibbonData | undefined) => Promise<void>

Sets the data for the ribbon manually.

Once this method is called, the provided data will be used and changes to the subjects, subset, or apiEndpoint properties will not trigger a data fetch.

Parameters

NameTypeDescription
dataRibbonData

Returns

Type: Promise<void>

CSS Custom Properties

NameDescription
--category-separator-widthWidth of the separator between group categories
--cell-border-collapseCollapse behavior of cell borders, can be collapse or separate
--cell-border-colorColor of cell borders
--cell-border-styleStyle of cell borders
--cell-border-widthWidth of cell borders
--cell-box-shadowBox shadow for cells
--cell-heightHeight of each cell
--cell-hovered-border-colorColor of the border when a cell is hovered
--cell-hovered-border-styleStyle of the border when a cell is hovered
--cell-hovered-border-widthWidth of the border when a cell is hovered
--cell-hovered-box-shadowBox shadow when a cell is hovered
--cell-selected-border-colorColor of the border when a cell is selected
--cell-selected-border-styleStyle of the border when a cell is selected
--cell-selected-border-widthWidth of the border when a cell is selected
--cell-selected-box-shadowBox shadow when a cell is selected
--cell-spacingSpacing between cells (this property has no effect unless --cell-border-collapse is set to separate)
--cell-widthWidth of each cell
--group-all-colorColor for the "all" group labels in each category
--group-all-font-weightFont weight for the "all" group labels in each category
--group-heightHeight of group labels
--group-other-colorColor for the "other" group labels in each category
--group-other-font-weightFont weight for the "other" group labels in each category
--group-text-transformText transformation for group labels
--loading-spinner-sizeSize of the loading spinner
--subject-paddingPadding for subject cells
--subject-widthWidth of subject cells