Helper functions

Import motifs

Cluster the TF-MoDISco motifs across each task

We need to decide which ones to merge together. We start with a best guess for clustering, and then manually decide on the right motifs from each task to cluster.

Extract constituent motif prevalences

For each aggregated motif, extract the prevalence of the constituent motifs (by task) in the peaks.

Compute similarity of benchmark motifs to aggregated motifs

For each aggregated motif, compute the similarity of the closest motif in each benchmark for each task.

Compute similarity of benchmark motifs to aggregated motifs

For each aggregated motif, compute the similarity of the closest motif in the database of motifs.

Construct the plot