merge_motifs {universalmotif} | R Documentation

## Merge motifs.

### Description

Aligns the motifs using `compare_motifs()`, then averages the motif PPMs. Currently the `multifreq` slot, if filled in any of the motifs, will be dropped. Only 0-order background probabilities will be kept.

### Usage

    merge_motifs(motifs, method = "MPCC", use.type = "PPM",
      min.overlap = 6, min.mean.ic = 0.5, tryRC = TRUE,
      relative_entropy = FALSE, normalise.scores = FALSE)

### Arguments

`motifs` | See `convert_motifs()` for acceptable motif formats.
`method` | `character(1)` One of `c('PCC', 'MPCC', 'EUCL', 'MEUCL', 'SW', 'MSW', 'KL', 'MKL')`. See details.
`use.type` | `character(1)` One of `'PPM'` and `'ICM'`. The latter allows for taking into account the background frequencies if `relative_entropy = TRUE`.
`min.overlap` | `numeric(1)` Minimum overlap required when aligning the motifs. Setting this to a number higher then the width of the motifs will not allow any overhangs. Can also be a number less than 1, representing the minimum fraction that the motifs must overlap.
`min.mean.ic` | `numeric(1)` Minimum mean information content between the two motifs for an alignment to be scored. This helps prevent scoring alignments between low information content regions of two motifs.
`tryRC` | `logical` Try the reverse complement of the motifs as well, report the best score.
`relative_entropy` | `logical(1)` For ICM calculation. See `convert_type()`.
`normalise.scores` | `logical(1)` Favour alignments which leave fewer unaligned positions, as well as alignments between motifs of similar length. Similarity scores are multiplied by the ratio of aligned positions to the total number of positions in the larger motif, and the inverse for distance scores.

### Value

A single motif object. See `convert_motifs()` for available formats.

### Author(s)

Benjamin Jean-Marie Tremblay, b2tremblay@uwaterloo.ca

### See Also

`compare_motifs()`

### Examples

    if (requireNamespace("MotifDb", quietly = TRUE) && .Platform$OS.type == "unix") {
      library(MotifDb)
      merged.motif <- merge_motifs(MotifDb[1:5])
    }

[Package universalmotif version 1.2.1 Index]