Match PSSM to a directory of motifs
pssm_match.Rd
Match a PSSM to a directory of motifs. The PSSM is matched to each motif in the directory by computing the correlation between the two PSSMs.
Usage
pssm_match(
pssm,
motifs,
best = FALSE,
method = "spearman",
parallel = getOption("prego.parallel", TRUE)
)
Arguments
- pssm
PSSM matrix or data frame
- motifs
a data frame with PSSMs ('A', 'C', 'G' and 'T' columns), with an additional column 'motif' containing the motif name
- best
return the best match only
- method
method to use for computing the correlation. See
cor
for details.- parallel
use parallel processing. Set the number of cores using
set_parallel
.
Value
if best
is TRUE
, a string with the best match. Otherwise, a data frame with a row per motif and a column named 'cor' with its correlation to pssm
. The data frame is sorted by descreasing correlation.
Examples
if (FALSE) { # \dontrun{
res1 <- regress_pwm(cluster_sequences_example, cluster_mat_example[, 1])
head(pssm_match(res1$pssm, JASPAR_motifs))
pssm_match(res1$pssm, JASPAR_motifs, best = TRUE)
} # }