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

Generic functions for cohort means and sums #730

Closed
timothymillar opened this issue Oct 7, 2021 · 1 comment · Fixed by #867
Closed

Generic functions for cohort means and sums #730

timothymillar opened this issue Oct 7, 2021 · 1 comment · Fixed by #867

Comments

@timothymillar
Copy link
Collaborator

I've come across a couple of situations where I want to take mean of sample values for each cohort in a dataset. From what I can tell, there is not a simple way to achieve this using dask or xarray.

We already have a numba jitted function to do this for a specific case (_cohort_observed_heterozygosity) so it would make sense to generalize that to standard function in utils.py or similar. A higher level function could be made available which automatically calculates the cohort dimension size and runs da.mapblocks etc. We could also to the same for cohort sums.

@jeromekelleher
Copy link
Collaborator

Sounds great @timothymillar!

timothymillar added a commit to timothymillar/sgkit that referenced this issue Dec 7, 2021
timothymillar added a commit to timothymillar/sgkit that referenced this issue Dec 7, 2021
timothymillar added a commit to timothymillar/sgkit that referenced this issue Dec 7, 2021
timothymillar added a commit to timothymillar/sgkit that referenced this issue Jun 18, 2022
timothymillar added a commit to timothymillar/sgkit that referenced this issue Jun 20, 2022
timothymillar added a commit to timothymillar/sgkit that referenced this issue Jun 20, 2022
@mergify mergify bot closed this as completed in #867 Jun 21, 2022
mergify bot pushed a commit that referenced this issue Jun 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants