Eric Beitz March 2001

TEXshade: frequently asked questions

This is the sixth update of the FAQ list for TEXshade. Feel free to contact me if you have problems, questions or suggestions about the package. I will post them and provide hopefully helpful hints in future issues of this list.

    email: eric.beitz@uni-tuebingen.de
TEXshade: http://homepages.uni-tuebingen.de/beitz/tse.html

A. Increasing TEX’s memory settings

If you are using TEXshade to align several large sequences (about 1000 residues/sequence), LaTeX will probably stop compiling and quit with one of

the following messages: ! TeX capacity exceeded, sorry [main memory
size=384000] or ! TeX capacity exceeded, sorry [stack size=300].

Due to several requests I want to start a list of protocols how to increase the standard TEX memory settings for bigger alignments. Please contribute to this list by sending me the procedure for your particular system.

1. OzTEX 4.0 for the Macintosh:

Find the file ‘OzTeX:TeX:Configs:Default’. This file contains all memory settings. Look for the section ‘% TeX parameters’ and increase the values that TEX complains about during the run. You will have to restart OzTEX before the changes are active.

For older versions of OzTEX the configuration file has the same name but the path is somewhat different.

2. teTEX for *NIX: (contributed by Joerg Daehn)

Find the file: ‘/usr/share/texmf/web2c/texmf.cnf’ or

use locate texmf.cnf at the command prompt to find it.

Login as super user. Backup ‘texmf.cnf’ in case you destroy something and then open the ‘texmf.cnf’ file in your favorite text editor and use its search function to locate main_memory. This variable is set to 384000.

Change this to some higher value, i.e. 4000000 (works fine for me!). The total amount of memory should not exceed 8000000, so check the other values in that section.

Next, you want to change the stack size. Search for stack_size. This will be set to 300. I changed it to 4000 and it works fine.

There might be complains by TEX about further specific parameters such as stack_size. You find all those in the same file.

After this you have to run ‘texconfig init’.

Logout as root.

After this all should be set for large alignments. Happy TEXing!

The information on how to achieve this was derived from a mail in the teTEX mail archive. The original question was posted by Pascal Francq and answered by Rolf Nieprasch.

3. MiKTEX for Windows:

The MiKTEX documentation describes very detailed how the memory settings can be changed. In brief, you must locate the configuration file ‘miktex/config/miktex.ini’. In the [MiKTeX] section of this file you find all the parameters you need, e. g. mem_min, mem_max, buf_size,

stack_size etc.

It appears, that the standard settings of MiKTEX are bigger than that of other TEX installations, so it may not always be necessary to increase the values.

B. Problems using TEXshade

1. I cannot TEX the manual because I get the error message ‘!

TeX capacity exceeded, sorry ...’.

TEXshade needs a lot of memory for setting and shading alignments. The manual is a good test for your memory settings because it uses many alignments and fingerprints, which are in particular memory consuming. If you do not know how to increase TEX’s memory settings, and you do not know a TEX wizard either, then visit the TEXshade home-

page at http://homepages.uni-tuebingen.de/beitz/tse.html for

downloading the manual in either of three formats: DVI, PDF or PostScript.

2. I can set my alignment only when I reduce the number of basepairs by about 11,000. Otherwise I get the ‘! TeX capacity

exceeded, sorry ...’ error.

There are several parameters defining TEX’s usable space. If you are a TEX wizard (or you know one) increase the values that TEXshade complains about during the run in order to set bigger alignments. But do not be disappointed when your TEX system will not set an alignment containing thousands of residues. There is definitely an upper limit (probably the new L^{A}TEX3 will allow you to use even more memory). Setting alignments is a big job for a typesetting system!

3. I want to align 80 sequences but I get the ‘! No room for a new count’ message.

For each sequence two counter variables are used by TEXshade, further 14 counters for other purposes are needed (and TEX can handle only 255 counters). This limits the amount of sequences to about 100 in theory. But L^{A}TEX itself and each of the loaded packages allocates more counters further reducing the maximum number of sequences.

4. I receive error messages ‘! Missing $ inserted’ when TEXing my alignment. What is wrong?

