Facet
Auto-generated from the config schema in the source — see the config guide for concepts. Built into JBrowse core. View source.
The facet setting of the feature, multi-sample variant, mark and
alignments displays: one labelled section of the track per value of a field. A string
is the field; the object adds the order. The mark display's MarkFacet
adds the steps each section runs. On the variant display the
field is a sample attribute from the samples file, such as population,
and it bands the sample rows by its value, with no chip.
Example usage
{ type: 'LinearBasicDisplay', facet: 'strand' }{
type: 'LinearBasicDisplay',
facet: { field: 'gene_biotype', sort: ['protein_coding', 'lncRNA'] },
}{
type: 'LinearAlignmentsDisplay',
facet: { field: 'tags.HP', sort: ['1', '2'] },
}Related links
- Extended by: SectionFacet
Config slots
A setting written to it names members one by one: a member left out stays as it is, and null resets one. One that changes field first clears sort, which name the old values, except those it states. Slot types (fileLocation, frozen, ...) are explained in the config slot types reference. Slots a base configuration contributes are listed here too, so this table is the whole surface.
| Slot | Description |
|---|---|
fieldfeatureField = '' | The feature field whose values each get a labelled section of the track: a field name, a dotted path into a structured field (INFO.SVTYPE, a read's tags.HP), a jexl: expression, or strand. A feature with no value stacks last, under field: none ((no value) for a jexl: field, whose sections show the value alone). The variant display reads a sample attribute instead, and the mark displays group, their rows.groups. The alignments displays also take a read dimension here: firstOfPairStrand, pairOrientation, pairing, split, spliced, mapq, mateRefName or mateAssembly. Writing facet: "strand" sets this slot. |
sortstringArray of strings or numbers = [] | The values whose sections stack first, in order, as Vega-Lite's sort lists them: the rest follow sorted, and none is dropped. Empty stacks every section sorted, and a strand facet forward, reverse, then unstranded (1, -1, 0). |