Schema Valid Is Not Exchange Ready
Clinical phenotype data can satisfy JSON syntax while omitting ontology resources, repeating assertions, or marking the same term both observed and excluded.
phenopacketlint checks packet identity and metadata, resource references, ontology identifier shape, labels, duplicates, and observed-versus-excluded contradictions, then produces field-level errors, warnings, and a quality score.
Make Every Finding Actionable
The validator preserves paths into the packet and runs identically through the CLI, API, responsive workbench, Docker image, and test suite. No patient payload leaves the local process.
The Demo
The committed rare-disease fixture contains three phenotype features: two observed and one excluded. It passes every semantic check with a quality score of 100.
This is an exchange-readiness layer, not a replacement for the official protobuf validator, terminology services, consent review, or clinical interpretation.
The Contradiction Check Had A Contradiction Of Its Own
The excluded field was interpreted with a plain Python bool(...) call. A real JSON boolean deserializes correctly, but bool("false") evaluates to True in Python — any non-empty string is truthy. A producer that serialized the flag as the string "false" instead of the JSON boolean false had its meaning silently flipped.
Verified directly: two entries for the same phenotype, both meaning "not excluded" — one a real boolean false, one the string "false" — were flagged as "the same phenotype is both observed and excluded." A false positive on precisely the class of error this tool exists to catch, and one that also silently inverted the observed_count/excluded_count summary fields. Fixed with an explicit interpreter that recognizes common string spellings instead of trusting Python truthiness, while a genuine contradiction across mixed string and boolean encodings is still caught correctly.
Standards Basis
The checks target the GA4GH Phenopacket Schema v2 exchange model for computable phenotype and disease information.
Read the GA4GH Phenopackets v2.