voteInteractions: Majority vote decision for (regulatory region)-gene...

Description Usage Arguments Details Value Author(s) Examples

Description

The function calculates regularatory region to gene interactions based on a majority vote. Multiple interactions output by different methods and data sets can be merged this way, and only the interactions that have support in vote.threshold fraction of the datasets will be retained.

Usage

1
2
voteInteractions(interactions, cutoff.stat = "pval", cutoff.val = 0.05,
  vote.threshold = 0.5)

Arguments

interactions

A list of GInteractions objects outputed from associateReg2Gene or metaInteractions.

cutoff.stat

(character,"pval" is default). Which statistics to filter:"qval" or "pval"

cutoff.val

a numeric cutoff (default 0.05) that will be used to filter elements in the input list (cutoff.stat). If the input object lacks this column, every association in the object will be treated as a valid association prediction.

vote.threshold

A value between 0 and 1, designates the threshold needed for fraction of votes necessary to retain an association. Defaults to 0.5, meaning fraction of votes should be greater than or equal to 0.5 to retain association.

Details

Firstly, function selects POSITIVES (statistically associated gene~enhancer pairs) for each result of associateReg2Gene analysis that wants to be combined by majority voting (for example results of H3K4me1 and H3K27ac). Assessing statistically associated gene~enhancer pairs has been done by filtering the statistics (cutoff.stat) of the elements of the input list (gene~enhancer pairs) based on the defined cutoff value (cutoff.val).

Value

A GInteractions object that contains votes for interactions from the voting procedure. The object will contain meta-columns for individual votes and vote stastics. The object can be further filtered to obtain the desired level of votes using [] or equivalent methods.

Author(s)

Altuna Akalin

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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# creating datasets

require(GenomicRanges)
require(InteractionSet)

# INPUT 0: 2 GRanges objects with toy expression values (x,y,z,a)

 gr2 <- gr <- GRanges(seqnames=rep("chr1",3),IRanges(1:3,3:5))
   
   x <- 1:5
   y <- 2:6
   z <- 10:14
   a <- rep(0,length(x))
   
   
   GeneInfo <- as.data.frame(matrix(c(rep("gene",3),rep("regulatory",6)),
               ncol = 3,byrow = TRUE),stringsAsFactors=FALSE)
               colnames(GeneInfo) <- c("featureType","name","name2")
 
      mcols(gr) <- DataFrame(cbind(GeneInfo,rbind(x,y,z)))
      mcols(gr2) <- DataFrame(cbind(GeneInfo,rbind(x,y,a)))
 
 # RUNNING associateReg2Gene and obtaining output results
 
 AssocObject <- reg2gene::associateReg2Gene(gr)
 AssocObject2 <- reg2gene::associateReg2Gene(gr2)
 
 # INPUT1 a list of GInteraction objects from associateReg2Gene()
 
 
 interactions <- list(AssocObject,AssocObject2)
 names(interactions) <- c("AssocObject","AssocObject2")
 
 # OUTPUT: Run voteInteractions
 
  voteInteractions(interactions, 
                  cutoff.stat="pval",
                  cutoff.val=0.05,
                  vote.threshold=0.5)
                  
  voteInteractions(interactions,
                  cutoff.stat="pval",
                  cutoff.val=0.05,
                  vote.threshold=0.51)
 
 #CREATING EXAMPLE2:
                                   
 set.seed(6878); x=rnorm(15)
 set.seed(444);  y=rnorm(15)
 set.seed(6848);  z=rnorm(15)
 
 example <-  example2 <-   GRanges(GRReg1_toy[1:2],
                                 featureType=c("gene","regulatory"),
                                 name=c("gene","regulatory"),
                                 name2=c("gene","regulatory"))
                                 
 mcols(example2) <-  cbind(mcols(example2)[,1:3],DataFrame(rbind(x,y)))
 mcols(example) <-  cbind(mcols(example)[,1:3],DataFrame(rbind(x,z)))
 
 AssocExample2 <- associateReg2Gene(example2)
 AssocExample <- associateReg2Gene(example)
 
 # OUTPUT: Run voteInteractions
 
 # ERROR! both ranges fail at filtering    
 # voteInteractions(list(AssocExample2,AssocExample))
 
                  
                  

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