Get region-gene associations

# S4 method for GreatObject
getRegionGeneAssociations(object, term_id = NULL, by_middle_points = FALSE,
    use_symbols = TRUE)

Arguments

object

A GreatObject-class object returned by great.

term_id

Term ID.

by_middle_points

Whether the distances are calculated from the middle points of input regions?

use_symbols

Whether to use gene symbols

Value

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

and IntegerList because a region may associate to multiple genes.

Examples

obj = readRDS(system.file("extdata", "GreatObject.rds", package = "rGREAT"))
getRegionGeneAssociations(obj)
#> GRanges object with 3716 ranges and 2 metadata columns:
#>          seqnames            ranges strand | annotated_genes   dist_to_TSS
#>             <Rle>         <IRanges>  <Rle> | <CharacterList> <IntegerList>
#>      [1]     chr1   1310673-1311002      * |        AURKAIP1             0
#>      [2]     chr1   1342596-1342925      * |          MRPL20             0
#>      [3]     chr1   1509774-1510103      * |           SSU72           159
#>      [4]     chr1   1711638-1711967      * |            NADK          -130
#>      [5]     chr1   2323002-2323331      * |      RER1,MORN1          0,-9
#>      ...      ...               ...    ... .             ...           ...
#>   [3712]    chr22 48494091-48494420      * |           TAFA5       -390868
#>   [3713]    chr22 50247107-50247215      * |           ZBED4          -282
#>   [3714]    chr22 50629956-50630285      * |   TRABD,SELENOO    5597,-9123
#>   [3715]    chr22 50969288-50969617      * |       SCO2,TYMP    -4383,-774
#>   [3716]    chr22 50978038-50978367      * |   ODF3B,KLHDC7B   -7030,-8095
#>   -------
#>   seqinfo: 23 sequences from an unspecified genome; no seqlengths