gtrack.2d.create: Creates a 'Rectangles' track from intervals and values

View source: R/track-2d.R

gtrack.2d.createR Documentation

Creates a 'Rectangles' track from intervals and values

Description

Creates a 'Rectangles' track from intervals and values.

Usage

gtrack.2d.create(
  track = NULL,
  description = NULL,
  intervals = NULL,
  values = NULL
)

Arguments

track

track name

description

a character string description

intervals

a set of two-dimensional intervals

values

an array of numeric values - one for each interval

Details

This function creates a new 'Rectangles' (two-dimensional) track with values at given intervals. 'description' is added as a track attribute.

Value

None.

See Also

gtrack.create, gtrack.create_sparse, gtrack.smooth, gtrack.modify, gtrack.rm, gtrack.info, gdir.create, gtrack.attr.get

Examples



gdb.init_examples()
intervs1 <- gintervals.2d(
    1, (1:4) * 200, (1:4) * 200 + 100,
    1, (1:4) * 300, (1:4) * 300 + 200
)
intervs2 <- gintervals.2d(
    "X", (7:10) * 100, (7:10) * 100 + 50,
    2, (1:4) * 200, (1:4) * 200 + 130
)
intervs <- rbind(intervs1, intervs2)
gtrack.2d.create(
    "test_rects", "Test 2d track", intervs,
    runif(dim(intervs)[1], 1, 100)
)
gextract("test_rects", .misha$ALLGENOME)
gtrack.rm("test_rects", force = TRUE)


misha documentation built on Sept. 14, 2023, 5:08 p.m.