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

Trailing underscores '_' stripped from sample names in LinkNode #42

Open
isaacovercast opened this issue Jan 13, 2021 · 2 comments
Open
Labels

Comments

@isaacovercast
Copy link

I discovered this while testing the common_ancestor function (thanks for that, btw). If I do something like this (where names is a list of sample names):

lfs = [x for x in getleaves(tre) if x.name in names]
print(lfs)

I get this:

[LinkNode Saxicola_tectes_REUNION_EU190909, a tip of the tree with an incoming connection (branch 45).
, LinkNode Saxicola_tectes_REUNION_EU190910, a tip of the tree with an incoming connection (branch 46).
, LinkNode Saxicola_tectes_REUNION_EU190911, a tip of the tree with an incoming connection (branch 47).
, LinkNode Saxicola_tectes_REUNION_EU190912, a tip of the tree with an incoming connection (branch 48).
]

However, the sample names in the nexus file are:

Saxicola_tectes_REUNION_EU190909
Saxicola_tectes_REUNION_EU190910
Saxicola_tectes_REUNION_EU190911
Saxicola_tectes_REUNION_EU190912_

so somewhere that trailing underscore is getting stripped. Not sure if this is a feature or a bug, but thought it worth reporting.

@richardreeve
Copy link
Member

That really is weird. I can't imagine how that's something the parser thinks is sensible. I'm going to have to play around with the parser a bit and see what I can do with it, but this is peak teaching season for me at the moment, so it may be a few weeks I'm afraid...

@richardreeve
Copy link
Member

@isaacovercast - sorry it has been so long, but I've been working on the parser recently and I can't see why the changes I've made so far would have fixed this, but I can't reproduce it - could you provide me with the file you found the problem with?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants