Skip to content

Validate genotype-likelihood error-matrix input - #666

Open
thierrygosselin wants to merge 1 commit into
ANGSD:masterfrom
thierrygosselin:fix-error-matrix-input-validation
Open

thierrygosselin wants to merge 1 commit into
ANGSD:masterfrom
thierrygosselin:fix-error-matrix-input-validation

Conversation

@thierrygosselin

Copy link
Copy Markdown

Summary

The genotype-likelihood error-matrix reader assumed that every input line contained all 16 required fields. Truncated or empty files could therefore cause invalid parsing or division by zero.

This change:

  • checks that each row contains 16 fields;
  • reports the file and line number for malformed input;
  • rejects empty error-matrix files;
  • uses a failure exit status for these fatal input errors;
  • preserves the existing error-matrix calculation for valid files.

No likelihood model or numerical calculation was changed.

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.

1 participant