tool.coalesce {Mergeomics} | R Documentation

## Calculate overlaps between groups (main function)

### Description

`tool.coalesce` is utilized to merge and trim either overlapping modules (containing shared genes) or overlapping genes (containing shared markers)

### Usage

    tool.coalesce(items, groups, rcutoff = 0, ncore = NULL)

### Arguments

`items` | array of item identities
`groups` | array of group identities for items
`rcutoff` | maximum overlap not coalesced
`ncore` | minimum number of items required for trimming

### Value

a data list with the following components:

`CLUSTER` | cluster identities after merging and triming (a subset of group identities)
`ITEM` | item identities
`GROUPS` | comma separated overlapping group identities

### Author(s)

Ville-Petteri Makinen

### References

Shu L, Zhao Y, Kurt Z, Byars SG, Tukiainen T, Kettunen J, Orozco LD, Pellegrini M, Lusis AJ, Ripatti S, Zhang B, Inouye M, Makinen V-P, Yang X. Mergeomics: multidimensional data integration to identify pathogenic perturbations to biological systems. BMC genomics. 2016;17(1):874.

### Examples

    ## 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 first 10 modules in the file:
    ## to merge overlapping modules first collect member genes:
    mod.names <- unique(moddata$MODULE)[1:min(length(unique(moddata$MODULE)),
    10)]
    moddata <- moddata[which(!is.na(match(moddata$MODULE, mod.names))),]

    ## Merge and trim overlapping modules.(max allowed overlap ratio is 0.33)
    rmax <- 0.33
    moddata$OVERLAP <- moddata$MODULE
    moddata <- tool.coalesce(items=moddata$GENE, groups=moddata$MODULE,
    rcutoff=rmax)
    moddata$MODULE <- moddata$CLUSTER
    moddata$GENE <- moddata$ITEM
    moddata$OVERLAP <- moddata$GROUPS
    moddata <- moddata[,c("MODULE", "GENE", "OVERLAP")]
    moddata <- unique(moddata)

[Package Mergeomics version 1.22.0 Index]