Go back to top



EPublish is a version of Publish with command line control. Publish arranges sequences for publication. It creates a text file that you can modify to your own needs with a text editor.


EPublish creates a text file that you can customize for publication. You can choose lines that represent the sequence, its complement, a decimal scale, a three-letter translation, a one-letter translation, a numbering line with numbers at every twentieth symbol, a blank line, or a tagged line. Additional sequences can be shown either completely or with only the differences marked. A match line between any two sequence lines marks the matches. The lines can appear in any order. EPublish can start numbering each line from any number you choose. Each line you select with a capital letter is numbered at both ends. Each type of line is described in detail below. The output can be blocked using two parameters, the block size, and the number of blocks per line. The ranges of translation must be chosen by you for each translation line selected. You can translate as many non-overlapping ranges as you wish for each translation line you select. If you have overlapping ranges of translation, you must select two translation lines and set the ranges appropriately.


This GCG program was modified by Jaakko Hattula (Tampere University of Technology, Finland) and Peter Rice (E-mail: pmr@sanger.ac.uk Post: Informatics Division, The Sanger Centre, Hinxton Hall, Cambridge, CB10 1RQ, UK).

All EGCG programs are supported by the EGCG Support Team, who can be contacted by E-mail (egcg@embnet.org).


Here is the session using EPublish to generate the figure below. Before the session, Assemble was used to extract the two gene sequences ggamma.seq and agamma.seq from gamma.seq. Then BestFit was run with the command line options -OUT and -LIMit to generate the aligned sequences ggamma.gap and agamma.gap.

  % epublish
   EPUBLISH uses any sequence data
   PUBLISH what sequence ?  ggamma.gap
                    Start (* 1 *) ?
                  End (*  1700 *) ?
   Please select the lines in the order in which
   you want them to appear in the figure.
       a) number line        :                10
       b) dot scale line     :                 .         .
       c) the sequence itself:        GAATTCACGATCGATCGTAG
       d) dash scale line    :     1  ---------+---------+   20
       e) the complement     :        CTTAAGTGCTAGCTAGCATC
       f) translation        :        GluPheThrIleAspArg
       g) translation        :        E  F  T  I  D  R
       h) tagged blank line  :   ###
       i) blank line         :
       j) 2nd sequence (diff):                C     G
       k) 2nd sequence (all) :        GAATTCACCATCGAGCGTAG
       l) match line         :        |||||||| ||||| |||||
       m) 2nd. translation   :        GluPheThrIleAspArg
       n) 2nd. translation   :        E  F  T  I  D  R
   Select the lines in the order you wish them to appear
   and then press .  Use upper case to identify the
   lines that you want numbered at the ends.
                        (* cDefii *) fCji
   What number is the first symbol in row 2 (* 1 *) ?  2101
   Please enter the ranges of translation for translation line
   number 1 using the original coordinates of the sequence.
                    Start (*    1 *) ?  79
                      End (* 1700 *) ?  170
   Get another range from this sequence (* Yes *) ?
                    Start (*  170 *) ?  294
                      End (* 1700 *) ?  516
   Get another range from this sequence (* Yes *) ?
                    Start (*  516 *) ?  1402
                      End (* 1700 *) ?  1530
   Get another range from this sequence (* Yes *) ?  n
   What is the sequence for line 3 ?  agamma.gap
                    Start (* 1 *) ?
                  End (*  1700 *) ?
   Put this sequence range at what start (* 1 *) ?
   How many symbols per block (* 60 *) ?
   How many blocks do you want on each line (* 1 *) ?
   What should I call the output file (* ggamma.publish *) ?


The output from this session was the basis of the figure at the end of this entry in the EGCG Program Manual. The output file was modified by replacing the left-hand numbers with the labels "GGamma" and "AGamma". The amino acid Arg, which spans the first intervening sequence, was added. If you are interested in a version of EPublish which does this automatically, please contact the EGCG support team (E-mail: egcg@embnet.org).


Red is a text formatter that creates publication-quality documents on a PostScript laser printer such as the Apple LaserWriter. You can use 13 different fonts, scaling each font to any size. You can also include figures and graphics from any GCG graphics program within the text of the document. Most GCG documentation, correspondence, and publication is done with Red.


EPublish lets you choose any repeating set of lines numbered from any offset. There are many ways to arrange the data into groups that looks absurd if you use the scaling or numbering lines that are designed to identify every tenth symbol. You should think about whether the starting offset and the blocking are compatible with the scaling and numbering lines you have chosen. EPublish is very flexible; it writes a "sensible" output for any combination of lines, offset, and blocking you choose, but the output you choose may look ridiculous.


EPublish asks you for the number of the first symbol in every line that is numbered. You must also specify this offset for the scaling lines to establish the decimal intervals appropriately. The default is the beginning coordinate of the primary sequence.

You can use the command line option -SKIPzero to make EPublish skip the zeroth base if your numbering starts with a negative number.


You may not select more than 20 lines. EPublish will not translate interrupted coding sequences correctly if there is a split codon at the boundary. You should translate ranges that do not include the split codon and add the missing amino acid when you edit the output file.


The source code for EPublish has been designed to allow changes to be made easily. You may get the source code from your system manager for modification. If you can think of general features that should be incorporated in EPublish EGCG will happily add them.


Each line can be put out as a single block or broken into as many blocks as you wish. However, there may be no more than 150 characters in each line. Each block requires a space to separate it from the block following, so a line with ten blocks of ten symbols each would require 110 characters and would, therefore, be allowed. There is a nine-column blank space at the left end of each line in which you may add labels for the line.


