plotSimilarity {FindMyFriends} | R Documentation

## Create a heatplot with similarities between all organisms

### Description

This method creates a heatplot showing the similarity between all organisms in the pangenome. The similarity can either be derived from the pangenome matrix or from kmer calculations of the genes themselves.

### Usage

    plotSimilarity(object, ...)

    ## S4 method for signature 'pgVirtual'
    plotSimilarity(object, type = "pangenome",
      ordering = "auto", kmerSize, pParam, chunkSize = 100)

### Arguments

`object` | A pgVirtual subclass
`...` | Parameters to be passed on.
`type` | The type of similarity calculation. Either 'pangenome' or 'kmer'
`ordering` | The ordering of rows and column in the heatmap. Either integer og character vector with organism names or one of the following: 'auto' or 'none'. For 'auto' The ordering will be based on a hierarchical clustering of the organisms based on Ward's distance.
`kmerSize` | The size of the kmers to use for comparison
`pParam` | An object of class BiocParallelParam
`chunkSize` | Number of organisms to process at a time

### Value

This function is called for its side effects

### Methods (by class)

- `pgVirtual`: Similarity heatmaps for pgVirtual subclasses

### See Also

`plotTree` for a dendrogram plot of the same data.

### Examples

    testPG <- .loadPgExample(withGroups=TRUE)

    # Use kmers
    plotSimilarity(testPG, type='kmer')

    # Use pangenome matrix
    plotSimilarity(testPG, type='pangenome')

[Package FindMyFriends version 1.10.0 Index]