Learn R Programming

FindMyFriends (version 1.2.2)

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

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

graphGrouping(object, ...)
"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)

  • pgVirtual: graph grouping for all pgVirtual subclasses

See Also

Other grouping algorithms: cdhitGrouping, gpcGrouping, manualGrouping

Examples

Run this code
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)

Run the code above in your browser using DataLab