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

Issue with recursive download #13

Open
Anto007 opened this issue Sep 15, 2019 · 15 comments
Open

Issue with recursive download #13

Anto007 opened this issue Sep 15, 2019 · 15 comments
Assignees

Comments

@Anto007
Copy link

Anto007 commented Sep 15, 2019

I tried ncbi-acc-download --recursive GHGH00000000.1 and I got the below error message. Any help here would be very much appreciated.

Traceback (most recent call last):
File "/home/user/tools/Python-3.6.2/virtualenv3/bin/ncbi-acc-download", line 10, in
sys.exit(main())
File "/home/user/tools/Python-3.6.2/virtualenv3/lib/python3.6/site-packages/ncbi_acc_download/main.py", line 54, in main
download_to_file(dl_id, config, filename, append)
File "/home/user/tools/Python-3.6.2/virtualenv3/lib/python3.6/site-packages/ncbi_acc_download/core.py", line 118, in download_to_file
_validate_and_write(r, fh, dl_id, config)
File "/home/user/tools/Python-3.6.2/virtualenv3/lib/python3.6/site-packages/ncbi_acc_download/core.py", line 162, in _validate_and_write
downloaded = download_wgs_parts(handle, config)
File "/home/user/tools/Python-3.6.2/virtualenv3/lib/python3.6/site-packages/ncbi_acc_download/wgs.py", line 107, in download_wgs_parts
records = list(SeqIO.parse(handle, config.format))
File "/home/user/tools/Python-3.6.2/virtualenv3/lib/python3.6/site-packages/Bio/SeqIO/init.py", line 655, in parse
for r in i:
File "/home/user/tools/Python-3.6.2/virtualenv3/lib/python3.6/site-packages/Bio/GenBank/Scanner.py", line 489, in parse_records
record = self.parse(handle, do_features)
File "/home/user/tools/Python-3.6.2/virtualenv3/lib/python3.6/site-packages/Bio/GenBank/Scanner.py", line 473, in parse
if self.feed(handle, consumer, do_features):
File "/home/user/tools/Python-3.6.2/virtualenv3/lib/python3.6/site-packages/Bio/GenBank/Scanner.py", line 445, in feed
self._feed_feature_table(consumer, self.parse_features(skip=False))
File "/home/user/tools/Python-3.6.2/virtualenv3/lib/python3.6/site-packages/Bio/GenBank/Scanner.py", line 171, in parse_features
raise ValueError("Premature end of features table, marker '//' found")
ValueError: Premature end of features table, marker '//' found

@kblin kblin self-assigned this Sep 16, 2019
@kblin
Copy link
Owner

kblin commented Sep 16, 2019

This is a record type I've never seen before, and it looks like Biopython doesn't like it. I'll open a bug report with Biopython to get it fixed, and then I can make sure ncbi-acc-download supports it.

@Anto007
Copy link
Author

Anto007 commented Sep 16, 2019

Thank you so much for your quick response. Any possible help in this regard would really make my day

@kblin
Copy link
Owner

kblin commented Sep 16, 2019

I've opened a Biopython bug biopython/biopython#2268, let's see what they think about this.

@Anto007
Copy link
Author

Anto007 commented Sep 16, 2019

Thanks; fingers crossed! Also, how to get the fasta file for this record on recursive mode? For example, I tried the below and I get an empty fasta file:

ncbi-acc-download --recursive NZ_AQZU00000000.1 --format fasta

ncbi-acc-download --recursive NZ_AQZU00000000.1 does appear to give me the correct .gbk file

@kblin
Copy link
Owner

kblin commented Sep 16, 2019

Hm, I think I've never tried this for FASTA files. I don't think it'll work out of the box.

@Anto007
Copy link
Author

Anto007 commented Sep 16, 2019

Thanks again for your super-quick responses. I think I can live with .gbk files for now :-)

@Anto007
Copy link
Author

Anto007 commented Sep 26, 2019

Hi, I was wondering if you have managed to find any sort of fix for "ncbi-acc-download --recursive GHGH00000000.1"? My intention is certainly not to push you here but I would be very grateful for any new pointers.

@kblin
Copy link
Owner

kblin commented Sep 29, 2019

This will only be fixed once Biopython 1.75 is released, as that contains a fix for the problem.

@Anto007
Copy link
Author

Anto007 commented Sep 30, 2019

Many thanks for your response. I will await the release of Biopython 1.75.

@kblin
Copy link
Owner

kblin commented Dec 23, 2019

End of year cleaning of old issues. This one should be fixed by current Biopython versions.
Use pip install --upgrade biopython in the same virtualenv you installed ncbi-acc-download into, and you should be good to go.
Please don't hesitate to comment if the issue still exists after upgrading Biopython.

@kblin kblin closed this as completed Dec 23, 2019
@Anto007
Copy link
Author

Anto007 commented Dec 24, 2019

Thank you so much for remembering to follow up with this- much appreciated! I would like to report that although there are no error messages being output now after the biopython upgrade, the command ncbi-acc-download --recursive GHGH00000000.1 merely downloads the master record gbk file and not all of the records that are covered by the master record. Unfortunately, the purpose of having 'recursive' doesn't seem to be served here.

@kblin kblin reopened this Dec 24, 2019
@kblin
Copy link
Owner

kblin commented Dec 24, 2019

Thanks for testing. I'll have a look at this.

@kblin
Copy link
Owner

kblin commented Dec 24, 2019

Ah, shoot, it looks like there's still an issue in the Biopython support for this. 😞 We need biopython/biopython#2432 to land and be shipped first. And I think I still need a change in ncbi-acc-download as well.

kblin added a commit that referenced this issue Jan 1, 2020
This feature will only work with the current Biopython master branch.
Once Biopython 1.77 is released, this feature should work for regular installs.

Fixes issue #13.

Signed-off-by: Kai Blin <[email protected]>
@kblin
Copy link
Owner

kblin commented Jan 2, 2020

Ok, another try. Once Biopython releases 1.77, 789a34b should have fixed it. Install the 0.2.6 version of ncbi-acc-download I just to get the fix.

@Anto007
Copy link
Author

Anto007 commented Jan 2, 2020

Many thanks for the update; once biopython 1.77 is out, I'll give a try with ncbi-acc-download v0.2.6

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