pbpk impairment¶
The impaired organ function of the library: the factors of the Child-Pugh classes, the CKD stages and the NYHA classes on the physiology, the binding and the proteins of the liver, the factors of cirrhosis from the consensus of the parameter database (class_factors, child_pugh_protein) and the mapping of a MELD score onto the severity of cirrhosis (cp_severity_of_meld, meld_of_cp_severity, meld_anchors), see Impairment.
The impaired organ function: parameter vectors on the physiology.
Impairment is never a structurally different model: three severities of the
top model set factors on the quantities of the healthy physiology, the
liver and the binding to plasma proteins (the table impairment of the
parameter database pkpdsim.database, every number with its source; a
value which no publication read gives is a model choice):
CP_severity: liver cirrhosis, 0 healthy, 1, 2, 3 the Child-Pugh classes A, B, C; a severity between the classes interpolates every factor linearly (scans and fits use intermediate values). It sets the functional fractionf_functionaland the portosystemic shuntf_shuntof the liver, the hepatic arterial and the renal blood flow, the cardiac output (cardiac index; the organs without a factor of their own close the cardiac output to it), the GFR, albumin and alpha-1-acid glycoprotein (and so fu) and the activity of the enzymes and transporters of the liver: the consensus of the studies of the database on the abundance of the protein per amount of liver tissue in each class over the controls (pkpdsim.database.integration, the mRNA expression only for a protein without an abundance), every class with its interval and studies in the notes of its factor.f_renal_function: chronic kidney disease by the GFR relative to healthy (the factor of the physiology); its GFR per 1.73 m2 (eGFR) gives the stage (normal, mild, moderate, severe, end stage), which sets the binding capacity of the plasma proteins (and so fu). The factors are piecewise linear in the eGFR through anchor points at the stage midpoints ([ckd] stage_anchorof the data, a model choice: continuous covariate for scans and fits; stage midpoints): 1 from 90 ml/min/1.73 m2, the mild value at 75, the moderate value at 45, the severe value at 22.5 and the end stage value at 7.5 and below, linear in between (from 90 to 75 from 1 to the mild value), so a scan or fit off_renal_functionsees no step. The binding to albumin and alpha-1-acid glycoprotein follows the CKD profile of its protein ([ckd.binding]of the data): albumin falls in concentration and in the binding function of its molecule, AAG rises in concentration; the binding to an unknown protein follows the binding capacity of the plasma proteins (plasma_protein). The switchCKD_hepatic(0 off, 1 on) adds the reduced activity of hepatic CYP2D6 and OATP1B. The tubular capacity of the kidney (every metabolism and transport of the kidney) followsf_renal_functioncontinuously,1 - f_tubular + f_tubular*f_renal_functionwith the sharef_tubular1 of the intact nephron hypothesis ([ckd] tubular_capacityof the data, a model choice; the kidney owns the factor,pkpdsim.pbpk.organ).HF_severity: heart failure, 0 healthy, 1 to 4 the NYHA classes I to IV, interpolated: the blood flows of liver and portal organs, kidney and skin, adipose and muscle are reduced, the cardiac output is the sum of the flows, the GFR follows the renal blood flow (which is not monotonic in the class, NYHA IV above NYHA III, as measured by Leithe 1984).
The hematocrit (anaemia of cirrhosis and CKD, combined multiplicatively on the hematocrit of the sex of the build), the kidney volume and blood flow and the gastric emptying and small intestinal transit of CKD have their factors, which are 1 until a publication with the healthy reference is read (the data say why).
Each condition has its factors fcp_<key>, fckd_<key>, fhf_<key>; the
factor of all conditions on a quantity is fimp_<id> (fimp_GFR,
fimp_Qki, fimp_HCT), their product. Blood flows: every organ flow is its
fraction of the cardiac output without impairment (CO_base) times
fimp_Q<o>, and the cardiac output is CO_base times
fimp_CO = sum fQ<o>*fimp_Q<o>, so the flows sum to it.
Plasma binding (McNamara 2002): fu = 1/(1 + f*(1 - fu_ref)/fu_ref) with the
binding factor f, the factor of the binding protein in cirrhosis
(fimp_albumin, fimp_agp, 1 for an unknown protein) times the CKD factor of
the binding: the CKD profile of the protein (fimp_albumin_ckd,
fimp_agp_ckd, the product of its rows of [ckd.binding]), for an unknown
protein one over the factor of the binding capacity fimp_plasma_protein
(fu of a strongly bound substance rises by it). fu stays below 1. A binding
with ckd=False (measured unchanged in renal impairment) leaves out the CKD
factor, so f is the factor of the binding protein alone. The parameters of
the CKD profile of a protein are created only when a substance binds to it
with the CKD factor. Enzymes and transporters: a rate of a
protein in the liver runs with f_<protein>*fimp_<protein>, the organ-local
base activity (genotype, interactions of an experiment, LI__f_cyp3a4)
times the input fimp_<protein> of the impairment (fimp_li_<protein> of
the body), so both act multiplicatively.
All are initial assignments (pkpdsim.pbpk.physiology): set the severities
before the simulation, as a covariate; a severity which changes during a
simulation is named in PBPKDefinition.dynamic. f_shunt and
f_functional stay parameters an experiment may set directly. All
severities 0 give the healthy model: every factor is 1.
GASTRIC_EMPTYING
module-attribute
¶
GASTRIC_EMPTYING = ids.impairment_factor('t_stomach')
The factor on the transit time of the stomach, an input of the intestine.
SI_TRANSIT
module-attribute
¶
SI_TRANSIT = ids.impairment_factor('t_si')
The factor on the transit times of the small intestine, an input of the intestine.
MELD_HEALTHY
module-attribute
¶
The MELD score of CP_severity 0: the smallest score of the formula
(3.78 ln(bilirubin) + 11.2 ln(INR) + 9.57 ln(creatinine) + 6.43, every
laboratory value bounded below by 1 mg/dL or 1), which subjects with a normal
bilirubin, INR and creatinine have (Yang 2020: 6.43 in every quartile of the
patients with a normal liver function).
ImpairmentFactors
dataclass
¶
The factors of the classes of an impairment with their provenance.
Attributes:
| Name | Type | Description |
|---|---|---|
values |
tuple[float, ...]
|
the values of the classes in order. |
source |
tuple[float, ...]
|
the source of the values. |
notes |
str
|
the notes of the values. |
choice |
tuple[str, ...]
|
the classes whose value is a choice of the library, not a value of the source. |
provenance
¶
The text on the values and the sources of a parameter.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
classes
|
Sequence[str]
|
the labels of the classes of the values. |
required |
Returns:
| Type | Description |
|---|---|
str
|
The values by class with the classes which are model choices, and |
tuple[str, ...]
|
the sources (ModelChoice besides the source for those classes). |
Raises:
| Type | Description |
|---|---|
ValueError
|
if the vector does not have a value per class or a choice names no class. |
MeldAnchor
dataclass
¶
The MELD score of a severity of cirrhosis.
Attributes:
| Name | Type | Description |
|---|---|---|
severity |
float
|
the severity |
meld |
float
|
the MELD score of the severity. |
level |
Level | None
|
the consensus of the studies on the MELD of the class, |
organ_activity
¶
Get the local input of the individual on a protein in an organ.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
organ
|
Organ
|
the organ. |
required |
protein
|
str
|
the protein of a process of the organ. |
required |
Returns:
| Type | Description |
|---|---|
str | None
|
|
str | None
|
for a protein with data of impairment in the liver or with a factor |
str | None
|
of the age or the sex in the organ ( |
str | None
|
|
physiology_factors
¶
Get the factors of the impairment on the quantities of the physiology.
Returns:
| Type | Description |
|---|---|
dict[str, str]
|
The factor (formula) by the id of the quantity it multiplies, for |
dict[str, str]
|
|
dict[str, str]
|
sum of the impaired flows), the flows, the GFR (at renal function 1, |
dict[str, str]
|
|
dict[str, str]
|
kidney mass. |
unbound_fraction_notes
¶
Get the notes of the fraction unbound in plasma of a substance.
The notes say what unbound_fraction gives: the reference fraction scaled
with the binding protein under impairment, scaled with the binding
capacity of chronic kidney disease alone (an unknown protein with the CKD
factor), the reference fraction itself where no factor applies (an
unknown protein without the CKD factor), or no binding.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
s
|
Substance
|
the substance. |
required |
Returns:
| Type | Description |
|---|---|
str
|
The notes of |
unbound_fraction
¶
Get the formula of the fraction unbound in plasma of a substance under impairment.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
s
|
Substance
|
the substance. |
required |
Returns:
| Type | Description |
|---|---|
str
|
|
str
|
scaling |
str
|
the factor of the binding protein in cirrhosis times the CKD profile |
str
|
of the protein ( |
str
|
protein has no factor of cirrhosis and its CKD factor is one over the |
str
|
factor of the binding capacity |
str
|
of a strongly bound substance by itself |
str
|
( |
str
|
bound substance rises less (fu_ref 0.5 at a factor 2.5: 0.71, not |
str
|
1.25). A binding with |
str
|
protein alone; with an unknown protein as well no factor applies and |
str
|
the result is |
ckd_unbound_fractions
¶
Get the fraction unbound of a substance at the CKD stages.
The fu of unbound_fraction without cirrhosis at the values of the
stages mild, moderate, severe and end stage of the CKD factor of its
binding (the profile of its protein, [ckd.binding], or one over the
factor of the binding capacity plasma_protein of an unknown protein):
the factors are linear in the eGFR between the anchors of the stages and
constant below the end stage, so the fu of every renal function lies
between these values (and the reference fu of renal function 1).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
s
|
Substance
|
the substance. |
required |
Returns:
| Type | Description |
|---|---|
dict[str, float]
|
The fu by stage; empty for a substance whose fu CKD does not change |
dict[str, float]
|
(no binding, |
child_pugh_proteins
cached
¶
The proteins with a consensus of cirrhosis of a Child-Pugh class (pkpdsim.database).
child_pugh_protein
¶
The factors of a protein of the Child-Pugh classes from the consensus of the database.
A class without a consensus is the linear interpolation between its neighbours (healthy 1 at severity 0) and the last class with a consensus beyond it, a model choice.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
protein
|
str
|
the gene symbol of the protein. |
required |
Returns:
| Type | Description |
|---|---|
ImpairmentFactors
|
The factors of the classes A, B, C with the studies of every class. |
Raises:
| Type | Description |
|---|---|
ValueError
|
if no class of the protein has a consensus. |
class_factors
¶
The factors of the classes of a condition on a quantity.
An entry of the table impairment states its values (value), or names
the quantity of the studies of the database whose consensus they are
(consensus, a key of pkpdsim.database.studies.QUANTITIES): the ratio of
the class to the controls of each study, pooled over the studies, a class
without a study interpolated as for the proteins (child_pugh_protein).
The classes are the Child-Pugh classes A, B, C (child_pugh), the CKD
stages mild, moderate, severe and end stage (ckd, ckd.binding) and
the NYHA classes I to IV (heart_failure).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
section
|
str
|
the section of the table, e.g. |
required |
key
|
str
|
the key of the factor, e.g. |
required |
Returns:
| Type | Description |
|---|---|
ImpairmentFactors
|
The factors of the classes with their provenance. |
Raises:
| Type | Description |
|---|---|
KeyError
|
for a section or a key which is no factor of the table. |
meld_anchors
cached
¶
The MELD scores of the severities of cirrhosis, the anchors of the mapping.
Severity 0 is MELD_HEALTHY; the classes A, B, C (severity 1, 2, 3) have
the consensus of the studies of the database on the MELD of the patients
of the class (pkpdsim.database.integration.level, the mean or median of
each study pooled by a random-effects meta-analysis), to four significant
digits.
Returns:
| Type | Description |
|---|---|
tuple[MeldAnchor, ...]
|
The anchors in the order of the severities, the MELD increasing. |
Raises:
| Type | Description |
|---|---|
ValueError
|
if a class has no MELD in the database or the MELD of the anchors does not increase with the severity. |
cp_severity_of_meld
¶
Get the severity of cirrhosis CP_severity of a MELD score.
The severity is piecewise linear in the MELD through the anchors of
meld_anchors (a model choice: the MELD of a class is the consensus of
the patients of the class, between the classes the factors and the MELD
are both linear in the severity). A MELD at or below MELD_HEALTHY is
healthy (0), one at or above the MELD of class C is class C (3), since the
library has no factors beyond the class.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
meld
|
float
|
the MELD score. |
required |
Returns:
| Type | Description |
|---|---|
float
|
The severity, from 0 to 3. |
Raises:
| Type | Description |
|---|---|
ValueError
|
for a MELD which is not finite. |
meld_of_cp_severity
¶
Get the MELD score of a severity of cirrhosis, the inverse of cp_severity_of_meld.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
severity
|
float
|
the severity |
required |
Returns:
| Type | Description |
|---|---|
float
|
The MELD, piecewise linear in the severity through |
Raises:
| Type | Description |
|---|---|
ValueError
|
for a severity outside of 0 to 3. |
impairment_objects
¶
Get the parameters of the impaired organ function of the top model.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
definition
|
PBPKDefinition
|
the definition (the proteins of the liver). |
required |
Returns:
| Type | Description |
|---|---|
list[Sbase]
|
The severities, the factors of every condition and of all conditions |
list[Sbase]
|
(initial assignments) and the initial assignments of |
list[Sbase]
|
|
list[Sbase]
|
|