-
Notifications
You must be signed in to change notification settings - Fork 89
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
Pedigree info validation clean up #4636
Conversation
…idation-record-clean-up
request_json['vcfSamples'], search_dataset_type, | ||
record_family_ids, affected_status_by_family, previous_loaded_individuals, sample_type, | ||
) | ||
nonlocal loaded_individual_ids |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I hadn't seen nonlocal
before, I feel like personally it would be preferable to return these values from the nested function and do the updating of the loaded_sample_type
and loaded_individual_ids
via the returned values, but that's just style preference I guess and also I wouldn't request you change it here in this PR since you're just moving stuff around in here.
The helper functions we use to validate pedigrees involve a lot of code duplication, in particular in the way that they look up potential existing individuals in the database. In order to implement #4580 we need better shared utilities for validating samples which was hard to do with the existing mess of validation. This cleans up the validation code and also abstracts out the logic used for validating the search sample subset into a single helper function.
This PR contains essentially no behavior changes- the only exception is that previously we did 2 steps to validate AnVIL loading requests and thats now done in one step, so certain requests now include more validation falures on the first pass instead of some failures and then more failures on the subsequent request after those are fixed