graphGrouping: Use igraph to create gene grouping from a similarity matrix

Description Usage Arguments Value Methods (by class) See Also Examples

Description

This method takes a similarity matrix based on all genes in the pangenome, converts it to a graph representation and uses one of igraphs community detection algorithms to split all genes into groups. Within the FindMyFriends framework the similarity matrix would usually come from kmerSimilarity, but it can just as well be defined in other ways e.g. be blast derived.

Usage

1
2
3
4
graphGrouping(object, ...)

## S4 method for signature 'pgVirtual'
graphGrouping(object, similarity, algorithm, ...)

Arguments

object

A pgVirtual subclass

...

parameters to be passed on to the community detection algorithm

similarity

A similarity matrix with rows and columns corresponding to the genes in the pangenome.

algorithm

A string naming the algorithm. See communities for an overview. The trailing '.community' can be omitted from the name. Default is 'infomap', which is also the recommended.

Value

An object of the same class as 'object'.

Methods (by class)

See Also

Other grouping algorithms: cdhitGrouping, gpcGrouping, manualGrouping

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
testPG <- .loadPgExample()

# Too heavy to include
## Not run: 
# Generate similarity matrix
simMat <- kmerSimilarity(testPG, lowerLimit=0.75)

# Group genes
testPG <- graphGrouping(testPG, simMat)

## End(Not run)

FindMyFriends documentation built on Nov. 8, 2020, 6:46 p.m.