manualGrouping {FindMyFriends} | R Documentation

## Define gene grouping manually

### Description

In cases where results from other algorithms are wished to be imported into the FindMyFriends framework, this method ensures that the proper formatting is done. The grouping can be defined as an integer vector with an element for each gene. The value of each element is then used as the gene group classifier. Alternatively groups can be defined by a list of integer vectors. Each element of the list defines a group and the content of each element refers to gene indexes.

### Usage

    manualGrouping(object, groups)

    ## S4 method for signature 'pgVirtual,integer'
    manualGrouping(object, groups)

    ## S4 method for signature 'pgVirtual,list'
    manualGrouping(object, groups)

### Arguments

`object` | A pgVirtual subclass
`groups` | Either a list or integer vector defining the grouping

### Value

An object of the same class as 'object'.

### Methods (by class)

- `object = pgVirtual,groups = integer`: manual grouping defined by integer vector

- `object = pgVirtual,groups = list`: manual grouping defined by list

### See Also

Other grouping algorithms: `cdhitGrouping`, `gpcGrouping`, `graphGrouping`

### Examples

    testPG <- .loadPgExample()

    # Load grouping data
    groups <- system.file('extdata', 'examplePG', 'groupsWG.txt',
        package='FindMyFriends'
    )
    groups <- scan(groups, what=integer(), quiet=TRUE)

    # Do the grouping
    testPG <- manualGrouping(testPG, groups)

[Package FindMyFriends version 1.17.0 Index]