MarkTransform
Auto-generated config schema for the current JBrowse release — see the config guide for concepts. Provided by the marks plugin. View source.
Example usage
Count features per bin that follows the zoom:
transform: [
{ type: 'bin', step: 'auto' },
{ type: 'aggregate', ops: [{ op: 'count' }] },
]
See the Config slots section below for all available configuration fields.
One step of a transform list, which runs over the region's features in
order, each step reading what the one before it answered. A step names its
type and takes that step's own settings; a key belonging to another step
is refused at load.
filter keeps the features an expression admits; formula writes an
expression's value into a field; bin snaps each feature to a
genome-aligned bin; aggregate folds each group into one feature carrying
its summaries; coverage replaces the features with runs of how many
overlap each stretch; flatten fans out an array field; pileup writes
each feature's row in a greedy first-fit packing.
Config slots
A MarkTransform is one of the types its rows begin with, named by its type, and takes only that type's rows: filter.expr is written { "type": "filter", "expr": ... }, and a key belonging to another type is refused where the config is read. 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 |
|---|---|
filter.exprstring = '' | A jexl callback over feature. The features it admits are kept and the rest dropped before the steps behind it run.callback args: feature |
formula.exprstring = '' | A jexl callback over feature whose value is written into as.callback args: feature |
formula.asstring = 'value' | The field the value is written to. |
bin.stepnumber = 10000 | The bin width in bp, aligned to the genome, or "auto" for a width that follows the view's zoom — the target of four pixels per bin, snapped up to the next 1/2/5 rung, resolved before the fetch and keyed into it. |
bin.fieldstring = 'start' | The field placing a feature in a bin: a name, or a dotted path into a structured field (INFO.END). A formula step in front computes one. |
bin.asstringArray = DEFAULT_BIN_AS | The two fields the bin's edges are written to. An aggregate behind the bin that names no groupby groups by these. |
aggregate.ops.opstringEnum (count, sum, mean, min, max) = 'count' | count needs no field; sum, mean, min and max read one. |
aggregate.ops.fieldstring = '' | The feature field the op reads, for every op but count. |
aggregate.ops.asstring = '' | The output field. Empty is count, or <op>_<field>. |
aggregate.groupbystringArray = [] | The fields whose distinct value sets make the groups. Empty takes the edges a bin in front wrote, so binning and counting needs no restatement; with no bin in front it folds the whole region into one feature. |
aggregate.opstypes.array(aggregateOpSchema) | The summaries each group carries. |
coverage.asstring = 'coverage' | The field each run's depth is written to. |
flatten.fieldstring = 'subfeatures' | The array field fanned out, one feature per element: a name or a dotted path. |
flatten.indexstring = '' | The field each element's position in its array is written to. Empty writes none. |
flatten.keepEmptyboolean = false | Keep a feature whose array field holds nothing, which is otherwise dropped. |
pileup.asstring = 'row' | The field each feature's row is written to, which a span encoding row then reads. |
pileup.fieldsstringArray = DEFAULT_PILEUP_FIELDS | The two fields giving the interval it packs. |
pileup.paddingnumber = 0 | bp of clearance kept between two features sharing a row, so a pileup does not butt its reads together. |
Related links
- Guide: Mark display