Skip to content

Take contigs into account for fixed-size windowing #372

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

Merged
merged 3 commits into from
Nov 5, 2020

Conversation

tomwhite
Copy link
Collaborator

@tomwhite tomwhite commented Nov 3, 2020

Fixes #335

Copy link
Collaborator

@jeromekelleher jeromekelleher left a comment

Choose a reason for hiding this comment

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

LGTM @tomwhite , altough it'd be nice to see some more testing of the edge-cases

np.testing.assert_equal(ds[window_start].values, [0, 2, 4, 6, 8])
np.testing.assert_equal(ds[window_stop].values, [2, 4, 6, 8, 10])

with pytest.raises(MergeWarning):
window(ds, 2, 2)


def test_window__multiple_contigs():
ds = simulate_genotype_call_dataset(n_variant=15, n_sample=1, n_contig=3)
Copy link
Collaborator

Choose a reason for hiding this comment

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

It'd be nice to test this with n_contig=n_variant, so we test the degenerate case.

Also be nice to see what happens when n_variant=1.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@tomwhite tomwhite added the auto-merge Auto merge label for mergify test flight label Nov 5, 2020
@mergify mergify bot merged commit 682d58f into sgkit-dev:master Nov 5, 2020
@tomwhite tomwhite mentioned this pull request May 17, 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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Take contigs into account for fixed-size windowing
2 participants