Processing exceptions

For .gff files that lack consistent sets of attributes, or that contain distinct classes of gene, it is often not possible to find a way to map feature attributes to [_STABLE_IDS], [_NAMES] and [_DESCRIPTIONS] that can be applied to all genes and transcripts in the file. Features for which a gene or transcript stable_id could not be set using the given .ini file are written to a new file with the suffix .exception.gff during Step 2.3: Prepare the gff file for import.

This file can then be processed in a second run of Step 2.3 by passing two .ini files to the script. The original .ini can remain unchanged and settings to be altered can be included in the second file.

  • part of example.ini
...
[FILES]
  SCAFFOLD = [ fa scaffold.fa ]
  GFF = [ gff original.gff ]
[GENE_STABLE_IDS]
  GFF = [ gene->Name /(.+)/ ]
...
  • exception.ini
[FILES]
  GFF = [ gff original.gff.exception.gff ]
[GENE_STABLE_IDS]
  GFF = [ gene->ID /(.+)/ ]
perl ../ei/core/prepare_gff.pl ../ei/conf/example.ini /path/to/exception.ini

Exceptions are not bad, they simply reflect the heterogeneity of data in some .gff files. In some cases by deliberately choosing settings that will generate exceptions it is possible to extract more data from the files than would otherwise be possible. In the example above, all genes will have ID attributes, however the NAME attribute is likely to be more suitable for use as a stable_id. It is also likely that additional attributes will be available for features with Names that could be used to set gene/transcript [_NAMES] and [_DESCRIPTIONS].