I have around ~3,000 short sequences of approximately ~10Kb long. What are the best ways to find the motifs among all of these sequences? Is there a certain software/method recommended?

There are several ways to do this. My goal would be to:

(1) Check for motifs repeated within individual sequences

(2) Check for motifs shared among all sequences

(3) Check for the presence of "expected" or known motifs

With respect to #3, I'm also curious if I find e.g. trinucleotide sequences, how does one check the context around these regions?

Thank you for the recommendations/help!

  • $\begingroup$ Are you looking for motifs shared by all the sequences? Motifs repeated in each sequence? Are you looking for the presence of specific, known motifs? $\endgroup$
    – terdon
    Commented Jun 8, 2017 at 20:34
  • $\begingroup$ "Are you looking for motifs shared by all the sequences? Motifs repeated in each sequence?" I was looking for both motifs shared by all sequences and repeated in sequences, but actually it would be interesting to check each sequence for a repeated sequence. "Are you looking for the presence of specific, known motifs?" No, but it would be interesting to look into this in retrospect $\endgroup$ Commented Jun 8, 2017 at 21:23
  • $\begingroup$ OK, please edit your question and ass this information. Comments are easy to miss, hard to read and can be deleted without warning. The three problems (de-novo shared motif identification, de-novo repeated motif identification and detecting known motifs) are different and each requires its own approach. $\endgroup$
    – terdon
    Commented Jun 8, 2017 at 21:26
  • $\begingroup$ @terdon Of course $\endgroup$ Commented Jun 8, 2017 at 21:34
  • $\begingroup$ Do you mean 10kb in total, or 3000 sequences, each of length around 10kb? $\endgroup$ Commented Jun 8, 2017 at 23:06

5 Answers 5


For (3), this page has a lot of links to pattern/motif finding tools. Following through the YMF link on that page, I came across the University of Washington Motif Discovery section. Of these projection seemed to be the only downloadable tool. I find it interesting how old all these tools are; maybe the introduction of microarrays and NGS has made them all redundant.

Your sub-problem (2) seems similar to the problem I'm having with Nippostrongylus brasiliensis genome sequences, where I'd like to find regions of very high homology (length 500bp to 20kb or more, 95-99% similar) that are repeated throughout the genome. These sequences are killing the assembly.

The main way I can find these regions is by looking at a coverage plot of long nanopore reads mapped to the assembled genome (using GraphMap or BWA). Any regions with substantially higher than median coverage are likely to be shared repeats.

I've played around in the past with chopping up the reads to smaller sizes, which works better for hitting smaller repeated regions that are such a small proportion of most reads that they are never mapped to all the repeated locations. I wrote my own script a while back to chop up reads (for a different purpose), which produces a FASTA/FASTQ file where all reads are exactly the same length. For some unknown reason I took the time to document that script "properly" using POD, so here's a short summary:

Converts all sequences in the input FASTA file to the same length. Sequences shorter than the target length are dropped, and sequences longer than the target length are split into overlapping subsequences covering the entire range. This prepares the sequences for use in an overlap-consensus assembler requiring constant-length sequences (such as edena).

And here's the syntax:

$ ./normalise_seqlengths.pl -h
    ./normalise_seqlengths.pl <reads.fa> [options]

      Only display this help message

      Target fragment length (in base-pairs, default 2000)

      Minimum overlap length (in base-pairs, default 200)

      Keep short sequences (shorter than fraglength)

