There's more...

There are many variations of the GFF/GTF format. There are different GFF versions and many unofficial variations. If possible, choose the GFF Version 3. However, the ugly truth is that you will find it very difficult to process files. The gffutils library tries as best as it can to accommodate this. Indeed, much of the documentation of this library is concerned with helping you process all kinds of awkward variations (refer to https://pythonhosted.org/gffutils/examples.html).

There is an alternative to using gffutils (either because your GFF file is strange or because you do not like the library interface, or its dependency on a SQL backend). Parse the file yourself manually. If you look at the format, you will notice that ...

Get Bioinformatics with Python Cookbook - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.