get_cell_meta_data: Get meta data in a cell

Description Usage Arguments Details Value Author(s) Examples

Description

Get meta data in a cell

Usage

1

Arguments

name

name of the supported meta data, see 'details' section.

category

which category. By default it is the current category.

track

which track. By default it is the current track.

Details

Following meta data can be retrieved:

name

name of the category.

xlim

xlim without including padding. Cells in the same column share the same xlim.

ylim

ylim without including padding.

extended_xlim

xlim with padding.

extended_ylim

ylim with padding.

original_xlim

xlim in original data.

original_ylim

ylim in original data.

column

which column in the layout.

row

which row in the layout.

track

which track in the layout.

The vignette has a graphical explanation of all these meta data.

Value

Corresponding meta data that user queried.

Author(s)

Zuguang Gu <z.gu@dkfz.de>

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
gtrellis_layout(ncol = 4, n_track = 3)
add_track(panel.fun = function(gr) {
    print(get_cell_meta_data("xlim"))
    print(get_cell_meta_data("ylim"))
    print(get_cell_meta_data("extended_xlim"))
    print(get_cell_meta_data("extended_ylim"))
    print(get_cell_meta_data("original_xlim"))
    print(get_cell_meta_data("original_ylim"))
    print(get_cell_meta_data("name"))
    print(get_cell_meta_data("column"))
    print(get_cell_meta_data("row"))
    print(get_cell_meta_data("track"))
    cat("\n\n")
})

for(chr in paste0("chr", 1:22)) {
    print(get_cell_meta_data("xlim", category = chr, track = 1))
    print(get_cell_meta_data("ylim", category = chr, track = 1))
    print(get_cell_meta_data("extended_xlim", category = chr, track = 1))
    print(get_cell_meta_data("extended_ylim", category = chr, track = 1))
    print(get_cell_meta_data("original_xlim", category = chr, track = 1))
    print(get_cell_meta_data("original_ylim", category = chr, track = 1))
    print(get_cell_meta_data("name", category = chr, track = 1))
    print(get_cell_meta_data("column", category = chr, track = 1))
    print(get_cell_meta_data("row", category = chr, track = 1))
    print(get_cell_meta_data("track", category = chr, track = 1))
    cat("\n\n")
}

eilslabs/gtrellis documentation built on May 16, 2019, 1:25 a.m.