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

Pedigree info validation clean up #4636

Merged
merged 14 commits into from
Feb 11, 2025
Merged

Pedigree info validation clean up #4636

merged 14 commits into from
Feb 11, 2025

Conversation

hanars
Copy link
Collaborator

@hanars hanars commented Feb 5, 2025

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

@hanars hanars changed the base branch from data-manager-test-cleanup to dev February 6, 2025 19:10
@hanars hanars requested review from bpblanken and jklugherz February 6, 2025 20:55
request_json['vcfSamples'], search_dataset_type,
record_family_ids, affected_status_by_family, previous_loaded_individuals, sample_type,
)
nonlocal loaded_individual_ids
Copy link
Contributor

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.

@hanars hanars merged commit 345ac42 into dev Feb 11, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants