Learn R Programming

FindMyFriends (version 1.2.2)

plotSimilarity: 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, ...)
"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

Run this code
testPG <- .loadPgExample(withGroups=TRUE)

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

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

Run the code above in your browser using DataLab