<p>A popular tool for doing this is tomtom, part of the meme package.</p>
<p>You can try it via interactive web form <a href="https://meme-suite.org/meme/tools/tomtom" rel="nofollow noreferrer">here</a>.</p>
<p>Once installed locally it can be <a href="https://meme-suite.org/meme/doc/tomtom.html?man_type=web" rel="nofollow noreferrer">run via command line</a></p>
<p>Additionally, it is available in the Bioconductor package <code>memes</code> as explained in <a href="https://snystrom.github.io/memes-manual/articles/core_tomtom.html" rel="nofollow noreferrer">Motif Comparison using TomTom</a></p>

CC BY-SA 4.0
2022-08-07T22:22:23.073Z
Thanks @malcook: TomTom seems like the tool.  The list of required libraries/tools to install first before tomtom can be installed is quite lengthy and even after that the installation is riddled with errors in the "make" step for me. Any hints on installation on Linux/Ubuntu?
Zebra Fish
CC BY-SA 4.0
2022-08-08T15:24:43.380Z
Hi @ZebraFish - I have no hints - you are right: the meme suite is a bit of bear to install. 

The R/BioConductor package 'universalmotif' also addresses this purpose and is  easier to install.  I have not (yet?) used it for such, but have been recently impressed by its [documentation](https://bioconductor.org/packages/release/bioc/html/universalmotif.html) specifically that on "Motif comparisons and P-values".
malcook
CC BY-SA 4.0
2022-08-08T17:56:26.407Z
Thanks @malcook: After much haggling and hacking around I discovered the simple way to install TomTom is actually through "conda install -c bioconda meme". This puts a slew of meme command line executables into a conda env. directory including TomTom. This simple method of installation was unnecessarily hard to find  if you are new to this field. Just looking at the meme suite webpage It's a curiosity why such simple tools (from a computational person's perspective motif search against a database of motifs is a very simple task) can be so obfuscated.
Zebra Fish
CC BY-SA 4.0
2022-08-05T15:46:30.670Z
2022-08-05T15:46:30.670Z
malcook
<p><em>Answer from @m, converted from comment:</em></p>
<p>Hi @ZebraFish Motifs package Biopython</p>
<p><a href="https://biopython.org/docs/1.76/api/Bio.motifs.html" rel="nofollow noreferrer">https://biopython.org/docs/1.76/api/Bio.motifs.html</a></p>

CC BY-SA 4.0
2022-08-04T06:51:56.020Z
2022-08-04T06:51:56.020Z
gringer
<p>I need a tool or a function I can use in my code (R, or Python) that I can cross reference a MOTIF against known MOTIFS, a function that will take as input a MOTIF (a probability weight matrix, PWM which is a 4 by m matrix for an m-length motif) and spit out the closest -n- known motif(s). Is there such a function/tool or something close to it? Thanks much.</p>

<r><rna-seq><python><motifs>
Tool for cross referencing a newly found MOTIF to database of known MOTIFS
# Tool for cross referencing a newly found MOTIF to database of known MOTIFS

(Asked by: username_0 on 2022-08-03)

I need a tool or a function I can use in my code (R, or Python) that I can cross reference a MOTIF against known MOTIFS, a function that will take as input a MOTIF (a probability weight matrix, PWM which is a 4 by m matrix for an m-length motif) and spit out the closest -n- known motif(s). Is there such a function/tool or something close to it? Thanks much.

**Tags:** r, rna-seq, python, motifs

---

## 2 answers

### Answer by username_1 on 2022-08-05. Score: 2 | Accepted answer

A popular tool for doing this is tomtom, part of the meme package.

You can try it via interactive web form [here](https://meme-suite.org/meme/tools/tomtom).

Once installed locally it can be [run via command line](https://meme-suite.org/meme/doc/tomtom.html?man_type=web)

Additionally, it is available in the Bioconductor package `memes` as explained in [Motif Comparison using TomTom](https://snystrom.github.io/memes-manual/articles/core_tomtom.html)

> **Comments:**
> **username_0**: Thanks @malcook: TomTom seems like the tool.  The list of required libraries/tools to install first before tomtom can be installed is quite lengthy and even after that the installation is riddled with errors in the "make" step for me. Any hints on installation on Linux/Ubuntu?  
> **username_1**: Hi @ZebraFish - I have no hints - you are right: the meme suite is a bit of bear to install.   The R/BioConductor package 'universalmotif' also addresses this purpose and is  easier to install.  I have not (yet?) used it for such, but have been recently impressed by its [documentation](https://bioconductor.org/packages/release/bioc/html/universalmotif.html) specifically that on "Motif comparisons and P-values".  
> **username_0**: Thanks @malcook: After much haggling and hacking around I discovered the simple way to install TomTom is actually through "conda install -c bioconda meme". This puts a slew of meme command line executables into a conda env. directory including TomTom. This simple method of installation was unnecessarily hard to find  if you are new to this field. Just looking at the meme suite webpage It's a curiosity why such simple tools (from a computational person's perspective motif search against a database of motifs is a very simple task) can be so obfuscated.  

---

### Answer by username_2 on 2022-08-04. Score: 1

*Answer from @m, converted from comment:*

Hi @ZebraFish Motifs package Biopython

<https://biopython.org/docs/1.76/api/Bio.motifs.html>


---

