matthiaskoenig / pkdb

Pharmacokinetics database
https://alpha.pk-db.com
30 stars 6 forks source link

Error in tmax calculation pharmacokinetics #572

Closed matthiaskoenig closed 3 years ago

matthiaskoenig commented 4 years ago

For the tmax calculation only the data points after the intervention should be used. In this example there is a placebo measurement which starts at -30 min with higher values then after the intervention at 0 min (resulting in negative tmax values). This is basically a problem of how to handle the more special timecourses which are not classical pharmacokinetics.

~/git/pkdb_data$ upload_study -s studies/glucose/Hoogwerf1986/
INFO --------------------------------------------------------------------------------
INFO Upload studies/glucose/Hoogwerf1986/
INFO --------------------------------------------------------------------------------
INFO - 0.03 [s] : Created TSVs ['Fig1', 'Tab1']
INFO - 0.23 [s] : Upload references
INFO - 7.27 [s] : Upload files
INFO - 0.23 [s] : Upload core study
INFO - 0.50 [s] : Upload groups
INFO - 0.23 [s] : Upload individuals
WARNING 
{
  "calculated outputs": [
    "{'mean': 'Numeric values need to be positive (>=0) for all measurement types except <[]>.', 'detail': {'mean': -0.25, 'unit': 'hour', 'measurement_type': tmax, 'calculated': True, 'tissue': <Tissue: Tissue object (5)>, 'method': None, 'substance': <Substance: glucagon>, 'group': <Group: Group object (1191)>, 'individual': None, 'study': <Study: Hoogwerf1986>}}"
  ]
}
ERROR UPLOAD ERROR (check errors and warnings)
matthiaskoenig commented 4 years ago

This currently fails the upload of 4 studies: Same for other studies: glucose/Isrealian2006, glucose/Knop2007, glucose/Mitrakou1992