-
Notifications
You must be signed in to change notification settings - Fork 37
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
qiime feature-table rarefy --p-with-replacement: sum(pvals[:-1]) > 1.0 #245
Comments
Thanks for reporting, @nick-youngblut. I think this error might be originating in the biom package, would you mind running this little bit of python code (using the offending data) to see if you can recreate it in pure biom? import qiime2
import biom
artifact = qiime2.Artifact.load('table.qza')
table = artifact.view(biom.Table)
table.subsample(500000, axis='sample', by_id=False, with_replacement=True) |
I can't seem to reproduce the error, so it appears to occur rarely. |
Thanks @nick-youngblut. I don't think this issue can be resolved in this QIIME 2 plugin - the |
I ran into the issue again, and I was able to confirm that the issue is caused by biom:
I guess that I should post the issue on https://github.com/biocore/biom-format |
See the link above -- @nick-youngblut maybe it is possible that you had fractional values in the biom table? Rounding to ints seems to have resolved this issue. |
Thank you, @mortonjt, for opening the issue on the biom-format tracker. I was unaware of this edge case, we'll look at getting it addressed in the next release. |
This issue was addressed in biocore/biom-format#961 and it may make sense to close this issue. As a general comment, please do consider opening issues when appropriate with affected projects so problems can be resolved in a timely manner. |
Bug Description
Running
qiime feature-table rarefy --p-with-replacement
sometimes generated the error:sum(pvals[:-1]) > 1.0
This is likely a float rounding issue.
Steps to reproduce the behavior
qiime feature-table rarefy --p-with-replacement --p-sampling-depth 500000
The counts per sample for my feature table are:
...so it's not a problem that just occurs with a very small sample size (eg., n = 1 or n = 10)
Computation Environment
qiime2 2020.8.0
The text was updated successfully, but these errors were encountered: