Navigate to Lab Session on AUGUSTUS. Using Scipio. Predicting Genes. AUGUSTUS-PPX.
Show all / no details.

Training AUGUSTUS

This manual is intended for those who want to retrain on their own ab initio AUGUSTUS for another species. Please do not rely on this manual and the scripts and programs. Check what they do on your data!

1. COMPILE A SET OF TRAINING AND TEST GENES

You will need a set of genomic sequences with bona fide gene structures (sequence coordinates of starts and ends of exons and genes). In many cases, or as a first step towards modelling complete genes, it is sufficient to have only the coding parts of the gene structure (CDS).

[+] Number and quality of gene structures...

[+] The gene set should be non-redundant...

Each sequence can contain one or more genes, the genes can be on either strand. However, the genes must not overlap, and only one transcript per gene is allowed. Store the sequences together with their annotation in a simple genbank format. For the exact format that the training program can read in look as an example at one of the training genbank files at the augustus web server: http://augustus.gobics.de/datasets/

1.1 Options for compiling a set of gene structures

  1. pre-existing gene structures (e.g. from GenBank)
  2. spliced alignments of ESTs against the assembled genomic sequence (e.g. using PASA)
  3. spliced alignments of de novo assembled transcriptome short reads (RNA-Seq)
  4. spliced alignments of protein sequences of the same or a very closely related species against the assembled genomic sequence, e.g. using Scipio.
    This approach is described in section Using Scipio to create a training set.
  5. gene structures from a related species
  6. iteration of training with predicted genes, starting with an existing parameter set

1.2 Split gene structure set into training and test set

Randomly split the set of annotated sequences in a training and a test set.

randomSplit.pl genes.gb 100
This generates a file genes.gb.test with 100 randomly chosen loci and a disjoint file genes.gb.train with the rest of the loci from genes.gb:
grep -c LOCUS genes.gb*
# genes.gb:586
# genes.gb.test:100
# genes.gb.train:486
In order for the test accuracy to be statistically meaningful the test set should also be large enough (100-200 genes). You should split the set of gene structures really randomly! Do not just take the first and the last part of the file as then the test set is unlikely to be representative. The script randomSplit.pl is in the scripts directory.

[+] Additional splice site training set...

2. CREATE A META PARAMETERS FILE FOR YOUR SPECIES

We call parameters like the size of the window of the splice site models and the order of the Markov model meta parameters, in contrast to parameters like the distribution of splice site patterns, the k-mer probabilities of coding and noncoding regions. There are a few dozen meta parameters but many thousands of parameters. The meta parameters determine how the parameters are calculated.

Create the files for training "bug" from a template.

new_species.pl --species=bug
new_species.pl uses the environment variable AUGUSTUS_CONFIG_PATH to determine the directory in which AUGUSTUS stores the species parameters. You should see a report like this:
creating directory /home/mario/augustus/trunk/config/species/bug/ ... creating /home/mario/augustus/trunk/config/species/bug/bug_parameters.cfg ... creating /home/mario/augustus/trunk/config/species/bug/bug_weightmatrix.txt ... creating /home/mario/augustus/trunk/config/species/bug/bug_metapars.cfg ... ...
The file bug_parameters.cfg contains besides meta-parameters also parameters to augustus and etraining like defaults for output format settings. Edit bug_parameters.cfg and set stopCodonExcludedFromCDS to true.

[+] The *_parameters.cfg file...

[+] Distinguishing GC content classes...

3. MAKE AN INITIAL TRAINING

This step may be skipped if step 4 below is done. However, in a semi-automatic setting (you type the commands in this document) it is not recommended to skip it. Train augustus for the species bug on the training set of gene structures.
etraining --species=bug genes.gb.train
This creates/updates parameter files for exon, intron and intergenic region in the directory $AUGUSTUS_CONFIG_PATH/species/bug.
ls -ort $AUGUSTUS_CONFIG_PATH/species/bug/
now yields
-rw-r--r-- 1 mario    810 2011-01-08 10:50 bug_weightmatrix.txt
-rw-r--r-- 1 mario    810 2011-01-08 10:50 bug_weightmatrix.txt
-rw-r--r-- 1 mario   1355 2011-01-08 10:50 bug_metapars.utr.cfg
-rw-r--r-- 1 mario   2057 2011-01-08 10:50 bug_metapars.cfg
-rw-r--r-- 1 mario   7156 2011-01-08 22:05 bug_parameters.cfg
-rw-r--r-- 1 mario 100100 2011-01-08 22:35 bug_intron_probs.pbl
-rw-r--r-- 1 mario 234355 2011-01-08 22:35 bug_exon_probs.pbl
-rw-r--r-- 1 mario  32588 2011-01-08 22:35 bug_igenic_probs.pbl
where bug_{intron,exon,igenic}.pbl are our newly created parameter files.

Now we make a first try and predict the genes in genes.gb.train ab initio.
augustus --species=bug genes.gb.test | tee firsttest.out # takes ~1m
This predicts the genes in all 100 sequences and will at the end print a report about the prediction accuracy, comparing the strucures in the input file genes.gb.test with the ones predicted. Of course, for the predictions only the sequences are used, not the input gene structures.

