PFMSimilarity-methods: PFMSimilarity method

Description Usage Arguments Value Author(s) References Examples

Description

Given a PFMatrix or a normal matrix, align it with another set of PFMatrix to assess the similarity.

Usage

1
  PFMSimilarity(pfmSubject, pfmQuery, openPenalty=3, extPenalty=0.01)

Arguments

pfmSubject

A matrix, PFMatrix or PFMatrixList object, which is compared with query matrix.

pfmQuery

A matrix, PFMatrix or IUPAC character object.

openPenalty

The gap open penalty used in the modified Needleman-Wunsch algorithm. By default, it is 3.

extPenalty

The gap extension penalty used in the modified Needleman-Wunsch algorithm. By default, it is 0.01.

Value

For each pfmSubject, an absolute score and a relative percentage score is returned. The maximum absolute score is 2*the width of the smaller matrix in the comparison pair.

Author(s)

Ge Tan

References

Sandelin, A., H glund, A., Lenhard, B., & Wasserman, W. W. (2003). Integrated analysis of yeast regulatory sequences for biologically linked clusters of genes. Functional & Integrative Genomics, 3(3), 125-134. doi:10.1007/s10142-003-0086-6

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
  library(Biostrings)
  library(JASPAR2016)
  ## Example matrix from JASPAR database
  profileMatrix <- matrix(as.integer(
    c(13, 13,  3,  1, 54,  1,  1,  1,  0,  3,  2,  5,
      13, 39,  5, 53,  0,  1, 50,  1,  0, 37,  0, 17,
      17,  2, 37,  0,  0, 52,  3,  0, 53,  8, 37, 12,
      11,  0,  9,  0,  0,  0,  0, 52,  1,  6, 15, 20)),
    nrow=4, byrow=TRUE, dimnames=list(DNA_BASES))
  pfmQuery <- PFMatrix(profileMatrix=profileMatrix)
  pfmSubjects <- getMatrixSet(JASPAR2016,
                              opts=list(ID=c("MA0500", "MA0499", "MA0521",
                                             "MA0697", "MA0048", "MA0751",
                                             "MA0832")))
  PFMSimilarity(pfmSubjects, pfmQuery)

TFBSTools documentation built on Nov. 8, 2020, 8:14 p.m.