The number_of_pools is now pulled from the request metadata of the first aliquot in each project/study group, as they should all be the same.
The build_pools function has been changed so that the groups are split by study and project, then the wells within those groups are allocated to pools.
The distribute_groups_across_pools function has been removed and replaced with a new algorithm that will split the group by unique donor IDs, then start allocating the wells.
Each pool will now have the same number of samples, at most differing by one.
An example would be 21 samples being split into four pools. The result would be:
[5, 4, 4, 4]
There are constraints to ensure:
The number of pools requested is between 1 and 8 (inclusive).
After allocating wells to pools, each pool has between 5 and 25 (inclusive) samples.
Instructions for Reviewers
[All PRs] - Confirm PR template filled [Feature Branches] - Review code [Production Merges to main]
- Check story numbers included
- Check for debug code
- Check version
Closes #1985
Changes proposed in this pull request
number_of_pools
is now pulled from the request metadata of the first aliquot in each project/study group, as they should all be the same.build_pools
function has been changed so that the groups are split by study and project, then the wells within those groups are allocated to pools.distribute_groups_across_pools
function has been removed and replaced with a new algorithm that will split the group by unique donor IDs, then start allocating the wells.Instructions for Reviewers
[All PRs] - Confirm PR template filled
[Feature Branches] - Review code
[Production Merges to
main
]- Check story numbers included
- Check for debug code
- Check version