getXScale {biovizBase} | R Documentation

## get x scale breaks and labels

### Description

get x scale breaks and labels for GRanges with different coordintes(currently only "truncate_gaps" and "genome" supported).

### Usage

     ## S4 method for signature 'GRanges'
    getXScale(obj, type = c("default", "all", "left", "right"))

### Arguments

`obj` | a `GRanges` object. "coord" in metadata shows proper coordinates transformation for this object.
`type` | types of labels for transformed data.

### Value

list of breaks and labels.

### Author(s)

Tengfei Yin

### Examples

    library(GenomicRanges)
    gr1 <- GRanges("chr1", IRanges(start = c(100, 300, 600),
                                   end = c(200, 400, 800)))
    shrink.fun1 <- shrinkageFun(gaps(gr1), max.gap = maxGap(gaps(gr1), 0.15))
    shrink.fun2 <- shrinkageFun(gaps(gr1), max.gap = 0)
    s1 <- shrink.fun1(gr1)
    getXScale(s1)
    #  coord:genome
    set.seed(1)
    gr1 <- GRanges("chr1", IRanges(start = as.integer(runif(20, 1, 100)),
    width = 5))
    gr2 <- GRanges("chr2", IRanges(start = as.integer(runif(20, 1, 100)),
    width = 5))
    gr <- c(gr1, gr2)
    gr.t <- transformToGenome(gr, space.skip = 1)
    getXScale(gr.t)

[Package biovizBase version 1.32.0 Index]