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

Update to NCBI Dataset v2 API #477

Closed
joverlee521 opened this issue Oct 2, 2024 · 2 comments · Fixed by #480
Closed

Update to NCBI Dataset v2 API #477

joverlee521 opened this issue Oct 2, 2024 · 2 comments · Fixed by #480
Assignees

Comments

@joverlee521
Copy link
Contributor

NCBI Datasets announced v1 API has been deprecated and will no longer be available December 2024.

We are still using the v1 API in fetch-from-biosample. This should get updated to use the v2 API:

curl -o biosample.zip -X GET "https://api.ncbi.nlm.nih.gov/datasets/v2alpha/virus/taxon/1335626/genome/download?aux_report=BIOSAMPLE_REPORT" -H "accept: application/zip"

Thanks to @olearyna for the heads up 🙏

@joverlee521 joverlee521 self-assigned this Oct 4, 2024
@joverlee521
Copy link
Contributor Author

Oh oops, copied the wrong taxon id in the URL, should be

https://api.ncbi.nlm.nih.gov/datasets/v2alpha/virus/taxon/2697049/genome/download?aux_report=BIOSAMPLE_REPORT

Noting v1 included ncbi_dataset/data/biosample.jsonl in the ZIP archive, while v2 includes ncbi_dataset/data/biosample_report.jsonl in the ZIP archive.

@joverlee521
Copy link
Contributor Author

Actually, since I'm updating the fetch-from-biosample, I might as well revisit #420.

joverlee521 added a commit that referenced this issue Oct 4, 2024
Originally I was going to update `fetch-from-biosample` to use the v2
NCBI Dataset API as described in #477.
However, I remembered #420
and realized that we can remove the script entirely if we just download
the BioSample report as part of the NCBI Dataset CLI command.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant