PWMSimilarity-methods {TFBSTools} | R Documentation

## PWMSimilarity method

### Description

This function measures the similarity of two PWM matrix in three measurements: "normalised Euclidean distance", "Pearson correlation" and "Kullback Leibler divergence".

### Usage

      PWMSimilarity(pwmSubject, pwmQuery, method=c("Euclidean", "Pearson", "KL"))

### Arguments

`pwmSubject` | A `matrix` or `PWMatrix` or `PWMatrixList` object in “prob” type.
`pwmQuery` | A `matrix` or `PWMatrix` object.
`method` | The method can be "Euclidean", "Pearson", "KL".

### Details

When pwmSubject and pwmQuery have different number of columns, the smaller PWM will be shifted from the start position of larger PWM and compare all the possible alignments. Only the smallest distance, divergence or largest correlation will be reported.

### Value

A `numeric` value is returned.

### Methods

`signature(pwmSubject = "matrix", pwmQuery = "matrix")`
`signature(pwmSubject = "matrix", pwmQuery = "PWMatrix")`
`signature(pwmSubject = "PWMatrix", pwmQuery = "matrix")`
`signature(pwmSubject = "PWMatrix", pwmQuery = "PWMatrix")`
`signature(pwmSubject = "PWMatrixList", pwmQuery = "matrix")`
`signature(pwmSubject = "PWMatrixList", pwmQuery = "PWMatrix")`
`signature(pwmSubject = "PWMatrixList", pwmQuery = "PWMatrixList")`

### References

Linhart, C., Halperin, Y., & Shamir, R. (2008). Transcription factor and microRNA motif discovery: The Amadeus platform and a compendium of metazoan target sets. Genome Research, 18(7), 1180-1189. doi:10.1101/gr.076117.108

### See Also

`PFMSimilarity`

### Examples

      data(MA0003.2)
      data(MA0004.1)
      pwm1 = toPWM(MA0003.2, type="prob")
      pwm2 = toPWM(MA0004.1, type="prob")
      PWMSimilarity(pwm1, pwm2, method="Euclidean")

[Package TFBSTools version 1.18.0 Index]