kblin / ncbi-acc-download

Download files from NCBI Entrez by accession
Apache License 2.0
111 stars 8 forks source link

Download a GFF file [feature request] #4

Closed sjackman closed 6 years ago

sjackman commented 6 years ago

Is it possible to download a GFF file?

kblin commented 6 years ago

No, the Entrez API only gives a selected number of formats. For all I can see, GFF isn't one of them,

sjackman commented 6 years ago

Look what I just found! https://www.biostars.org/p/296825/ https://www.ncbi.nlm.nih.gov/sviewer/viewer.cgi?db=nuccore&report=gff3&id=NC_005278.1 I'm suddenly very happy!

sjackman commented 6 years ago

Other useful types… fasta FASTA fasta_cds_aa FASTA of CDS Products fasta_cds_na FASTA of Coding Regions ft Feature Table gb GenBank Flatfile See https://www.ncbi.nlm.nih.gov/books/NBK179288/

Could you please add ft (Feature table) and gff3?

kblin commented 6 years ago

I was going off the formats documented in https://www.ncbi.nlm.nih.gov/books/NBK25499/table/chapter4.T._valid_values_of__retmode_and/?report=objectonly :smile:

ft is easy to add.

gff3 I'm a bit weary about because that changes URL, parameters and a lot of other internals, as well as not being an officially supported API.

sjackman commented 6 years ago

gff3 is so useful! It's the only format that IGV can read. Hopefully NCBI add it to their standard API. Thanks for adding ft.

kblin commented 6 years ago

Support for both formats has been added in version 0.2.0

sjackman commented 6 years ago

Thanks, Kai!