Handle 404 NOT FOUND error for download_and_extract_antismash_data#160
Handle 404 NOT FOUND error for download_and_extract_antismash_data#160
download_and_extract_antismash_data#160Conversation
…y extracted folder if url does not exist
… string to bgc_path
Yes please! |
Co-authored-by: Cunliang Geng <c.geng@esciencecenter.nl>
… non existing and broken ids
|
See my updated comment above @CunliangGeng |
CunliangGeng
left a comment
There was a problem hiding this comment.
I guess we need to define what "non-existent ID" is.
For the function download_and_extract_antismash_data, the non-existent ID (fake ID, not exist in NCBI) or broken ID (not exist in antismash database) are actually the same thing, both will trigger a 404 error. It'd be easier to treat them as the same case I guess.
|
the |
you can change |
CunliangGeng
left a comment
There was a problem hiding this comment.
The mypy issues should be fixed in my suggested changes. Apply them, then you can merge this PR 🎉
Co-authored-by: Cunliang Geng <c.geng@esciencecenter.nl>
Co-authored-by: Cunliang Geng <c.geng@esciencecenter.nl>
Co-authored-by: Cunliang Geng <c.geng@esciencecenter.nl>
Co-authored-by: Cunliang Geng <c.geng@esciencecenter.nl>
With this PR:
genome_status.jsonfile now contains an empty string value for the keybgc_pathin the cases in which no zip folder has been downloaded and no folder has been extracted.download_and_extract_antismash_datadoes not create an empty folder when the id does not exist in NCBI and when the id does exist there but not in the antismash database (404 error).podp_download_and_extract_antismash_datadoes not create an empty folder when the id does not exist in NCBI and when the id does exist there but not in the antismash database (404 error); they also check for the correctness of the genome status file.In conclusion, we were already handling cases in which the genome id was non-existing, but we weren't handling cases in which the genome id was existing in NCBI but not in the antismash database. Now we handle both cases.
Notes for @CunliangGeng:
os.scandir, but I didn't find how to solve it: