text: user3816: Is there a way to import a GFF file for an organism with Biopython in the same way you can for a Genbank file?
  For example,
  from Bio import Entrez as ez
  ez.email = '...'
  handle = ez.efetch(db='gene', id='AE015451.2', rettype='genbank', retmode='xml')
  h = handle.read()
  print(h)
  
  This will import a Gebank xml file for Pseudomonas putida.  Is there a way to do this for a GFF file?
  
  user96: Most GFF parsers handle the work of reading annotation data into objects for convenient data access, but most do not handle the important task of resolving relationships between features. The tag Python library does both, grouping related features together for inspection, traversal, and feature-by-feature processing.
  CAVEAT: The tag library only supports GFF3.
  DISCLAIMER: I'm the developer of the tag library, so this is a shameless plug. :-)
  
  user929: I would use BCBio for gff handling as it is written to directly interface with BioPython’s object model.
  The only downside is that I believe it is no longer actively supported. It is however the package that the BioPython docs use generally. There are plans to properly incorporate GFF/GTF parsers in to BP in the not too distant future according to that link though.
  
  user2085: No, there is currently no GFF support in biopython. 
  However, you can read in GFF files into python using this package, gffutils. There are also a few other packages to read/write GFF files, like gff3.
  
original_text: 3816: <p>Is there a way to import a GFF file for an organism with Biopython in the same way you can for a Genbank file?</p>
  
  <p>For example,</p>
  
  <pre><code>from Bio import Entrez as ez
  ez.email = '...'
  handle = ez.efetch(db='gene', id='AE015451.2', rettype='genbank', retmode='xml')
  h = handle.read()
  print(h)
  </code></pre>
  
  <p>This will import a Gebank xml file for Pseudomonas putida.  Is there a way to do this for a GFF file?</p>
   96: <p>Most GFF parsers handle the work of reading annotation data into objects for convenient data access, but most do not handle the important task of resolving relationships between features. The <a href="https://tag.readthedocs.io/en/stable/" rel="nofollow noreferrer"><strong>tag</strong> Python library</a> does both, grouping related features together for inspection, traversal, and feature-by-feature processing.</p>
  
  <p><strong>CAVEAT</strong>: The tag library only supports GFF3.</p>
  
  <p><strong>DISCLAIMER</strong>: I'm the developer of the tag library, so this is a shameless plug. :-)</p>
   929: <p>I would use <code>BCBio</code> for gff handling as it is written to directly interface with BioPython’s object model.</p>
  
  <p>The only downside is that I believe it is no longer actively supported. It is however the package that the <a href="https://biopython.org/wiki/GFF_Parsing" rel="nofollow noreferrer">BioPython docs</a> use generally. There are plans to properly incorporate GFF/GTF parsers in to BP in the not too distant future according to that link though.</p>
   2085: <p>No, <a href="https://biopython.org/wiki/GFF_Parsing" rel="noreferrer">there is currently no GFF support in biopython</a>. </p>
  
  <p><a href="https://github.com/daler/gffutils" rel="noreferrer">However, you can read in GFF files into python using this package, gffutils</a>. There are also a few other packages to read/write GFF files, like <a href="https://pypi.org/project/gff3/" rel="noreferrer"><code>gff3</code></a>.</p>
  