Each line from the menu can be selected as many times as you choose. In effect, you are selecting a repeat unit for the figure. Every line selected with a capital letter is numbered at each end. Each type of line is described in detail below. You should think of the figure as being based on a primary sequence that EPublish identifies first. Translation ranges and the overlay positions for the difference lines are queried in terms of the original coordinates of the primary sequence. The figure is only as long as the range chosen from the primary sequence.

Number Line

creates numbers from your offset that number every twentieth symbol. If your offset is -45, the sixth base is -40 and is numbered as such. If a number spans a block division, then the number is also divided. If you chose, for instance, blocks of 5 for this example, the number would appear as -4 5. The number line will not look good if you do not choose decimal blocking and adjust your offset so that the numbers align with the ends of each block.

Dot Scale Line

puts periods at every tenth position from the first symbol that is evenly divisible by ten after the offset.

Sequence Line

puts out the range of the sequence chosen in the blocking format chosen.

Dash Scale Line

makes a scale line with '-'s at every symbol position. Every position that is evenly divisible by ten is marked with a '+'.

Sequence Complement

presents the nucleotide complement for each symbol in the original sequence.

Translation (Three-Letter)

makes a translation of all the non-overlapping ranges you choose from the original sequence. You are prompted for each range. If no translation range is covered for any particular output line, then no line is printed and no space is left. If you wish to translate overlapping ranges, you must select two translation lines. The ranges of translation are specified in the coordinates of the original sequence as you would see them in the original sequence file.

Translation (One-Letter)

works exactly like the three-letter translation except that the single letter amino acid symbols are used.

Tagged Blank Line

leaves a blank line that has the string '###' at the beginning. The idea of the tag is to help you substitute other strings for the tag with a text editor. The tagged line is not filled with spaces.

Blank Line

leaves a blank line filled with spaces.

Second Sequence Lines

shows all of, or just the differences between, other sequences and the primary sequence (shown in the sequence line). The difference line prints a blank in all of the columns where the new sequence is the same as the primary one. You can put a character other than a blank in the columns where the second sequence is the same as the primary sequence using the -AGReement option. When the sequences are not in agreement, the character from the second sequence is shown. For each second sequence line you have to name a new sequence file, a range of interest within it, and the number of the base in the primary sequence where you want this new sequence to start. As in the translation lines, the number for the start of this overlay is in the coordinates of the original sequence. EPublish does not attempt to make an optimal alignment of the second sequences.

Match Line

puts a bar ('|') in every column where the symbol in the row above matches the symbol in the row below (upper and lower case are equivalent). There is no requirement for the lines above or below the match line to be legitimate sequence lines. If you put a match line in the top or bottom row, it is left completely blank. Note that a space above and below would generate a match bar in the match line.


All parameters for this program may be put on the command line. Use the option -CHEck to see the summary below and to have a chance to add things to the command line before the program executes. In the summary below, the capitalized letters in the qualifier names are the letters that you must type in order to use the parameter. Square brackets ([ and ]) enclose qualifiers or parameter values that are optional. For more information, see "Using Program Parameters" in Chapter 3, Basic Concepts: Using Programs in the GCG User's Guide.

  Minimum syntax: % epublish [-INfile=]GGamma.Gap -Default
  Prompted Parameters:
  [-INfile=]GGamma.Gap      Sequence file
  -BEGin1=1 -END1=1700      Range(s) of interest
  -MENU="cDefii"            Menu options (use "" to preserve case)
  -FIRST1=1                 Numbering start(s)
  -STArt1=1                 Sequence start position(s)
  -SYMBols=60               Symbols per block
  -BLOCKs=1                 Blocks per line
  [-OUTfile=]GGamma.Publish Output file
  -INfile2=AGamma.Gap       Additional sequence file(s)
  Optional Parameters:
  -RNA          makes complementary sequences look like RNA instead of DNA
  -AGReement=.  places period at positions where second sequence agrees
             with primary sequence
  -SKIpzero     skips the zero position on rows whose first symbol is


The files described below supply auxiliary data to this program. The program automatically reads them from a public data directory unless you either 1) have a data file with exactly the same name in your current working directory; or 2) name a file on the command line with an expression like -DATa1=myfile.dat. For more information see Chapter 4, Using Data Files in the User's Guide.

The translation of codons to amino acids, the identification of potential start codons and stop codons, and the mappings of one-letter to three-letter amino acid codes are all defined in a translation table in the file translate.txt. If the standard genetic code does not apply to your sequence, you can provide a modified version of this file in your working directory or name an alternative file on the command line with an expression like -TRANSlate= mycode.txt. Translation tables are discussed in more detail in the Data Files manual.


The parameters and switches listed below can be set from the command line. For more information, see "Using Program Parameters" in Chapter 3, Basic Concepts: Using Programs in the GCG User's Guide.


sets EPublish to make 'U' complement 'A' and 'u' complement 'a'. This makes complementary sequences look like RNA instead of DNA.


When you select a second sequence line that shows only differences, EPublish puts a space character wherever the second sequence is the same as (agrees with) the primary sequence. This option lets you set that agreement character to some other character -- a period in this example.


skips the zeroth character in numbering. Geneticists seem to have a propensity to number sequences with a numbering system that has no zero in it. This switch is a concession to them.

We recommend that gene sequences be numbered so that the first base of the first codon is numbered zero. Each publication that numbers a sequence without using zero embeds a convention in genetics that is completely inconsistent with the data processing needs of the field. It is inconceivable that a zero-free standard for the coordination of genetic sequences is adopted.


specifies the second input sequence file (if any).


is the position that the next input sequence starts at relative to the first sequence.


is the number of the first base in the first sequence.


Usually, translation is based on the translation table in a default or local data file called translate.txt. This option allows you to use a translation table in a different file. (See the Data Files manual for information about translation tables.)

Printed: April 22, 1996 15:53 (1162)