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

CHARSTATELABELS block? #41

Closed
rbturnbull opened this issue Sep 17, 2022 · 4 comments
Closed

CHARSTATELABELS block? #41

rbturnbull opened this issue Sep 17, 2022 · 4 comments
Assignees

Comments

@rbturnbull
Copy link
Collaborator

I think some phylogenetics programs need the CHARSTATELABELS block filled out. (I thought BEAUTi needed it for example). Is it possible to include it. I've got an example here: https://github.com/rbturnbull/phylopaul/blob/main/1Corinthians/1Corinthians.nexus
I was lazy with that example and I just called the readings/states State0 or State1. It might be good to slugify the readings and have them in the states. I also include the site/character label in as a comment in square brackets. There should be a command line option to not have the CHARSTATELABELS block if the user doesn't want it. What do you think?

@jjmccollum
Copy link
Owner

This sounds good. The NEXUS paper actually recommends using CHARSTATELABELS in place of CHARLABELS (which we currently use) and STATELABELS (which we don't), so I can work on that. I'll have to add some attributes to the Collation class for storing and mapping these properly. And yeah, we can include a --labels command-line option (or, more appropriately, a --no-labels option if labels are included by default).

@rbturnbull
Copy link
Collaborator Author

awesome. It might be good to use a library like one of these to slugify the readings:

@jjmccollum
Copy link
Owner

jjmccollum commented Sep 17, 2022

Will we need to change the unicode characters to ASCII if we're placing them in a NEXUS file?

jjmccollum added a commit that referenced this issue Sep 17, 2022
…); modified iqtree.yaml system test (#38); reduced ubs_ephesians.xml and added UBS root witness (#39, #40); reduced NEXUS symbol set, simplified handling of ambiguous characters in NEXUS, and added support for --ambiguous-as-missing input option to facilitate conversions to IQTREE (#4)
@jjmccollum
Copy link
Owner

Okay, I've added support for this in the latest push to the cicd branch. I went with python-slugify for serializing the state labels. I'll plan to merge everything back into main once we have the other system tests incorporated into the CI pipeline.

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

No branches or pull requests

2 participants