# The MEME Suite

## Motif-based sequence analysis tools

## Ceqlogo

### Usage:

`ceqlogo [ -i <motif file> -m <id> | -i<id> <motif file> ]+ [options]`

### Examples

Load all motifs within a MEME motif file and write to logo.eps in EPS format:
`ceqlogo -i meme.motifs -o logo.eps -f EPS`

Load second motif from each of two files and shift the first one:
`ceqlogo -i2 meme1.motifs -s 3 -i2 meme2.motifs -o logo.eps -f EPS`

### Description

The ceqlogo program generates one or multiple, aligned logos in EPS or PNG format, based on a set of frequency matrices provided in the MEME file format. The code of `ceqlogo` is based on the Perl code of weblogo but is written in C and supports PNG output. Note that the program strives to use command line options similar to those of `weblogo`.

The letter stacks are calculated by the following equations found in Schneider and Stephens paper "Sequence Logos: A New Way to Display Consensus Sequences" and adapted from the weblogo documentation. The height of a letter is calculated as:

`height(b,l) = f(b,l) * R(l)`

where `f(b,l)` is the frequency of base or amino acid `b` at position `l`. The stack height `R(l)` is the amount of information present at position `l` and can be quantified as follows:

`R(l) for amino acids = log(20) - (H(l) + e(n))`

`R(l) for nucleic acids = 2 - (H(l) + e(n))`

where `log` is taken base `2`, `H(l)` is the uncertainty at position `l`, and `e(n)` is the error correction factor for small sample sizes `n`. `H(l)` is computed as follows:

`H(l) = - (Sum f(b,l) * log[ f(b,l) ])`

where again, `log` is taken base `2`. `f(b,l)` is the frequency of base `b` at position `l`. The sum is taken over all amino acids or bases.

The error correction factor `e(n)` is approximated by:

`e(n) = (s-1) / (2 * ln 2 * n)`

### Input

#### Motif File

A file containing one or more motifs in MEME format.

### Output

If no output file is specified `ceqlogo` writes to standard output.

### Options

Option | Parameter | Description | Default Behavior
--- | --- | --- | ---
Options with arguments
-i | motif file | Load all motifs within the motif file. |
-m | id or num | Load the numth motif or the motif whose ID is id within the motif file specified by the previous -i option. |
-ix | motif file | Load the xth motif or the motif whose ID is x within the motif file. |
-r |  | Reverse-complement the logo for the previous -i or -m option. |
-l |  | Load motifs by IDs, preferentially. | Load motifs in input order, preferentially.
-s | shift | Offset the previously loaded motif by shift. |
-b | bar bits | Number of bits in bar (real # > 0). | DNA motifs have a default height of 2 bits and protein motifs have a default height of 4.3 bits.
-c | tic bits | Number of bits between tic marks. |
-e | error bar fraction | Fraction of error bar to show (real # > 0). |
-f | EPS|PNG | Set the format of the output. | The output is created in EPS.
-F |  | Create a frequency logo with stack height 1. | Height of stack is information content of motif column.
-h | logo height | Height of output logo in cm (real # > 0). |
-o | image file | Create an image called image file and send the output to it. | Send the output to standard out.
-n | sample number | Set the sample count of the previously loaded motif to sample number. This value is used to calculate error bars. | Use the sample count embedded in the motif file.
-t | title label | Set the title of the image to title label. |
-w | logo width | Width of output logo in cm (real # > 0) |
-x | x-axis label | Label for x-axis. |
-y | y-axis label | Label for y-axis. |
-p | pseudocount | Pseudocount for motifs. | A pseudocount value of 1 is used.
-d | fineprint | Print fineprint in small font at bottom of logo. | "Ceqlogo <date> " is printed.
--test | verbosity level | Runs a self test, ignoring all other options. The verbosity level [0..3] is optional. |
Toggles
-S |  | Turn off small sample correction. | Small sample correction is used.
-B |  | Toggle bar ends. |
-E |  | Toggle error bar. |
-O |  | Toggle outlining of characters. |
-N |  | Toggle numbering of x-axis. |
-X |  | Toggle boxing of characters. |
-Y |  | Toggle y-axis. |