At least one of the sequence names in the alignment file contains an underscore ‘ ’ symbol. This makes TEX to believe you missed to enter math mode because subscript initiated by an underscore is only allowed in math. You need to change the sequence name(s) either in the alignment file using the ‘find & replace’ option of your editor or by using the \nameseq command in the TEXshade environment. Nevertheless, subscript and superscript are permitted in sequence names,

e. g. \nameseq{1}{Name$_{sub}^{super}$} will result in Name_{sub}^{super}.

Since v1.3b TEXshade is much more tolerant concering special characters. Get it and read the section about sequence names.

5. My sequence names start out with a number in the alignment file. Why are they ignored by TEXshade?

TEXshade analyzes the first character of each line in the alignment file in order to decide whether it is a comment, a ruler or a sequence line etc. All lines starting out with a non-letter character are interpreted as nonsequence lines. Hence, you have to change those names in the alignment file. If you want to have sequence names starting with a number you can use the \nameseq command in the TEXshade environment to introduce

the number, e. g. \nameseq{1}{57th sequence}.

6. Only a fraction of the residues which are supposed to be shaded actually are. Why?

Make sure that TEXshade knows when protein sequences are to be set. Alignments in the ALN-format do not contain information about the sequence type (DNA or protein). In such cases DNA sequences are assumed by TEXshade leading to a shading of only A’s, C’s, G’s, R’s, T’s and Y’s. A simple solution is to say \seqtype{P} in the texshade environment.

7. There is an incompatiblity between TEXshade (v1.2) and the multi-language package ‘babel’!

You are right! The command \language is defined in both packages which leads to error messages. This bug is fixed since the release of TEXshade version 1.3 from March 2000. In this version \language is re-

placed by two commands: \germanlanguage and \englishlanguage.

8. TEXshade crashes when dashes “-” are used as gap symbols in alignment input files.

Yes. Be careful with all kinds of characters that are “active” in TEX, such as $ _^& % " \. The dash is not really active but two or three consecutive dashes are amalgamated to one longer dash in TEX. Having those characters in an input file might result in unforeseen errors or even crashes.

9. I have problems using PHD predictions in TEXshade. An empty .top or .sec file is created.

When you do the PHD run do not restrict the calculation to either secondary structure or topology prediction. Turn on everything. Otherwise the output will have some ambiguous lines which can not be interpreted by TEXshade. Result is an empty .top or .sec file.

C. Changing the output

1. How can I force TEXshade to print more residues per line?

Use the \residuesperline* command with the ‘*’ extension. This will allow you to set any number of residues per line that is desired, e. g.

\residuesperline*{97}. But then expect numerous ‘! Overfull

hbox’ errors due to printing lines that are broader than the preset \textwidth. The same command without the ‘*’ will calculate the highest number of residues fitting in one line and round it to be divisible by five.

2. Is it possible to add a caption to the TEXshade output?

Yes, it is. Since TEXshade v1.5 the \showcaption command is available to add captions on the top or the bottom of the alignment. The caption behaves exactly as a figure caption including the style, numbering and appearance in the list of figures.

Example: \showcaption{Nice alignment!}.

3. My alignment file contains the letters ‘B’ and ‘Z’ for Asx and Glx, respectively. How can I apply a special shading for these?

Use \funcgroup to define ‘B’ and ‘Z’ as functional groups and assign the colors and the printing style, e. g.

\funcgroup{B}{White}{Blue}{upper}{up}
\funcgroup{Z}{White}{Red}{upper}{up}

or add the new residues to an existing group, e. g.

\funcgroup{acidic/amide}{DENQBZ}{Black}{Green}{upper}{up}.

4. How can I build a legend using the ‘shadebox’ command?

The \shadebox command simply prints a color-filled box at the very location it occurs in the text. This means you have to use \shadebox in the normal text after the TEXshade environment or inside the caption. You find a minimal example below:

\begin{texshade}{alignmentfile.MSF}

    \showcpation{Red box: \shadebox{Red}

further commands, if needed

\end{texshade}

Legend:

    \shadebox{conserved}: conserved residues
    \shadebox{White}: boring residues

\shadebox{Red}: exciting residues

5. I do not like the spacing between the feature lines. How can I change it? Employ the respective space controlling command from the following

list \ttopspace, \topspace, \bottomspace, \bbottomspace. Those

are available since TEXshade v1.5 (see manual).