get_cell_meta_data {gtrellis} | R Documentation

## Get meta data in a cell

### Description

Get meta data in a cell

### Usage

    get_cell_meta_data(name, category, track)

### 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

    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")
    }

[Package gtrellis version 1.14.0 Index]