Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

running with --format fasta creates an empty fa file #21

Open
orenmn opened this issue Nov 8, 2020 · 2 comments
Open

running with --format fasta creates an empty fa file #21

orenmn opened this issue Nov 8, 2020 · 2 comments

Comments

@orenmn
Copy link

orenmn commented Nov 8, 2020

(This was already mentioned in #13 (comment), but I think it is better to have a separate issue.)

ncbi-acc-download --format fasta --recursive --verbose AAXATB000000000.1 creates an empty fasta file, while
ncbi-acc-download --format genbank --recursive --verbose AAXATB000000000.1 creates a genbank file as expected.

The same thing happened when I tried on ACIN00000000.3.

@orenmn
Copy link
Author

orenmn commented Nov 8, 2020

IIUC, an easy fix is to implement --format fasta by using --format genbank (the default) and then using SeqIO.convert (from Biopython), e.g.:
SeqIO.convert('AAXATB000000000.1.gbk', 'genbank', 'AAXATB000000000.1.gbk.fasta', 'fasta')

@kblin
Copy link
Owner

kblin commented Nov 8, 2020

The NCBI Entrez API does deliver FASTA files, just not if you query for WGS master entries.
I don't really want to depend on Biopython for all of ncbi-genome-download, but arguably we could go that path if --recursive is specified, as we depend on Biopython for --recursive anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants