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

Bsweger/align with nextstrain #10

Merged
merged 6 commits into from
Aug 27, 2024
Merged

Conversation

bsweger
Copy link
Collaborator

@bsweger bsweger commented Aug 6, 2024

Resolves #8
Also addresses this security alert: https://github.com/reichlab/virus-clade-utils/security/dependabot/3

The issues linked above and the Individual commit messages have more detail.

This changeset replaces a Nextstrain API call (to get the COV-SARS-2
reference sequence and a tree) with a call to the datasets function
of the Nextclade CLI. The resulting download is a .zip file that
can be used as input to the Nextclade CLI's run function when
assigning sequences to clades.
When testing against larger volumes of data, polars returned a schema
error when reading the clade assignments file generated by nextclade run.
By default, polars only looks at the first 100 rows to infer a file schema;
using a larger number of rows reduces the liklihood that it will infer
incorrectly.

The other alternative is to provide polars with a specific schema
or column type, but doing that increases the change of something
breaking due to an upstream (i.e., Nextrain) change.
This patches a security alert related to Python's requests
library. This project is not affected, but no harm in staying
up to date.
@bsweger bsweger requested a review from elray1 August 6, 2024 19:36
Most of the columns in the final clade assignments file will not
be used by the variant nowcast hub. There's an open issue to
determine exactly what's needed
(#11),
but in the meantime, we'll make a reasonable guess.
@bsweger bsweger force-pushed the bsweger/align-with-nextstrain branch from e706f19 to 2b4c7b2 Compare August 7, 2024 21:09
Copy link
Collaborator

@elray1 elray1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this looks good to me!

I ran the unit tests like this:

elray@SPH-C02FV0TPMD6 virus-clade-utils % docker run --platform linux/amd64 -it --entrypoint bash virus-clade-utils
docker-user@ad30c4faea13:/opt$ pytest -k unit

Is that the recommended procedure?

@bsweger bsweger merged commit 91d8478 into main Aug 27, 2024
1 check passed
@bsweger bsweger deleted the bsweger/align-with-nextstrain branch August 28, 2024 21:17
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 this pull request may close these issues.

Update usage of Nextstrain tools based on latest information
2 participants