Look at the accuracy report at the end of firsttest.out:
grep -A 22 Evaluation firsttest.out
*******      Evaluation of gene prediction     *******

---------------------------------------------\
                 | sensitivity | specificity |
---------------------------------------------|
nucleotide level |       0.975 |        0.89 |
---------------------------------------------/

----------------------------------------------------------------------------------------------------------\
           |  #pred |  #anno |      |    FP = false pos. |    FN = false neg. |             |             |
           | total/ | total/ |   TP |--------------------|--------------------| sensitivity | specificity |
           | unique | unique |      | part | ovlp | wrng | part | ovlp | wrng |             |             |
----------------------------------------------------------------------------------------------------------|
           |        |        |      |                115 |                 76 |             |             |
exon level |    511 |    472 |  396 | ------------------ | ------------------ |       0.839 |       0.775 |
           |    511 |    472 |      |   40 |    5 |   70 |   43 |    3 |   30 |             |             |
----------------------------------------------------------------------------------------------------------/

----------------------------------------------------------------------------\
transcript | #pred | #anno |   TP |   FP |   FN | sensitivity | specificity |
----------------------------------------------------------------------------|
gene level |   118 |   100 |   53 |   65 |   47 |        0.53 |       0.449 |
----------------------------------------------------------------------------/
These numbers mean, for example, that

of the 100 genes 53 were predicted exactly
83.9% of the exons were predicted exactly
77.5% of the predicted exons were exactly as in the test set.

[+] Compare with the shipped fly parameters...

4. RUN THE SCRIPT optimize_augustus.pl

This script optimizes the prediction accuracy by adjusting the meta parameters in the *_parameters.cfg file. The script alternatingly used the programs augustus and etraining. This ususally increases prediction accuracy by a few percent points, but runs for hours or days. It may be skipped and only etraining be run once (step 3. above), which is very quick. augustus and etraining must be in the $PATH.

You need to tell optimize_augustus.pl, which metaparameters it should optimize. Do this by adjusting the file config/species/generic/generic_metapars.cfg. (You may also make a copy of it and then use the command line parameter --metapars=nameofmycopy to the script optimize_augustus.pl.)

Run

optimize_augustus.pl --species=bug genes.gb.train # takes ~1d

[+] What optimize_augustus.pl does...

After optimize_augustus.pl has finished or (after you have interrupted it) you should (re)train AUGUSTUS with the meta parameters it has set.

etraining --species=bug genes.gb.train

If you have a test set, you can now check the prediction accuracy on this test set by running

augustus --species=bug genes.gb.test

The end of the output will then contain a summary of the accuracy of the prediction. If the gene level sensitivity is below 20% it is likely that the training set is not large enough, that it doesn't have a good quality or that the species is somehow 'special'.
If you succeeded in creating a good AUGUSTUS version for your species I would be very interested in your results. If possible please share your results by giving me the packed config/yourspecies folder.

4. SPECIAL CASE: ORGANISM WITH DIFFERENT GENETIC CODE

AUGUSTUS can be told to use a different translation table, in particular one with a different set of stop codons. This is useful for a small number of species such as Tetrahymena thermophilia, in which some codons translate to a different amino acid than usual. If you train AUGUSTUS for such a species set the variable translation_table in the parameter file of your species. Further, adjust the stop codon probabilities in the same config file. E.g. say

translation_table 6
/Constant/amberprob 0 # Prob(stop codon = tag), if 0 tag is assumed to code for amino acid
/Constant/ochreprob 0 # Prob(stop codon = taa), if 0 taa is assumed to code for amino acid
/Constant/opalprob 1 # Prob(stop codon = tga), if 0 tga is assumed to code for amino acid

in the case of Tetrahymena, where taa and tag are coding for glutamine (Q).

Choose the translation table number according to this table. translation_table=1 is the default value and the standard with stop codons taa, tga, tag. If you have a species with the standard genetic code you don't have to do anything. In case your species' code is not covered by this table send us a note with the string of 64 one-letter amino acid codes in the codon order below.

translation  aaaaaaaaaaaaaaaa cccccccccccccccc gggggggggggggggg tttttttttttttttt
table aaaaccccggggtttt aaaaccccggggtttt aaaaccccggggtttt aaaaccccggggtttt
number acgtacgtacgtacgt acgtacgtacgtacgt acgtacgtacgtacgt acgtacgtacgtacgt
1KNKNTTTTRSRSIIMIQHQHPPPPRRRRLLLLEDEDAAAAGGGGVVVV*Y*YSSSS*CWCLFLF
2KNKNTTTT*S*SMIMIQHQHPPPPRRRRLLLLEDEDAAAAGGGGVVVV*Y*YSSSSWCWCLFLF
3KNKNTTTTRSRSMIMIQHQHPPPPRRRRTTTTEDEDAAAAGGGGVVVV*Y*YSSSSWCWCLFLF
4KNKNTTTTRSRSIIMIQHQHPPPPRRRRLLLLEDEDAAAAGGGGVVVV*Y*YSSSSWCWCLFLF
5KNKNTTTTSSSSMIMIQHQHPPP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