kmerSimilarity: Calculate a similarity matrix based on kmers

Description Usage Arguments Value Methods (by class) Examples

Description

This method takes a pangenome and calculate a similarity matrix based on cosine similarity of kmer feature vectors in an all-vs-all fashion. The result can subsequently be used to group genes either using graphGrouping or homebrewed grouping scheme. In case of the latter manualGrouping should be used to add the grouping back to the pangenome.

Usage

1
2
3
4
5
kmerSimilarity(object, ...)

## S4 method for signature 'pgVirtual'
kmerSimilarity(object, lowMem, kmerSize, lowerLimit,
  rescale, transform, pParam)

Arguments

object

A pgVirtual subclass

...

parameters passed on.

lowMem

logical. Should low memory footprint be ensured over computation speed

kmerSize

The size of kmers to use for similarity calculations.

lowerLimit

The lower threshold for similarity below which it is set to 0

rescale

Should Similarities be normalised between lowerLimit and 1

transform

Transformation function to apply to similarities

pParam

An optional BiocParallelParam object that defines the workers used for parallelisation.

Value

A matrix (sparse or normal) with cosine similarity for each gene pair

Methods (by class)

Examples

1
2
3
4
5
6
7
testPG <- .loadPgExample()

# Too heavy to include
## Not run: 
kmerSim <- kmerSimilarity(testPG, lowerLimit=0.75)

## End(Not run)

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