submitGreatJob {rGREAT} | R Documentation

## Send requests to GREAT web server

### Description

Send requests to GREAT web server

### Usage

    submitGreatJob(gr, bg = NULL,
        species               = "hg19",
        includeCuratedRegDoms = TRUE,
        rule                  = c("basalPlusExt", "twoClosest", "oneClosest"),
        adv_upstream          = 5.0,
        adv_downstream        = 1.0,
        adv_span              = 1000.0,
        adv_twoDistance       = 1000.0,
        adv_oneDistance       = 1000.0,
        request_interval = 60,
        max_tries = 10,
        version = DEFAULT_VERSION,
        base_url = "http://great.stanford.edu/public/cgi-bin",
        help = TRUE)

### Arguments

`gr` | A `GRanges` object or a data frame which contains at least three columns (chr, start and end). Regions for test.
`bg` | A `GRanges` object or a data frame. Background regions if needed. Note `gr` should be exactly subset of `bg` for all columns in `gr`. Check http://great.stanford.edu/help/display/GREAT/File+Formats#FileFormats-Whatshouldmybackgroundregionsfilecontain%3F for more explanation.
`species` | Species. "hg38", "hg19", "mm10", "mm9" are supported in GREAT version 4.x.x, "hg19", "mm10", "mm9", "danRer7" are supported in GREAT version 3.x.x and "hg19", "hg18", "mm9", "danRer7" are supported in GREAT version 2.x.x.
`includeCuratedRegDoms` | Whether to include curated regulatory domains.
`rule` | How to associate genomic regions to genes. See 'details' section.
`adv_upstream` | Unit: kb, only used when rule is `basalPlusExt`
`adv_downstream` | Unit: kb, only used when rule is `basalPlusExt`
`adv_span` | Unit: kb, only used when rule is `basalPlusExt`
`adv_twoDistance` | Unit: kb, only used when rule is `twoClosest`
`adv_oneDistance` | Unit: kb, only used when rule is `oneClosest`
`request_interval` | Time interval for two requests. Default is 300 seconds.
`max_tries` | Maximum times trying to connect to GREAT web server.
`version` | version of GREAT. The value should be "4.0.4", "3.0.0", "2.0.2". Shorten version numbers can also be used, such as using "4" or "4.0" is same as "4.0.4".
`base_url` | the url of `cgi-bin` path, only used when explicitly specified.
`help` | Whether to print help messages.

### Details

Note: [On Aug 19 2019 GREAT released version 4](http://great.stanford.edu/help/display/GREAT/Version+History where it supports `hg38` genome and removes some ontologies such pathways. `submitGreatJob` still takes `hg19` as default. `hg38` can be specified by the `species = "hg38"` argument. To use the older versions such as 3.0.0, specify as `submitGreatJob(..., version = "3.0.0")`.

Note it is not the standard GREAT API. This function directly send data to GREAT web server by HTTP POST.

Following text is copied from GREAT web site ( http://great.stanford.edu/public/html/ )

Explanation of `rule` and settings with names started with 'adv_' (advanced settings):

basalPlusExt

  Mode 'Basal plus extension'. Gene regulatory domain definition: Each gene is assigned a basal regulatory domain of a minimum distance upstream and downstream of the TSS (regardless of other nearby genes, controlled by `adv_upstream` and `adv_downstream` argument). The gene regulatory domain is extended in both directions to the nearest gene's basal domain but no more than the maximum extension in one direction (controlled by `adv_span`).

twoClosest

  Mode 'Two nearest genes'. Gene regulatory domain definition: Each gene is assigned a regulatory domain that extends in both directions to the nearest gene's TSS (controlled by `adv_twoDistance`) but no more than the maximum extension in one direction.

oneClosest

  Mode 'Single nearest gene'. Gene regulatory domain definition: Each gene is assigned a regulatory domain that extends in both directions to the midpoint between the gene's TSS and the nearest gene's TSS (controlled by `adv_oneDistance`) but no more than the maximum extension in one direction.

### Value

A `GreatJob-class` class object which can be used to get results from GREAT server.

### Note

takes `hg19` as default. `hg38` can be specified by the `species = "hg38"` argument. To use the older versions such as 3.0.0, specify as `submitGreatJob(..., version = "3.0.0")`.**

Note it is not the standard GREAT API. This function directly send data to GREAT web server by HTTP POST.

Following text is copied from GREAT web site ( http://great.stanford.edu/public/html/ )

Explanation of `rule` and settings with names started with 'adv_' (advanced settings):

basalPlusExt

  Mode 'Basal plus extension'. Gene regulatory domain definition: Each gene is assigned a basal regulatory domain of a minimum distance upstream and downstream of the TSS (regardless of other nearby genes, controlled by `adv_upstream` and `adv_downstream` argument). The gene regulatory domain is extended in both directions to the nearest gene's basal domain but no more than the maximum extension in one direction (controlled by `adv_span`).

twoClosest

  Mode 'Two nearest genes'. Gene regulatory domain definition: Each gene is assigned a regulatory domain that extends in both directions to the nearest gene's TSS (controlled by `adv_twoDistance`) but no more than the maximum extension in one direction.

oneClosest

  Mode 'Single nearest gene'. Gene regulatory domain definition: Each gene is assigned a regulatory domain that extends in both directions to the midpoint between the gene's TSS and the nearest gene's TSS (controlled by `adv_oneDistance`) but no more than the maximum extension in one direction.

### Author(s)

Zuguang gu <z.gu@dkfz.de>

### See Also

`GreatJob-class`

### Examples

    set.seed(123)
    bed = circlize::generateRandomBed(nr = 1000, nc = 0)
    job = submitGreatJob(bed, version = "3.0.0")
    job

    # more parameters can be set for the job
    if(FALSE) { # suppress running it when building the package
        # current GREAT version is 4.0.1
        job = submitGreatJob(bed, species = "mm9")
        job = submitGreatJob(bed, bg, species = "mm9", bgChoise = "data")
        job = submitGreatJob(bed, adv_upstream = 10, adv_downstream = 2, adv_span = 2000)
        job = submitGreatJob(bed, rule = "twoClosest", adv_twoDistance = 2000)
        job = submitGreatJob(bed, rule = "oneClosest", adv_oneDistance = 2000)
    }

[Package rGREAT version 1.24.0 Index]