recordGradedGene

a gene whose consequence is a GRADED deficiency — neither activity nor carriage

Information

The third shape, alongside Gene and RiskGene. G6PD fits neither: its WHO classes I-IV are an ORDERED severity, so a Boolean carrier flag throws away real information, but they are not metaboliser activity either, so summing activity scores and banding them is meaningless — there is no 'ultrarapid' G6PD.

Still not a factor on any PK or PD parameter

Like carriage, a deficiency level does not scale a clearance or an EC50. What it grades is the SEVERITY of a safety consequence — the haemolysis risk when an oxidative drug is given — so DeficiencyComponent reports a level and warns in proportion to it, and drives no equation. If a drug's PK genuinely differed by G6PD status, that would be an Effect on that gene, not this record.

X-linked

G6PD sits on the X chromosome, so a hemizygous male has ONE allele and that allele decides the phenotype, while a heterozygous female is Variable rather than deficient because X-inactivation makes expression a mosaic. deficiencyOf implements exactly that, and the rule reproduces all 17765 of CPIC's G6PD diplotype calls.

Parameters

TypeNameDefaultDescription
Stringsymbol""HGNC symbol, e.g. "G6PD"
Stringallelefill("", 0)
IntegeralleleClassfill(1, 0)
Stringoutcome""what the deficiency risks, e.g. "acute haemolytic anaemia"
BooleanxLinkedtruetrue when a single allele (hemizygous male) is a complete genotype