BrendelGroup/AEGeAn — pull request #11 by standage (2014-01-25 21:19:53+00:00)
Title: Added check-gff3 script

We're dealing with different issues in the different data sets right now, and I think it would help at this point to step back and evaluate comprehensively the data issues we're facing. The script I've just added is intended to be run like so.

```
cat /path/to/data/*.gff3 /path/to/other/data/*.gff3 | data/scripts/check-gff3
```

The script generates a report that includes all the feature types and parent/child relationships observed in the data. Here is what I got running on our current data.

```
$ cat /DATA/GROUP/standage/Hym-iLoci-2014-01-25/*.toplevel.gff3 \
/DATA/GROUP/jfdenton/ILOCI/gff3/annotwritten/solenopsis.gff3 \
/DATA/GROUP/jfdenton/ILOCI/gff3/annotwritten/harpegnathos.gff3 | \
~/Software/AEGeAn/data/scripts/check-gff3 2> ~/Software/AEGeAn/warnings

===== Types =====
CDS
exon
gene
mRNA
match
ncRNA
primary_transcript
rRNA
region
tRNA
transcript

===== Relationships (child --> parent) =====
CDS --> gene
CDS --> mRNA
exon --> gene
exon --> mRNA
exon --> ncRNA
exon --> primary_transcript
exon --> rRNA
exon --> tRNA
exon --> transcript
mRNA --> gene
ncRNA --> gene
primary_transcript --> gene
tRNA --> gene
transcript --> gene
```

A couple of things to note.

* Note the ``exon --> gene`` relationship. We need to check up on cases in which an exon feature is a direct child of a gene. We would typically expect the exon to be the child of an mRNA or other transcript type. If this is a pseudogene, it should be ignored. Indeed, the stderr output (not shown here) also includes thousands of warnings of potential pseudogenes.
* Note the absence of the ``rRNA --> gene`` relationship. rRNA features were clearly found in the data, but nowhere do they appear as children of gene features. We should look into this as well.
* The ``CDS --> gene`` relationship is also troubling. Under what circumstances is a CDS a direct child of a gene, and not an mRNA?

Anyway, now that all feature types and parent/child relationships have been enumerated, we should be able to take the next step to automatically check for invalid relationships. I suggest that any data we intend to analyze should be checked both pre- and post-processing with scripts like this.