The MEME Suite web site contains a collection of tools for motif analysis (I'm one of the maintainers). It contains two de novo motif discovery tools: MEME and DREME. Public web applications are provided, but you can also download and build command line tools for a local installation.

For your first goal you could use MEME and select the "Any number of repetitions model" (ANR). For your second goal, you'd use MEME with the "Zero or One Occurrences Per Sequence" (ZOOPS) model. For your third goal you could use FIMO (Find Individual Motif Occurrences), and one or more of the motif databases provided on the software and database download page.

It sounds like your sequence data is about 30Mb. The MEME web application is limited to 60kb of sequence data, so you'd have to install a local copy of the MEME Suite. MEME would take a long time to analyze a 30Mb sequence database unless you have MPI configured, and lots of cores available. You might want to consider analyzing a randomly selected subset of your sequences. The running time of MEME grows as the cube of the number of sequences.

For short motifs, you may want to use DREME rather than MEME. DREME is better than MEME at identifying short motifs, but is limited to motifs <= 8 positions wide.


Check out HOMER. "Software for motif discovery and next generation sequencing analysis", it's what my lab uses currently for finding eRNA motifs.

Edit: For @ShanZhengYang "HOMER was designed as a de novo motif discovery algorithm..." HOMER De Novo Motif

  • $\begingroup$ Can one do de novo motif discovery? If not, I'm not entirely sure how I would create a background with this model. $\endgroup$ Commented Jun 12, 2017 at 16:41
  • $\begingroup$ @ShanZhengYang See my edit. $\endgroup$
    – EMiller
    Commented Jun 12, 2017 at 16:48
  • $\begingroup$ Thanks. I'm still not sure given my set-up how to choose a background for Homer however... $\endgroup$ Commented Jun 12, 2017 at 17:11
  • $\begingroup$ I've never used it for De Novo, so take this with a grain of salt, but try the defaults first. Perhaps shoot the developers an email. $\endgroup$
    – EMiller
    Commented Jun 12, 2017 at 17:41
  • $\begingroup$ To expand on @EMiller 's comment, for many model organisms, HOMER can figure out a background model for you. You just have to install the supporting files for your model organism using configureHomer.pl $\endgroup$ Commented Jun 13, 2017 at 19:19

it is under development, but maybe BaMMmotif! is something for you? Its main selling point is that it can look for motifs enriched in a set of sequences of equal length de novo. If you can't/don't want to supply a negative set it learns one from the positive sequences. There is a wealth of options to choose from if you have more information about your sequences: there are different models for "zero or one", "one" and "multiple" occurrences of the motif.

You can also use it to look for known motifs, if you encode them as an XXmotif PWM. If you have a file with motifs (like binding sites) you can use that as initialization as well.

While I have not used the software myself, the authors are very responsive on git and the installation instructions seem pretty straightforward.

EDIT: Apparently the software was developed with ChIP experiments as the usual use case scenario, it might misbehave for larger sequences or take super long to run.

  • 2
    $\begingroup$ Hi galicae, thanks for your answer and welcome to Bioinformatics Stack Exchange. Your answer is a bit short, and could do with a bit more explanation. Could you please add a bit more information into your answer about BaMMmotif? Is it a tool that you have used before? Would this be an appropriate program to find novel shared motifs, repeated motifs within the same sequence, or known motifs? $\endgroup$
    – gringer
    Commented Jun 9, 2017 at 15:39
  • $\begingroup$ @gringer fair enough, edited. $\endgroup$
    – galicae
    Commented Jun 12, 2017 at 6:27

Most tools I know of looks for enrichment of specific motifs - but that requires that you have a set of sequences which are of special interest and a background set to test against.

Is that your case?

Update after comments 12th June 2017.

You could try the meme suite more specifically the motif finder

  • 1
    $\begingroup$ Hi Kristoffer Vitting-Seerup, thanks for your comment and welcome to Bioinformatics Stack Exchange. We appreciate any comments like this that help people ask better questions. I have flagged your response as "not an answer" because I think it should be added as a comment to the question (which you can't do yourself until you reach a reputation of 50). $\endgroup$
    – gringer
    Commented Jun 9, 2017 at 15:35
  • $\begingroup$ Hi there, yes this would be a better comment to the original question. This is the SO style. Regarding your question, I don't have a background set $\endgroup$ Commented Jun 9, 2017 at 18:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.