reg2trait: Add associated traits to the interaction object

Description Usage Arguments Details Value Author(s) Examples

Description

This function adds associated traits to the input interaction object. Traits are extracted from the object which stores either variant-gene-disease associations of gene-disease associations. Traits are idenfied based on based on gene symbol overlap or or based on variant-genomic region overlap in addition to the gene symbol overlap.

Usage

1
reg2trait(interactions, disGeneDB, geneIDs = c("name2", "GeneName"), ...)

Arguments

interactions

A GInteractions or GRanges object with gene names as a minimal metadata info. If GInteractions is inputed, the first element corresponds to regulatory region, whereas the anchor anchor corresponds to TSS/gene region.

disGeneDB

A GInteractions or GRanges object which stores info about gene-disease associations (GRanges object type) or variant-gene-disease associations (as a GInteractions object where anchor1 correspond to the variant location and anchor2 to gene location). For example, DISGENET db or GWAS Catalog db can be used as an input for this function.

geneIDs

character vector of length 2 which stores information about column names where gene symbols are stored for both input objects. By default c("name2","GeneName")

Details

Function works with disGeneDB object that can be either a Granges or GInteractions object which stores info about gene~trait or variant~gene~trait associations. If input object is GInteractions, then function finds overlaps between anchor1 from GInteraction object and anchor1 of disGeneDB (presumably overlap between variant and regulatory regions), and in addition it identifies overlaps between genes from these two objects based on gene symbols (stored in columns "name2","GeneName"). Thus, only if gene symbols and genomic locations from both objects overlap the function will return these entries.

If disGeneDB stores info about gene~trait associations as a GRanges object (no info about variant location), then info about associated trait is obtained only based on gene name overlap.

Value

A GInteractions object (interactions) with added meta-data from the disGeneDB object. Added info is presumably info about traits associated with provided gene names or variant-gene combination.

Author(s)

Inga Patarcic

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
library(InteractionSet)
library(GenomicRanges)
library(reg2gene)

# 1. get disease-gene DB example:

GRReg2_toyDisease <- GRReg2_toy
GRReg2_toyDisease$disease <- paste0("dis",1:length(GRReg2_toy))

# 1.a get disease-gene DB example as GInteractions
 disGeneDB <- GInteractions(GRReg2_toyDisease,GRReg2_toyDisease$reg)
 mcols(disGeneDB) <- mcols(GRReg2_toyDisease)


# 1. get enhancer-gene:GInteractions 

GRReg1_toyGI <- GInteractions(anchor1 = GRReg1_toy,
                              anchor2 = GRReg1_toy$reg,
                              gene=GRReg1_toy$name)

mcols(GRReg1_toyGI) <- mcols(GRReg1_toyGI)[c("gene")]



# run reg2trait; version geneDisease

 reg2trait(interactions = GRReg1_toyGI,
                 disGeneDB = GRReg2_toyDisease,
                 geneIDs = c("gene","name"))
                 
                 
 # run reg2trait; version SNPgeneDisease       
          
 reg2trait(interactions = GRReg1_toyGI,
                 disGeneDB = disGeneDB,
                 geneIDs = c("gene","name"))                

 

BIMSBbioinfo/reg2gene documentation built on May 3, 2019, 6:42 p.m.