<p>When accessing all of the annotated genes for a reference genome, downloading a GFF3 file directly from the <a href="ftp://ftp.ncbi.nlm.nih.gov/genomes/genbank" rel="nofollow noreferrer">Genbank</a> or <a href="ftp://ftp.ncbi.nlm.nih.gov/genomes/refseq" rel="nofollow noreferrer">RefSeq</a> FTP sites is definitely the way to go.</p>

<p>But when submitting a search query into NCBI Entrez, there is no easy way to download the results in GFF3 format. Probably the best route is to download the results in ASN.1 format, and then use <code>annotwriter</code> from the NCBI C++ toolkit to convert to GFF3. But getting the latter to compile and run properly isn't trivial in my experience.</p>

CC BY-SA 3.0
2017-06-21T18:31:20.883Z
2017-06-21T18:31:20.883Z
Daniel Standage
<p>Turns out you can just grab the GFF3 from the NCBI's FTP site!</p>

<p><a href="ftp://ftp.ncbi.nlm.nih.gov/genomes/all/GCA/000/003/195/GCA_000003195.3_Sorghum_bicolor_NCBIv3/" rel="nofollow noreferrer">ftp://ftp.ncbi.nlm.nih.gov/genomes/all/GCA/000/003/195/GCA_000003195.3_Sorghum_bicolor_NCBIv3/</a></p>

<p>See:</p>

<ul>
<li><a href="https://www.ncbi.nlm.nih.gov/genome/doc/ftpfaq/#files" rel="nofollow noreferrer">https://www.ncbi.nlm.nih.gov/genome/doc/ftpfaq/#files</a></li>
</ul>

<p>Or "Access the data" on the right here:</p>

<ul>
<li><a href="https://www.ncbi.nlm.nih.gov/assembly/GCF_000003195.3" rel="nofollow noreferrer">https://www.ncbi.nlm.nih.gov/assembly/GCF_000003195.3</a></li>
</ul>

CC BY-SA 3.0
2017-06-21T15:41:16.197Z
That's useful, but it isn't actually answering the question you asked. Could you please either change the question so it is asking where you can get the data (instead of how to convert GenBank/anything to GFF) or delete either your answer or the question? I know this is kind of weird, but these are strictly Q&A sites, so answers should be answering the question asked.
terdon
CC BY-SA 3.0
2017-06-21T13:27:37.420Z
2017-06-21T13:27:37.420Z
Dan
<p><em>This question has also been asked on <a href="https://www.biostars.org/p/258878" rel="nofollow noreferrer">BioStars</a></em></p>

<p>If I look at this record in GenBank I see about 6k genes:
<a href="https://www.ncbi.nlm.nih.gov/nuccore/CM000760?report=gbwithparts" rel="nofollow noreferrer">https://www.ncbi.nlm.nih.gov/nuccore/CM000760?report=gbwithparts</a></p>

<p>I'd really like to be able to dump those genes in GFF3 format, but I'm guessing I can't do that in a single step, so...</p>

<ol>
<li>How to dump all genes from a GenBank record in 'whatever' format?</li>
<li>How to convert 'whatever' format to GFF3?</li>
</ol>

<gff3><data-download>
How to dump genes from GenBank in GFF3 format?
# How to dump genes from GenBank in GFF3 format?

(Asked by: username_0 on 2017-06-21)

*This question has also been asked on [BioStars](https://www.biostars.org/p/258878)*

If I look at this record in GenBank I see about 6k genes:
<https://www.ncbi.nlm.nih.gov/nuccore/CM000760?report=gbwithparts>

I'd really like to be able to dump those genes in GFF3 format, but I'm guessing I can't do that in a single step, so...

1. How to dump all genes from a GenBank record in 'whatever' format?
2. How to convert 'whatever' format to GFF3?

**Tags:** gff3, data-download

---

## 2 answers

### Answer by username_0 on 2017-06-21. Score: 3 | Accepted answer

Turns out you can just grab the GFF3 from the NCBI's FTP site!

<ftp://ftp.ncbi.nlm.nih.gov/genomes/all/GCA/000/003/195/GCA_000003195.3_Sorghum_bicolor_NCBIv3/>

See:

* <https://www.ncbi.nlm.nih.gov/genome/doc/ftpfaq/#files>

Or "Access the data" on the right here:

* <https://www.ncbi.nlm.nih.gov/assembly/GCF_000003195.3>

> **Comments:**
> **username_2**: That's useful, but it isn't actually answering the question you asked. Could you please either change the question so it is asking where you can get the data (instead of how to convert GenBank/anything to GFF) or delete either your answer or the question? I know this is kind of weird, but these are strictly Q&A sites, so answers should be answering the question asked.  

---

### Answer by username_1 on 2017-06-21. Score: 1

When accessing all of the annotated genes for a reference genome, downloading a GFF3 file directly from the [Genbank](ftp://ftp.ncbi.nlm.nih.gov/genomes/genbank) or [RefSeq](ftp://ftp.ncbi.nlm.nih.gov/genomes/refseq) FTP sites is definitely the way to go.

But when submitting a search query into NCBI Entrez, there is no easy way to download the results in GFF3 format. Probably the best route is to download the results in ASN.1 format, and then use `annotwriter` from the NCBI C++ toolkit to convert to GFF3. But getting the latter to compile and run properly isn't trivial in my experience.


---

