functiondeficiencyOf

genotype -> DeficiencyLevel, by the CPIC G6PD rule

Information

Verified against CPIC: this rule reproduces all 17765 G6PD diplotype calls exactly. The two non-obvious branches are the ones that made a naive rule wrong — a heterozygous normal/deficient female is Variable, not deficient, and one class I allele alongside a class II or III gives Deficient, not CNSHA, which requires both.

Inputs

TypeNameDefaultDescription
String[:]allele
Integer[:]alleleClass
Stringa1
Stringa2empty for a hemizygous (male X-linked) genotype

Outputs

TypeNameDefaultDescription
DeficiencyLevellevel