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

GA4GHTT-276 - minor update #252

Merged
merged 3 commits into from
Aug 9, 2024
Merged

Conversation

vasudeva8
Copy link
Collaborator

update to remove a TODO.
MISSING_VALUE can be a valid value for some, like SVCLAIM. So size is checked to see whether value is only '.' or more are present. If more are present, then cardinality is checked.

added comment on ragel file, showing genotype validation doesn't occur in ragel space as sample value definition is a super set of genotype definition. This necessitates header regeneration as well.

@vasudeva8
Copy link
Collaborator Author

changes except d4e88ce are part of PR #249, #251. They are present as changes made on top of these and expect them to be ignored as they get merged.

@vasudeva8 vasudeva8 requested a review from tcezard July 10, 2024 13:28
Comment on lines 680 to 684
if (values.size() != 4 * alternate_alleles.size()) { //MEINFO must be 4 * ALT allele count
std::stringstream message;
message << "INFO " << MEINFO << " for record at " << line << " must have " << 4 * alternate_alleles.size() << " value(s)";
throw new InfoBodyError{line, message.str(), "Found " + std::to_string(values.size()) + " value(s)"};
}
Copy link
Member

Choose a reason for hiding this comment

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

I feel like this should be refactored as a function to be used when cardinality is X time ALT.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Added a new function which takes the field name, expected count and the value collection.
This function reduces the clutter.

@tcezard tcezard changed the title GA4GHTT-270: minor update GA4GHTT-273 - minor update Jul 18, 2024
@tcezard tcezard changed the title GA4GHTT-273 - minor update GA4GHTT-276 - minor update Aug 5, 2024
@vasudeva8 vasudeva8 merged commit f64aa25 into EBIvariation:dev/vcf4.4 Aug 9, 2024
1 check 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