Skip to contents

Assigns value to a track attribute.

Usage

gtrack.attr.set(track = NULL, attr = NULL, value = NULL)

Arguments

track

track name

attr

attribute name

value

value

Value

None.

Details

This function creates a track attribute and assigns 'value' to it. If the attribute already exists its value is overwritten.

If 'value' is an empty string the attribute is removed.

Error is reported on an attempt to modify a value of a read-only attribute.

Tracks of model predictions conventionally carry these attributes, which misha only stores and carries along: 'value.scale', the scale of the values (e.g. "log2(x+1)" or "linear"); 'model', the model that made them; 'checkpoint', the model checkpoint; and 'heldout.chroms', the chromosomes held out of training. Like any attribute, they are written with the track's column by gextract(file = "x.parquet") and restored by gtrack.import_parquet.

Examples


gdb.init_examples()
gtrack.attr.set("sparse_track", "test_attr", "value")
gtrack.attr.get("sparse_track", "test_attr")
#> [1] "value"
gtrack.attr.set("sparse_track", "test_attr", "")