tool.overlap: Calculate overlaps between groups of specified items

Description Usage Arguments Value Author(s) Examples

View source: R/cle.LS.R

Description

tool.overlap checks each pair of blocks, finds number of shared items, and obtains significance values of the sharings for block pairs.

Usage

1
tool.overlap(items, groups, nbackground = NULL)

Arguments

items

array of item identities

groups

array of group identities for items

nbackground

total number of items

Value

a data list including following components

A

group name

B

group name

POSa

group name rank

POSb

group name rank

Na

group A size

Nb

group B size

Nab

shared items

R

overlap ratio

F

fold change to null expectation

P

overlap P-value (Fisher's test)

Author(s)

Ville-Petteri Makinen

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## read the coexpr module file as an example:
moddata <- tool.read(system.file("extdata",
"modules.mousecoexpr.liver.human.txt", package="Mergeomics"))
## let us find the overlapping ratio between two modules:
## pick the first and last modules:
mod.names <- unique(moddata$MODULE)[c(1,length(unique(moddata$MODULE)))]
if(length(mod.names) > 0){
modA.members <- moddata[which(moddata$MODULE == mod.names[1]),]
modB.members <- moddata[which(moddata$MODULE == mod.names[2]),]
}
mod.pool <- rbind(modA.members, modB.members)
overlap.stats <- tool.overlap(mod.pool[,2], mod.pool[,1])

zeynebkurtUCLA/Mergeomics documentation built on May 14, 2019, 1:59 a.m.