getNeighborhood {FindMyFriends} | R Documentation

## Extract a graph representation of a gene group neighborhood

### Description

This method creates a graph representation of the imidiate neighborhood of a gene group. It is different from creating a subgraph of the panchromosome in that only vertices and edges directly reachable from the gene group is included. The vertices will be annotated with a centerGroup property indicating whether or not the node is the queried gene group.

### Usage

    getNeighborhood(object, ...)

    ## S4 method for signature 'pgVirtualLoc'
    getNeighborhood(object, group, vicinity = 4)

### Arguments

`object` | A pgVirtualLoc subclass
`...` | Parameters passed on.
`group` | Either the name or the index of the group whose neighborhood is of interest
`vicinity` | An integer giving the number of gene groups in both directions to collect

### Value

An igraph object with gene groups as vertices and positional connections as edges. The edges is weighted according to the number of genes sharing the connection. All vertices have a centerGroup attribute, which is FALSE for all but the center group.

### Methods (by class)

- `pgVirtualLoc`: Gene group neighborhoods for all pgVirtualLoc subclasses

### See Also

`plotNeighborhood` for nice plotting of the neighborhood

### Examples

    testPG <- .loadPgExample(geneLoc=TRUE, withNeighborhoodSplit=TRUE)

    # Look at the surroundings of group 10
    neighborhood <- getNeighborhood(testPG, group=10)

[Package FindMyFriends version 1.19.0 Index]