Source code for pkpd.protocols.protocol_pkpd_inhalation_import_deposition

# **************************************************************************
# *
# * Authors:     Carlos Oscar Sorzano (info@kinestat.com)
# *
# * Kinestat Pharma
# *
# * This program is free software; you can redistribute it and/or modify
# * it under the terms of the GNU General Public License as published by
# * the Free Software Foundation; either version 2 of the License, or
# * (at your option) any later version.
# *
# * This program is distributed in the hope that it will be useful,
# * but WITHOUT ANY WARRANTY; without even the implied warranty of
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# * GNU General Public License for more details.
# *
# * You should have received a copy of the GNU General Public License
# * along with this program; if not, write to the Free Software
# * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
# * 02111-1307  USA
# *
# *  All comments concerning this program package may be sent to the
# *  e-mail address 'info@kinestat.com'
# *
# **************************************************************************

import pyworkflow.protocol.params as params
from .protocol_pkpd import ProtPKPD

from pkpd.objects import PKDepositionParameters

# Tested in test_workflow_inhalation1

[docs]class ProtPKPDInhImportDepositionProperties(ProtPKPD): """ Read deposition parameters associated to some substance\n See Hartung2020. Protocol created by http://www.kinestatpharma.com\n """ _label = 'deposition pattern' #--------------------------- DEFINE param functions -------------------------------------------- def _defineParams(self, form): # Default parameters from # Hartung2020_MATLAB/physiol_subst/properties_subst.m form.addSection('Input') form.addParam('substance', params.PointerParam, pointerClass='PKSubstanceLungParameters', label="Substance") form.addParam('lungModel', params.PointerParam, pointerClass='PKPhysiologyLungParameters', label="Lung model") form.addParam('depositionFile', params.FileParam, label="Deposition pattern", help='This file is generated by MPPD software') #--------------------------- INSERT steps functions -------------------------------------------- def _insertAllSteps(self): self._insertFunctionStep('createOutputStep') #--------------------------- STEPS functions --------------------------------------------
[docs] def createOutputStep(self): self.deposition = PKDepositionParameters() self.deposition.setFiles(self.substance.get().fnSubst.get(), self.lungModel.get().fnPhys.get(), self.depositionFile.get()) self._defineOutputs(outputDeposition=self.deposition)
def _citations(self): return ['Hartung2020']