collapseParalogues {FindMyFriends} | R Documentation

## Merge paralogue gene groups into new gene groups

### Description

This method allows for merging of paralogue gene groups defined using `kmerLink` into new, bigger, gene groups.

### Usage

    collapseParalogues(object, ...)

    ## S4 method for signature 'pgVirtual'
    collapseParalogues(object, combineInfo = "merge",
      ...)

### Arguments

`object` | A pgVirtual subclass
`...` | parameters passed on to metadata collapse function. For combineInfo='merge' sep specifies the separator - sep='none' collapses information into list elements instead of strings. For combineInfo='largest' no addition arguments are given.
`combineInfo` | The approach used to combine metadata from the collapsed groups. Either 'merge' for merging, 'largest' for picking information from the largest group, or a function that takes a data.frame of multiple rows and converts it to a data.frame with one row and the same columns.

### Value

An object of the same class as object with the new grouping.

### Methods (by class)

- `pgVirtual`: Merge paralogue gene groups for all pgVirtual subclasses

### Examples

    testPG <- .loadPgExample(withGroups=TRUE, withParalogues=TRUE)

    # Number of gene groups before collapse
    nGeneGroups(testPG)

    # Number of gene groups after collapse
    testPG <- collapseParalogues(testPG, combineInfo='largest')
    nGeneGroups(testPG)

[Package FindMyFriends version 1.17.0 Index]