Spamo motif logos

127 views
Skip to first unread message

Mike

unread,
Oct 29, 2014, 9:16:09 PM10/29/14
to meme-...@googlegroups.com
Command line Spamo can generate histograms as separate image files (png, eps) but the secondary motif logos are only visible in the html file and they are quite small and therefore unsuitable for a publication or poster.  The motif making tool ceqlogo will not work with either the html or xml file output from Spamo (it says it can't find any motifs: "No motifs loaded! Did you specify an input file?").  Is there any way to generate images of the secondary motifs found by the Spamo command line program?

James Johnson

unread,
Oct 29, 2014, 9:48:45 PM10/29/14
to meme-...@googlegroups.com
You need the motif file you input to SpaMo for the secondary motifs to create the logos. Then just get the motif ID of the motif from the SpaMo output and use meme2images or ceqlogo.

If you ran SpaMo on the command line then hopefully you still have the motifs. If you ran SpaMo on one of the websites then it's likely the motif inputs are in the motif databases download which is linked from this page: http://meme.ebi.edu.au/meme/doc/download.html

Once you have the database of secondary motifs you can use meme2images to create the logo in eps format.
Usage:
    meme2images [options] <motifs file> <output directory>
Options:
    -motif <ID>      output only a selected motif; repeatable
    -eps             output logos in eps format
    -png             output logos in png format
    -rc              output reverse complement logos
    -help            print this usage message
Description:
    Creates motif logos from any MEME or DREME motif format.


So if your motif has the ID "MA0004.1" in the file "JASPAR_CORE_2014.meme" then the command to create an EPS file would be:
meme2images -motif MA0004.1 -eps JASPAR_CORE_2014.meme output_dir


If you want more options or need to align multiple motifs then you have to resort to ceqlogo.
USAGE: ceqlogo -i <filename> [options]
  1. Example: Load a motif called MA0036.1 within a MEME motif file
     ceqlogo -i meme.motifs -m MA0036.1 -o logo.eps
  2. Example: Load second motif from each of two files and shift the first one
     ceqlogo -i2 meme1.motifs -s 2 -i2 meme2.motifs -o logo.png -f PNG

Motif loading options:
  -i <input filename>        Loads motifs within the file as specified by
                              the following -m options.
  -i<id/n> <input filename>  Loads the specified motif (n-th position or ID)
                              within the file. Can also be combined with the
                              -m option.
  -m <id/n>                  Loads a motif from the file specified by the
                              previous -i option. The motif ID or position
                              can be used.
  -n <sample number>         Number of samples for previously loaded motif
                              (-m or -i).
  -s <shift>                 Shift for previously loaded motif (-m or -i).
  -r                         Reverse complement previously loaded motif
                              (-m or -i).
  -p <pseudocounts>          Pseudocounts for loaded motifs; default: 0.
  -l                         Prefentially lookup motifs by position;
                              default: prefer the ID.

Logo options:
  -o <output file>           Output file path. Default is stdout.
  -f <format>                Format of output (EPS, PNG); default: EPS
  -h <logo height>           Height of output logo in cm (real # > 0).
  -w <logo width>            Width of output logo in cm (real # > 0).
  -t <title label>           Label for title.
  -d <fine print>            Descriptive fine print.
  -x <x-axis label>          Label for x-axis.
  -y <y-axis label>          Label for y-axis; default: "bits".
  -c <tic bits>              Number of bits between tic marks.
  -e <error bar fraction>    Fraction of error bar to show (real # > 0).

Logo toggles (all uppercase)
  -S   ...................   Turn on small sample correction.
  -B   ...................   Turn on bar ends.
  -E   ...................   Turn on error bars.
  -O   ...................   Turn on outlining of characters.
  -X   ...................   Turn on boxing of characters 
  -N   ...................   Turn off numbering of x-axis.
  -Y   ...................   Turn off y-axis


Mike

unread,
Oct 29, 2014, 9:54:05 PM10/29/14
to meme-...@googlegroups.com
>You need the motif file you input to SpaMo for the secondary motifs to create the logos. Then just get the motif ID of the motif from the SpaMo output and use meme2images or ceqlogo.

Of course, it was so simple I didn't even think of it :)  Thank you I will give it a try using the secondary motifs I input into Spamo.
Reply all
Reply to author
Forward
0 new messages