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

Allow users to specify a titer attribute prefix #1106

Merged
merged 4 commits into from
Dec 19, 2022

Conversation

huddlej
Copy link
Contributor

@huddlej huddlej commented Dec 7, 2022

Description of proposed changes

Allows users to prefix the node data JSON attributes produced by augur titers subcommands (e.g., cTiter, dTiter, etc.) with a custom string. This change allows users to run multiple titer models for a single build and collect their results into an Auspice JSON without collisions in the node data attribute namespace.

Testing

  • Add functional tests
  • Confirm tests pass through CI

Checklist

  • Add a message in CHANGES.md summarizing the changes in this PR that are end user focused. Keep headers and formatting consistent with the rest of the file.

@codecov
Copy link

codecov bot commented Dec 7, 2022

Codecov Report

Base: 63.38% // Head: 67.97% // Increases project coverage by +4.58% 🎉

Coverage data is based on head (7422a54) compared to base (42335a7).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1106      +/-   ##
==========================================
+ Coverage   63.38%   67.97%   +4.58%     
==========================================
  Files          57       57              
  Lines        6639     6641       +2     
  Branches     1632     1632              
==========================================
+ Hits         4208     4514     +306     
+ Misses       2147     1823     -324     
- Partials      284      304      +20     
Impacted Files Coverage Δ
augur/__version__.py 100.00% <100.00%> (ø)
augur/titers.py 79.16% <100.00%> (+34.88%) ⬆️
augur/reconstruct_sequences.py 38.33% <0.00%> (+8.33%) ⬆️
augur/titer_model.py 69.87% <0.00%> (+49.90%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@huddlej huddlej force-pushed the allow-titer-attribute-prefix branch from e6f431a to 4e486a7 Compare December 7, 2022 20:06
@huddlej huddlej requested a review from rneher December 7, 2022 20:27
@huddlej huddlej marked this pull request as ready for review December 7, 2022 20:27
Copy link
Member

@tsibley tsibley left a comment

Choose a reason for hiding this comment

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

This LGTM by inspection.

One non-blocking comment, which can be resolved later:

Allows users to prefix the node data JSON attributes produced by augur titers subcommands (e.g., cTiter, dTiter, etc.) with a custom string.

I went to look at the augur titers doc to see the full list of output fields, but didn't find it. If we don't have this documented elsewhere, it would be good to add it to the augur titers {tree,sub} --help output. If we do doc it elsewhere, then good to link out to it.

@tsibley
Copy link
Member

tsibley commented Dec 19, 2022

Separately, it would also be nice to add a JSON schema, e.g. augur/data/schema-titers.json or similar, for the intermediate node JSONs produced by augur titers {tree,sub}.

@huddlej
Copy link
Contributor Author

huddlej commented Dec 19, 2022

Thank you, @tsibley! In addition to the JSON schema, we also need to expand the content of that titer docs page.

Allows users to prefix the node data JSON attributes produced by `augur
titers` subcommands (e.g., `cTiter`, `dTiter`, etc.) with a custom
string. This change allows users to run multiple titer models for a
single build and collect their results into an Auspice JSON without
collisions in the node data attribute namespace.
Adds test data based on public titer data and sequences from the
measurements panel paper [1] and adds functional tests for basic titer
model commands and the new commands with attribute prefixes.

[1] https://github.com/blab/measurements-panel/tree/main/data
Documents the specific attributes that get the custom prefix in titer
model node data JSON outputs and clarifies the use case for the
attribute prefix argument.
@huddlej huddlej merged commit cb0c2ab into master Dec 19, 2022
@huddlej huddlej deleted the allow-titer-attribute-prefix branch December 19, 2022 19:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

2 participants