Highlights
A highlight is a translucent band over a genomic region. Every linear genome view (LGV) and dotplot showing the region's assembly draws it, and the session saves it, so a shared link carries it. The highlight list, opened from Tools → Highlights or Open highlight list in an LGV's menu, holds every highlight with a link back to it.
Making a highlight
- Drag across the scalebar at the top of an LGV and pick Highlight region.
- On a dotplot, drag a rectangle and pick Highlight region: the horizontal span bands the horizontal axis and the vertical span the vertical one.
- Press
Ctrl/Cmd+Shift+Dto highlight the region in view. - Import a BED or TSV file from the highlight list's menu.
- Pass them in a URL, a session or code, below.
The highlight list
- The link in the Location column navigates the focused LGV on that assembly, or
opens one, zoomed out a little for context.
Ctrl/Cmd+Shift+Mnavigates to the newest highlight. - Click a Label cell and type to name a highlight. Show… → Show highlight labels in an LGV's menu shows or hides the names on the bands.
- The Color column sets a band's color. Tick rows to recolor or delete several at once.
- The list shows the highlights on an assembly some open view is showing, and says how many others it is hiding.
Showing, hiding and removing
Show highlights hides or shows the bands in every view at once. An LGV has it under Show…, a dotplot at the top of its menu, and the list in its own menu. Making or recoloring a highlight shows them again.
A band's chip menu has Dismiss highlight. In the list, tick rows and press the delete icon.
Export and import
Export writes the ticked highlights, or every listed one, as BED (one file per
assembly, 0-based starts) or TSV (one file with an assembly_name column,
1-based starts). Import reads either and adds to the list; a BED file takes the
assembly picked in the dialog.
Setting highlights in code
Each form below takes a locstring or an object; an object adds color (used
as-is, alpha included) and label, and an entry without assemblyName takes
the view's assembly.
In a URL, &highlight= beside &assembly= and
&loc=, several separated by spaces (%20):
live link.
&assembly=volvox&loc=ctgA:1-20000&highlight=ctgA:5000-8000
&highlight={"refName":"ctgA","start":5000,"end":8000,"color":"rgba(240,128,128,0.3)","label":"my region"}In a session spec or defaultSession, as highlight on a view. The dotplot
takes the same key (dotplot highlights):
{
"views": [
{
"type": "LinearGenomeView",
"assembly": "volvox",
"loc": "ctgA:1-20000",
"highlight": ["ctgA:5000-8000"]
}
]
}In a saved session, the session's highlights list, where each entry names
its assembly:
"highlights": [
{ "assemblyName": "volvox", "refName": "ctgA", "start": 5000, "end": 8000, "label": "my region" }
]In an embedded LGV or from a plugin, highlight in createViewState at
launch (Embedded components); after that, session.addHighlight takes
an object like the one above, session.setHighlights replaces the list ([]
clears it), and removeHighlight and updateHighlight take an entry of
session.highlights. A view's highlights lists the ones on its own
assemblies. The BaseSessionModel reference has
the rest.