Description Usage Arguments Details Value Author(s) References See Also Examples
View source: R/compare_motifs.R
Compare motifs using one of the several available metrics. See the "Motif comparisons and P-values" vignette for detailed information.
1 2 3 4 5 | compare_motifs(motifs, compare.to, db.scores, use.freq = 1,
use.type = "PPM", method = "ALLR", tryRC = TRUE, min.overlap = 6,
min.mean.ic = 0.25, min.position.ic = 0, relative_entropy = FALSE,
normalise.scores = FALSE, max.p = 0.01, max.e = 10, nthreads = 1,
score.strat = "a.mean", output.report, output.report.max.print = 10)
|
motifs |
See |
compare.to |
|
db.scores |
|
use.freq |
|
use.type |
|
method |
|
tryRC |
|
min.overlap |
|
min.mean.ic |
|
min.position.ic |
|
relative_entropy |
|
normalise.scores |
|
max.p |
|
max.e |
|
nthreads |
|
score.strat |
|
output.report |
|
output.report.max.print |
|
The following metrics are available:
Euclidean distance (EUCL
) \insertCiteeuclideanuniversalmotif
Weighted Euclidean distance (WEUCL
)
Kullback-Leibler divergence (KL
) \insertCitekl,kldivuniversalmotif
Hellinger distance (HELL
) \insertCitehellingeruniversalmotif
Squared Euclidean distance (SEUCL
)
Manhattan distance (MAN
)
Pearson correlation coefficient (PCC
)
Weighted Pearson correlation coefficient (WPCC
)
Sandelin-Wasserman similarity (SW
), or sum of squared distances \insertCitewassermanuniversalmotif
Average log-likelihood ratio (ALLR
) \insertCitewanguniversalmotif
Lower limit ALLR (ALLR_LL
) \insertCitemahonyuniversalmotif
Bhattacharyya coefficient (BHAT
) \insertCitebhattuniversalmotif
Comparisons are calculated between two motifs at a time. All possible alignments
are scored, and the best score is reported. In an alignment scores are calculated
individually between columns. How those scores are combined to generate the final
alignment scores depends on score.strat
.
See the "Motif comparisons and P-values" vignette for a description of the
various metrics. Note that PCC
, WPCC
, SW
, ALLR
, ALLR_LL
and BHAT
are similarities;
higher values mean more similar motifs. For the remaining metrics, values closer
to zero represent more similar motifs.
Small pseudocounts are automatically added when one of the following methods
is used: KL
, ALLR
, ALLR_LL
, IS
. This is avoid
zeros in the calculations.
To note regarding p-values: P-values are pre-computed using the
make_DBscores()
function. If not given, then uses a set of internal
precomputed P-values from the JASPAR2018 CORE motifs. These precalculated
scores are dependent on the length of the motifs being compared. This takes
into account that comparing small motifs with larger motifs leads to higher
scores, since the probability of finding a higher scoring alignment is
higher.
The default P-values have been precalculated for regular DNA motifs. They
are of little use for motifs with a different number of alphabet letters
(or even the multifreq
slot).
matrix
if compare.to
is missing; DataFrame
otherwise. For the
latter, function args are stored in the metadata
slot.
Benjamin Jean-Marie Tremblay, b2tremblay@uwaterloo.ca
bhattuniversalmotif
\insertRefeuclideanuniversalmotif
\insertRefhellingeruniversalmotif
\insertRefjasparuniversalmotif
\insertRefkluniversalmotif
\insertRefISdistuniversalmotif
\insertRefmahonyuniversalmotif
\insertRefpearsonuniversalmotif
\insertRefkldivuniversalmotif
\insertRefwassermanuniversalmotif
\insertRefwanguniversalmotif
convert_motifs()
, motif_tree()
, view_motifs()
,
make_DBscores()
1 2 3 4 5 6 7 8 9 10 11 12 13 | motif1 <- create_motif(name = "1")
motif2 <- create_motif(name = "2")
motif1vs2 <- compare_motifs(c(motif1, motif2), method = "PCC")
## To get a dist object:
as.dist(1 - motif1vs2)
motif3 <- create_motif(name = "3")
motif4 <- create_motif(name = "4")
motifs <- c(motif1, motif2, motif3, motif4)
## Compare motif "2" to all the other motifs:
if (R.Version()$arch != "i386") {
compare_motifs(motifs, compare.to = 2, max.p = 1, max.e = Inf)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.