Get region-gene associations

# S4 method for GreatJob
getRegionGeneAssociations(object, ontology = NULL, term_id = NULL,
    request_interval = 10, max_tries = 100, verbose = great_opt$verbose)

Arguments

object

A GreatJob-class object returned by submitGreatJob.

ontology

ontology name

term_id

Term id in the selected ontology.

request_interval

Time interval for two requests. Default is 300 seconds.

max_tries

Maximal times for automatically reconnecting GREAT web server.

verbose

Whether to show messages.

Value

A GRanges object. Please the two meta columns are in formats of CharacterList

and IntegerList because a region may associate to multiple genes.

Please note, the distance is from the middle points of input regions to TSS.

Author

Zuguang gu <z.gu@dkfz.de>

Examples

job = readRDS(system.file("extdata", "GreatJob.rds", package = "rGREAT"))

gr = getRegionGeneAssociations(job)
gr
#> GRanges object with 885 ranges and 2 metadata columns:
#>         seqnames            ranges strand | annotated_genes    dist_to_TSS
#>            <Rle>         <IRanges>  <Rle> | <CharacterList>  <IntegerList>
#>     [1]     chr1   9204434-9208784      * |     H6PD,GPR157  -88225,-17380
#>     [2]     chr1   9853594-9859363      * |   CLSTN1,PIK3CD   28106,144675
#>     [3]     chr1 10862809-10871681      * |    TARDBP,CASZ1 -205454,-10540
#>     [4]     chr1 12716970-12723206      * | AADACL3,AADACL4   -56058,15522
#>     [5]     chr1 13814692-13823250      * | LRRC38,PRAMEF20    21572,82064
#>     ...      ...               ...    ... .             ...            ...
#>   [881]     chrY 16384799-16389852      * |    NLGN4Y,VCY1B -248301,219228
#>   [882]     chrY 16842593-16846893      * |          NLGN4Y         209117
#>   [883]     chrY 16998750-17003225      * |          NLGN4Y         365361
#>   [884]     chrY 24401612-24406252      * |   RBMY1J,RBMY1F -145685,-74837
#>   [885]     chrY 26206997-26215445      * |     BPY2B,CDY1B -552930,-17105
#>   -------
#>   seqinfo: 24 sequences from an unspecified genome; no seqlengths