Skip to content

Benb/split import and validate #829

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 12 commits into from
Jul 9, 2024
Merged

Conversation

bpblanken
Copy link
Collaborator

@bpblanken bpblanken commented Jul 3, 2024

Splits the Import and Validate steps into two disjoint tasks.

@bpblanken bpblanken marked this pull request as ready for review July 8, 2024 16:28
@bpblanken bpblanken requested a review from a team as a code owner July 8, 2024 16:28
@bpblanken bpblanken requested a review from matren395 July 8, 2024 16:29
pos = allele_info['coordinates'][0]['end']
ref = allele_info['coordinates'][0]['referenceAllele']
alt = allele_info['coordinates'][0]['allele']
except (KeyError, StopIteration):
Copy link
Contributor

Choose a reason for hiding this comment

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

oof so referenceGenome was missing from the response?

Looking back to https://reg.clinicalgenome.org/doc/AlleleRegistry_1.01.xx_api_v1.pdf, looks like referenceGenome in alleleDefinition is populated conditionally.

We could handle it more explicitly but I think a simply try/except is the better option.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

🤷 yes! I think this is the laziest answer... if any keys are missing just let it be unmappable. manual intervention on this is expensive (I think?)



@luigi.util.inherits(BaseLoadingRunParams)
class ValidateCallsetTask(BaseUpdateTask):
Copy link
Contributor

Choose a reason for hiding this comment

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

is there anything in here that wasn't pulled from WriteImportedCallsetTask?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

nope!

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

lifted line by line.

@bpblanken bpblanken changed the base branch from dev to main July 9, 2024 15:48
@bpblanken bpblanken changed the base branch from main to dev July 9, 2024 15:48
mt,
self.dataset_type,
self.additional_row_fields(mt),
additional_row_fields(
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you delete additional_row_fields in this file since you moved it?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yes! that snuck through good catch!

@@ -57,7 +57,7 @@ def setUp(self) -> None:

# Force imported callset to be complete
ht = import_vcf(TEST_VCF, ReferenceGenome.GRCh38)
ht = ht.annotate_globals(sample_type=SampleType.WGS.value)
ht = ht.annotate_globals(validated_sample_type=SampleType.WGS.value)
Copy link
Contributor

Choose a reason for hiding this comment

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

is validated_sample_type used anywhere?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yes! we check it in the complete method of ValidateCallset.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The change to this block was necessary because we're "mocking" the upstream task completion.

@bpblanken bpblanken merged commit 3178560 into dev Jul 9, 2024
3 checks passed
@bpblanken bpblanken deleted the benb/split_import_and_validate branch July 9, 2024 21:18
bpblanken added a commit that referenced this pull request Jul 10, 2024
Benb/split import and validate (#829)
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