Although TomTom assigns a best match, this is not always the most biologically relevant match. In these cases, it is useful to "force" the best match to another lower ranked, but still significant TomTom match. This function allows users to select a new best match motif from the set of lower-ranked matches in the `tomtom` list column. This function also reorders the `tomtom` data.frame such that the forced match is the first row of the `tomtom` entry.

force_best_match(res, matches)

Arguments

res

results from runTomTom

matches

named vector where name is the input motif name, and value is the match_name to use as the new best match

Value

`res` with new best_* columns and re-ranked tomtom data in the `tomtom` list column for the updated entries.

See also

[update_best_match()]

Examples

if (meme_is_installed()){
motif <- universalmotif::create_motif("CCRAAAW", name = "example_motif")
db <- system.file("extdata", "flyFactorSurvey_cleaned.meme", package = "memes")
res <- runTomTom(motif, database = db)
res$best_match_name
res2 <- force_best_match(res, c("example_motif" = "Eip93F_SANGER_10"))
res2$best_match_name
}
#> [1] "Eip93F_SANGER_10"