-
Notifications
You must be signed in to change notification settings - Fork 21
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
Conversation
…es into benb/split_import_and_validate
pos = allele_info['coordinates'][0]['end'] | ||
ref = allele_info['coordinates'][0]['referenceAllele'] | ||
alt = allele_info['coordinates'][0]['allele'] | ||
except (KeyError, StopIteration): |
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.
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.
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.
🤷 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): |
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.
is there anything in here that wasn't pulled from WriteImportedCallsetTask
?
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.
nope!
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.
lifted line by line.
mt, | ||
self.dataset_type, | ||
self.additional_row_fields(mt), | ||
additional_row_fields( |
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.
Can you delete additional_row_fields
in this file since you moved it?
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.
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) |
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.
is validated_sample_type
used anywhere?
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.
yes! we check it in the complete
method of ValidateCallset
.
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.
The change to this block was necessary because we're "mocking" the upstream task completion.
Benb/split import and validate (#829)
Splits the Import and Validate steps into two disjoint tasks.