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

Fix various indexing bugs #516

Merged
merged 3 commits into from
Apr 6, 2021

Conversation

tomwhite
Copy link
Collaborator

@tomwhite tomwhite commented Apr 6, 2021

This fixes #506, and a couple of other related bugs that occur when an index is set and were found when working on #463:

  • var_name in ds fails if the data variable var_name has been "moved" to be an index field of ds
  • PCA doesn't work properly if there is an index set

Both of these cases are triggered by setting an index like this:

ds = ds.set_index({"variants": ("variant_contig", "variant_position")})

See also #473

@tomwhite tomwhite added the bug Something isn't working label Apr 6, 2021
@tomwhite tomwhite requested a review from ravwojdyla April 6, 2021 09:15
@codecov-io
Copy link

Codecov Report

Merging #516 (a0e031c) into master (2c9a8e0) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master      #516   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           34        34           
  Lines         2642      2646    +4     
=========================================
+ Hits          2642      2646    +4     
Impacted Files Coverage Δ
sgkit/stats/pca.py 100.00% <100.00%> (ø)
sgkit/variables.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2c9a8e0...a0e031c. Read the comment docs.

@tomwhite tomwhite added the auto-merge Auto merge label for mergify test flight label Apr 6, 2021
@mergify mergify bot merged commit a3a5e96 into sgkit-dev:master Apr 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-merge Auto merge label for mergify test flight bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error in variant_stats if dataset has an index
4 participants