Learn R Programming

misha (version 5.11.23)

gtrack.modify: Modifies track contents

Description

Modifies 'Dense' track contents.

Usage

gtrack.modify(track = NULL, expr = NULL, intervals = NULL)

Value

None.

Arguments

track

track name

expr

track expression

intervals

genomic scope for which track is modified

Details

This function modifies the contents of a 'Dense' track by the values of 'expr'. 'intervals' argument controls which portion of the track is modified. The iterator policy is set internally to the bin size of the track.

The new values are written to a staging copy of the track's data files and swapped in only once the whole modification has succeeded, so an interrupt or an error leaves the track exactly as it was. The staging copy needs as much free space as the part of the track being rewritten, which on a database in indexed format is the track's whole data file.

See Also

gtrack.create, gtrack.rm

Examples

Run this code
# \dontshow{
options(gmax.processes = 2)
# }

gdb.init_examples()
intervs <- gintervals(1, 300, 800)
gextract("dense_track", intervs)
gtrack.modify("dense_track", "dense_track * 2", intervs)
gextract("dense_track", intervs)
gtrack.modify("dense_track", "dense_track / 2", intervs)

Run the code above in your browser using DataLab