Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes https://github.com/pystatgen/sgkit/issues/221.
Closes https://github.com/pystatgen/sgkit/issues/115.
The most unusual part of this function is that it is looking for some notion of ploidy and allele count without explicitly needing data related to either for the calculation it runs (it only requires genotype counts). This works by adding parameters to the function that only need to be set if the same values cannot be found in the dataset dimensions. That seemed like a reasonable approach to maximize safety -- let me know if you have other suggestions @ravwojdyla / @tomwhite.