plotRegionGeneAssociationGraphs-GreatJob-method {rGREAT} | R Documentation

## Plot region-gene association figures

### Description

Plot region-gene association figures

### Usage

    ## S4 method for signature 'GreatJob'
    plotRegionGeneAssociationGraphs(job, type = 1:3, ontology = NULL,
        termID = NULL, request_interval = 10, max_tries = 100, verbose = TRUE,
        plot = TRUE)

### Arguments

`job` | a `GreatJob-class` instance
`type` | type of plots, should be in `1, 2, 3`. See details section for explanation
`ontology` | ontology name
`termID` | term id which corresponds to the selected ontology
`request_interval` | time interval for two requests. Default is 300 seconds.
`max_tries` | maximum tries
`verbose` | whether show message
`plot` | whether make plots

### Details

Generated figures are:

- association between regions and genes

- distribution of distance to TSS

- distribution of absolute distance to TSS

If `ontology` and `termID` are set, only regions and genes corresponding to selected ontology term will be used. Valid value for `ontology` is in `availableOntologies` and valid value for `termID` is from 'id' column in the table which is returned by `getEnrichmentTables`.

### Value

a `GRanges` object. Columns in metadata are:

gene

  genes that are associated with corresponding regions

distTSS

  distance from the regions to TSS of the associated gene

The returned values corresponds to whole input regions or only regions in specified ontology term, depending on user's setting.

If there is no gene associated with the region, corresponding `gene` and `distTSS` columns will be `NA`.

### Author(s)

Zuguang gu <z.gu@dkfz.de>

### Examples

    # note the `job` was generated from GREAT 3.0.0
    job = readRDS(system.file("extdata", "job.rds", package = "rGREAT"))

    res = plotRegionGeneAssociationGraphs(job)
    res

    plotRegionGeneAssociationGraphs(job, type = 1)

    res = plotRegionGeneAssociationGraphs(job, ontology = "GO Molecular Function",
        termID = "GO:0004984")
    res

[Package rGREAT version 1.24.0 Index]