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

Add a new option --chronumental_add_inferred_date #608

Merged
merged 2 commits into from
Sep 25, 2024

Conversation

AngieHinrichs
Copy link
Contributor

This adds the new option --chronumental_add_inferred_date <column_name> that I suggested in #607. Feel free to bounce it back if there is anything big or small that you'd like me to change / rename / reword / etc.

An example usage is

usher_to_taxonium -i my_tree.pb -m my_tree.metadata.tsv -o my_tree.jsonl.gz \
    --chronumental --chronumental_steps 300 \
    --chronumental_add_inferred_date chronumental_date

After running chronumental, it reads the date output file(*) and adds a new metadata 'column' (in this example, chronumental_date) whose value for each node is the date inferred by chronumental for that node. When viewing the resulting my_tree.jsonl.gz in taxonium, the inferred date is displayed for each node when hovering over or clicking on the node, appearing as an extra metadata item. When the node is clicked on, the label for the inferred date is "Chronumental date" in this example (derived the usual way from chronumental_date).

(*) The date output file is either the filename specified with --chronumental_date_output if given, or the default name which currently is derived from the metadata file name (chronumental_dates_metadata_file.tsv). If --chronumental_date_output is not given and the expected metadata-derived date output file does not exist, then it quits with a suggestion to add --chronumental_date_output.

I have tested it with and without --chronumental_date_output and with a relative and absolute path for the metadata file from which the default date output file name is derived, and it seems to work.

Thanks as always for taxonium, don't know what I'd do without it! 🙂

… of a new metadata 'column' for date inferred by Chronumental. refs theosanderson#607
Copy link

vercel bot commented Sep 24, 2024

@AngieHinrichs is attempting to deploy a commit to the theosanderson's projects Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Owner

@theosanderson theosanderson left a comment

Choose a reason for hiding this comment

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

Thank you for an amazing PR. This looks fantastic. Huge thanks for taking it on. There's one inconsequential typo, which I guess we might as well fix.

Thanks so much again

taxoniumtools/src/taxoniumtools/utils.py Outdated Show resolved Hide resolved
@theosanderson
Copy link
Owner

@allcontributors if you're still active please add @AngieHinrichs for code

Copy link
Contributor

@theosanderson

I've put up a pull request to add @AngieHinrichs! 🎉

@theosanderson theosanderson merged commit af0bcc9 into theosanderson:master Sep 25, 2024
2 of 8 checks passed
@AngieHinrichs
Copy link
Contributor Author

lococation

Ha! It's, uh, a California thing, yeah. 😆 Thanks Theo!

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.

2 participants