force_best_match: Force best tomtom match by id

View source: R/match_utils.R

force_best_matchR Documentation

Force best tomtom match by id

Description

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.

Usage

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
}

snystrom/memes documentation built on Oct. 12, 2024, 2:42 a.m.