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

HaploStats doesn't report correct low frequency haplotypes #38

Closed
sjmack opened this issue Aug 22, 2017 · 8 comments · Fixed by #61
Closed

HaploStats doesn't report correct low frequency haplotypes #38

sjmack opened this issue Aug 22, 2017 · 8 comments · Fixed by #61
Labels
bug Something isn't working, should not be used for new features: use "enhancement" for those

Comments

@sjmack
Copy link
Collaborator

sjmack commented Aug 22, 2017

See my final comment in Issue #28.

<haplostats> is reporting converged haplotype frequency estimates differently from <emhaplofreq>, is not reporting haplotype counts, and is truncating frequencies that were returned in scientific E-notation to eliminate the exponent.

@sjmack sjmack added the bug Something isn't working, should not be used for new features: use "enhancement" for those label Aug 22, 2017
@alexlancaster
Copy link
Owner

see fuller description of issue here: #60 (comment) and proposed solution here: #60 (comment)

@alexlancaster
Copy link
Owner

alexlancaster commented May 23, 2023

@sjmack looking at this issue, it seems that the low frequency truncation applies to both emhaplofreq and haplostats and is actually separate to the lack of counts (which is haplostats-specific). I would open up another issue for the numbers of copies.

quick review of the code suggests it was disabled in the XML output pending a check of the numbers, there's a FIXME:

https://github.com/alexlancaster/pypop/blob/main/src/PyPop/Haplo.py#L1013

@alexlancaster
Copy link
Owner

@sjmack When you open up a new issue, I'd remove the comment in the code and re-run, and check to see if the copies are calculated correctly. if so, we can probably uncomment and add it. We should also unit tests for haplo-stats, so a self-contained .ini and .pop that I can use for that purpoes, would be really helpful.

@alexlancaster alexlancaster linked a pull request May 24, 2023 that will close this issue
@alexlancaster
Copy link
Owner

@sjmack I made a branch to test this fix. in your local git clone you can pull it and rebuild to test it on your data:

git pull
git checkout 38-problem-with-haplostats-implementation

if it works for you an passes all the unit tests I'll merge it with main.

@alexlancaster
Copy link
Owner

@sjmack check out the pull request #61 (see above for instructions forbuidling and give me an 👍 or 👎 )

as I mentioned on the pull request it would be good to be able get a unit test to go along with this, if possible.

@alexlancaster
Copy link
Owner

splitting off the count issue as a new issue in #65 and retitling this issue

@alexlancaster alexlancaster changed the title Problem with HaploStats implementation HaploStats doesn't report correct low frequency haplotypes Jun 5, 2023
@sjmack
Copy link
Collaborator Author

sjmack commented Jun 5, 2023

@alexlancaster I will try to get to this later this week. Sorry for the delay.

@alexlancaster
Copy link
Owner

@sjmack opened up a new issue #104 for preserving scientific notation when truncating.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working, should not be used for new features: use "enhancement" for those
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants