-
Notifications
You must be signed in to change notification settings - Fork 14
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
Problem with the reporting of very low haplotype frequencies in *-out.txt files #60
Comments
Hey Steve, thanks for the report (I didn't see an old github issue - either open or closed - about this, can you point the specific one?). What version are you currently using? Are you building the pre-release v1.0.0 out of github, or are these old 0.7.0 binaries? Can you add a complete Also a minimal |
I see what the issue is. As you noticed the XSLT just truncates the display, losing the scientific notation part. This does raise the issue of how we handle the text output in a uniform way. While the problem is easy to state, the solution is a bit more subtle. The quick fix is that I can use the The better solution would be to come up with a heuristic like:
This is theoretically possible, but XSLT 1.0 doesn't have good support for scientific notation - there isn't a built-in function that can take a number in scientific notation and only show a specified number of significant figures - so it would probably mean custom function which might take a while to write. Would the quick fix be sufficient for the time being? So at least the |
Hi Alex. I'm glad to see you found the original issue. I'm using the most recent version of PyPop (at least as of a month ago) available on this repo. The most expedient solution would be to effectively round things to 0 as you suggest, for the reasons you suggest. A useful alternative would be, again as you suggested, to round to sufficient digits to allow the exponent to be included in the string. So 1.4450935155304534e-05 would be reported as 1.445e-05 in the .txt output. For now, I suppose the quick fix is the easiest one, but since today is the 2100th day since the issue was originally reported, perhaps taking a little more time to address it is okay. :D |
Actually I didn't find an original report on the issue tracker (unless it was buried in an unrelated bug report, or if it was reported by email). Do you have a ticket number?
So you compiled ok from source? since no official binaries have been released yet.
I'll implement this one for the time being - it will probably also require updating all the unit tests that generate haplotypes, since it will mean all output will be rounded rather than truncated.
I'll open up another bug as an enhancement for that part, after I close this one.
|
it is #38 "Problem with Haplostats Implementation". I wasn't as detailed in my original description, I suppose.
I followed the instructions and everything worked fine. I do have to leave an obnoxiously-named file in my PyPop directory to remind myself activate the conda environment if I have restarted my machine since the last time I used pypop. I only had to bang my head on rock for 20 minutes one time before doing that.
That is probably fine. In the future though, it would be nice to be able to set an output parameter to specify if the user wanted the output rounded or to have epsilon-like frequencies automatically set to 0.
Thanks! Perhaps you could also include setting a frequency-reporting parameter as an enhancement. |
I'm marking this one as a duplicate of the earlier one. We can continue discussion there until I close it. |
Duplicate of #38 |
A haplotype frequency that is sufficiently low to require that it is recorded in scientific notation in the *-out.xml file is not properly recorded in the *-out.txt file.
For example, the attached *-out.xml file includes three haplotypes with very low frequencies:
In the corresponding *-out.txt file, these frequencies are rounded to seven digits and reported without the exponent, which makes these frequencies appear to be larger than 1 in the *-out.txt file, as below:
Weird_Controls-out.txt
Weird_Controls-out.xml.txt
I see that I reported this earlier in 2017! It is still an issue.
The text was updated successfully, but these errors were encountered: