find_match: Match a list of CoRecMotifs to reference motifs

View source: R/07_find_match.R

find_matchR Documentation

Match a list of CoRecMotifs to reference motifs

Description

Identifies the reference motif that is the best match to each CoRecMotif.

Usage

find_match(
  corecmotifs,
  reference_motifs_file,
  cluster_assignments = NULL,
  meme_path = NULL,
  min_overlap = 5,
  output_file = NULL,
  check_corecmotifs = TRUE
)

Arguments

corecmotifs

list. The CoRecMotifs to match to reference motifs.

reference_motifs_file

character(1). The path to the MEME format file of reference motifs to match to.

cluster_assignments

data.frame or NULL. A table mapping the reference motifs to motif clusters or NULL to skip the cluster assignment step. See motif_clusters for expected columns. (Default: NULL)

meme_path

character(1) or NULL. The path to "meme/bin/" or NULL to rely on memes::runTomTom() to find it. (Default: NULL)

min_overlap

integer(1). The minimum amount of overlap to require when comparing a CoRecMotif to a reference motif. (Default: 5)

output_file

character(1) or NULL. The path to the file where the results should be saved, or NULL not to save the results. (Default: NULL)

check_corecmotifs

logical(1). Should corecmotifs be checked for validity? Setting this to FALSE can increase speed, but if corecmotifs contains anything other than valid CoRecMotifs, it may produce uninformative error messages. (Default: TRUE)

Details

The PPM representation of each CoRecMotif is compared to the reference motifs with memes::runTomTom() using Euclidean distance ("ed") as the distance metric. The match_motif and match_pvalue slots of the CoRecMotif are filled in based on the best match returned by memes::runTomTom(). The match_pvalue slot is corrected for multiple comparisons by multiplying the raw match p-value by the number of motifs in the reference database. The match_cluster slot is filled in based on the user-provided cluster assignments or left empty if no cluster assignments are provided.

Value

A list of CoRecMotifs with the match_motif, match_pvalue, and (optionally) match_cluster slots filled in.

See Also

motif_clusters for a description of the expected columns of cluster_assignments

Examples

print("FILL THIS IN")

Siggers-Lab/hTF_array documentation built on Feb. 7, 2024, 11:25 p.m.