Skip to content
This repository has been archived by the owner on Oct 15, 2020. It is now read-only.

Return genotype probabilities and dosages #15

Merged
merged 6 commits into from
Aug 25, 2020

Conversation

eric-czech
Copy link
Collaborator

@eric-czech eric-czech commented Aug 23, 2020

#13

This modifies read_ben to return both probabilities and dosages.

It also includes a fix for the incorrect handling of scalar indexes (which happens if any chunk is of size 1) as well as fancy indexing (using from_array(..., fancy=False)).

FYI: The build won't work until https://github.com/pystatgen/sgkit/pull/137 goes through, but this is still ready for review.

@eric-czech eric-czech requested a review from tomwhite August 23, 2020 12:03
@@ -107,15 +107,27 @@ def __getitem__(self, idx):
raise IndexError( # pragma: no cover
f"Indexer must be two-item tuple (received {len(idx)} slices)"
)
if not all(isinstance(i, slice) or isinstance(i, int) for i in idx):
raise IndexError( # pragma: no cover
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to test this case?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@eric-czech eric-czech merged commit 3b7c30b into sgkit-dev:master Aug 25, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants