pkpd.objects module

class pkpd.objects.PKDepositionParameters(**args)[source]

Bases: pkpd.inhalation.PKDepositionParameters

class pkpd.objects.PKLung(**args)[source]

Bases: pkpd.inhalation.PKLung

class pkpd.objects.PKPDAllometricScale(**args)[source]

Bases: pwem.objects.data.EMObject

READING_MODELS = 2
READING_PREDICTOR = 1
READING_X = 3
READING_Y = 4
load(fnScale)[source]
write(fnScale)[source]
class pkpd.objects.PKPDDEOptimizer(model, fitType, goalFunction='RMSE')[source]

Bases: pkpd.objects.PKPDOptimizer

optimize()[source]
class pkpd.objects.PKPDDataSet(name, folder, files, url=None)[source]

Bases: object

classmethod getDataSet(name)[source]

This method is called every time the dataset want to be retrieved

getFile(key)[source]
getPath()[source]
class pkpd.objects.PKPDDoseResponse(**args)[source]

Bases: pwem.objects.data.EMObject

appendResponse(dose, response)[source]
findDose(dose)[source]
read(inputStr, isFn=False)[source]
write(fnOut)[source]
class pkpd.objects.PKPDExperiment(**args)[source]

Bases: pwem.objects.data.EMObject

READING_A_MEASUREMENT = 8
READING_DOSES = 4
READING_GENERAL = 1
READING_GROUPS = 5
READING_MEASUREMENTS = 7
READING_SAMPLES = 6
READING_VARIABLES = 2
READING_VIAS = 3
addLabelToSample(sampleName, varName, varDescr, varValue, rewrite=False)[source]
addParameterToSample(sampleName, varName, varUnits, varDescr, varValue, rewrite=False)[source]
addSample(sample)[source]
addSampleToGroup(groupName, sample)[source]
gather(otherExperiment)[source]
getDoseUnits()[source]
getFirstSample()[source]
getMeasurementVariables()[source]
getNonBolusDoses()[source]
getRange(varName)[source]
getSubGroup(condition)[source]
getSubGroupLabels(condition, labelName)[source]
getTimeUnits()[source]
getTimeVariable()[source]
getVarUnits(varName)[source]
getXYMeanValues(varNameX, varNameY)[source]
load(fnExperiment='', verifyIntegrity=True, fullRead=True)[source]
sampleSummary()[source]
subset(listOfSampleNames)[source]
write(fnExperiment, writeToExcel=True)[source]
writeToExcel(fnXls)[source]
class pkpd.objects.PKPDFitting(cls='', **args)[source]

Bases: pwem.objects.data.EMObject

READING_FITTING_EXPERIMENT = 1
READING_FITTING_MODEL = 5
READING_FITTING_PREDICTED = 3
READING_FITTING_PREDICTED_LIST = 4
READING_FITTING_PREDICTOR = 2
READING_POPULATION = 7
READING_POPULATION_HEADER = 6
READING_SAMPLEFITTINGS_BEGIN = 8
READING_SAMPLEFITTINGS_CONTINUE = 9
gather(otherFitting, experiment=None)[source]
getAllParameters()[source]
getSampleFit(sampleName)[source]
getStats(observations=None)[source]
getTimeUnits()[source]
isPopulation()[source]
load(fnFitting=None)[source]
loadExperiment()[source]
write(fnFitting, writeToExcel=True)[source]
writeToExcel(fnXls)[source]
class pkpd.objects.PKPDGroup(groupName)[source]

Bases: object

getSamplesString()[source]
class pkpd.objects.PKPDLSOptimizer(model, fitType, goalFunction='RMSE')[source]

Bases: pkpd.objects.PKPDOptimizer

optimize(ftol=1.49012e-08, xtol=1.49012e-08)[source]
setConfidenceInterval(confidenceInterval)[source]
class pkpd.objects.PKPDModel[source]

Bases: pkpd.objects.PKPDModelBase2

prepare()[source]
class pkpd.objects.PKPDModelBase[source]

Bases: object

calculateParameterUnits(sample)[source]
getDescription()[source]
getNumberOfParameters()[source]
getParameterDescriptions()[source]
getParameterNames()[source]
rearrange(parameters)[source]
setExperiment(experiment)[source]
setParameters(parameters)[source]
setXVar(x)[source]
setXYValues(x, y)[source]
setYVar(y)[source]
unsetExperiment()[source]
class pkpd.objects.PKPDModelBase2[source]

Bases: pkpd.objects.PKPDModelBase

areParametersSignificant(lowerBound, upperBound)[source]
Parameters:and upperBound (lowerBound) – a numpy array of parameters
Returns:a list of string with “True”, “False”, “NA”, “Suspicious”
areParametersValid(p)[source]
forwardModel(parameters, x=None)[source]
getBounds()[source]
getEquation()[source]
getModelEquation()[source]
getParameterDescriptions()[source]
printSetup()[source]
setBounds(boundsString)[source]
setConfidenceInterval(lowerBound, upperBound)[source]
setConfidenceIntervalNA()[source]
setSample(sample)[source]
class pkpd.objects.PKPDODEModel[source]

Bases: pkpd.objects.PKPDModelBase2

F(t, y)[source]
G(t, dD)[source]
H(y)[source]
forwardModel(parameters, x=None, drugSource=None)[source]
forwardModelByConvolution(parameters, x=None)[source]
getImpulseResponse(parameters, tImpulse)[source]
getResponseDimension()[source]
getStateDimension()[source]
imposeConstraints(yt)[source]
printOtherParameterization()[source]
setXYValues(x, y)[source]
class pkpd.objects.PKPDOptimizer(model, fitType, goalFunction='RMSE')[source]

Bases: object

evaluateQuality()[source]
getResiduals(parameters)[source]
goalRMSE(parameters)[source]
hugeError()[source]
inBounds(parameters)[source]
printFitting()[source]
class pkpd.objects.PKPDSample[source]

Bases: object

addMeasurement(line)[source]
addMeasurementColumn(varName, values)[source]
addMeasurementPattern(tokens)[source]
evaluateExpression(expression, prefix='')[source]
evaluateParsedExpression(parsedOperation, varList)[source]
getCumulatedDose(t0, tF)[source]
getDescriptorValue(descriptorName)[source]
getDoseAt(t0, dt=0.5)[source]
getDoseUnits()[source]
getNumberOfMeasurements()[source]
getNumberOfVariables()[source]
getRange(varName)[source]
getSampleMeasurements()[source]
getSampleName()[source]
getTimeUnits()[source]
getTimeVariable()[source]
getValues(varName)[source]
getVariableValues(varList)[source]
getXYValues(varNameX, varNameY)[source]
interpretDose()[source]
isDoseABolus()[source]
parseTokens(tokens, variableDict, doseDict, groupDict)[source]
setDescriptorValue(descriptorName, descriptorValue)[source]
setValues(varName, varValues)[source]
substituteValuesInExpression(expression, prefix='')[source]
class pkpd.objects.PKPDSampleFit[source]

Bases: object

READING_SAMPLEFITTINGS_AIC = 4
READING_SAMPLEFITTINGS_AICc = 5
READING_SAMPLEFITTINGS_BIC = 6
READING_SAMPLEFITTINGS_MODELEQ = 1
READING_SAMPLEFITTINGS_NAME = 0
READING_SAMPLEFITTINGS_PARAMETER_BOUNDS = 7
READING_SAMPLEFITTINGS_R2 = 2
READING_SAMPLEFITTINGS_R2ADJ = 3
READING_SAMPLEFITTINGS_SAMPLE_VALUES = 8
copyFromOptimizer(optimizer)[source]
getBasicInfo()[source]

Return a string with some basic information of the fitting.

printForPopulation(fh, observations)[source]
printForPopulationExcel(wb, row, observations)[source]
readFromLine(line)[source]
restartReadingState()[source]
class pkpd.objects.PKPDSampleFitBootstrap[source]

Bases: object

READING_SAMPLEFITTINGS_NAME = 0
READING_SAMPLEFITTINGS_PARAMETERS = 3
READING_SAMPLEFITTINGS_XB = 1
READING_SAMPLEFITTINGS_YB = 2
copyFromOptimizer(optimizer)[source]
printForPopulation(fh, observations)[source]
printForPopulationExcel(wb, row, observations)[source]
readFromLine(line)[source]
restartReadingState()[source]
class pkpd.objects.PKPDSampleMeasurement(sample, n)[source]

Bases: object

getValues()[source]
class pkpd.objects.PKPDSampleSignalAnalysis[source]

Bases: object

class pkpd.objects.PKPDSignalAnalysis(**args)[source]

Bases: pwem.objects.data.EMObject

READING_ANALYSIS_VARIABLES = 5
READING_EXPERIMENT = 1
READING_MODEL = 4
READING_POPULATION = 7
READING_POPULATION_HEADER = 6
READING_PREDICTED = 3
READING_PREDICTOR = 2
READING_SAMPLEANALYSIS_NAME = 8
READING_SAMPLEANALYSIS_PARAMETERS = 9
getSampleAnalysis(sampleName)[source]
load(fnAnalysis)[source]
write(fnAnalysis)[source]
class pkpd.objects.PKPDVariable[source]

Bases: object

ROLE_LABEL = 1012
ROLE_MEASUREMENT = 1011
ROLE_NAMES = {1010: 'time', 1011: 'measurement', 1012: 'label'}
ROLE_TIME = 1010
TYPE_NAMES = {1000: 'numeric', 1001: 'text'}
TYPE_NUMERIC = 1000
TYPE_TEXT = 1001
getLabel()[source]
getRoleString()[source]
getTypeString()[source]
getUnitsString()[source]
isLabel()[source]
isMeasurement()[source]
isNumeric()[source]
isTime()[source]
parseTokens(tokens)[source]
class pkpd.objects.PKPhysiologyLungParameters(**args)[source]

Bases: pkpd.inhalation.PKPhysiologyLungParameters

class pkpd.objects.PKSubstanceLungParameters(**args)[source]

Bases: pkpd.inhalation.PKSubstanceLungParameters

pkpd.objects.flattenArray(y)[source]
pkpd.objects.smartLog(y)[source]