Skip to main content
. 2015 Jun 17;10(6):e0127972. doi: 10.1371/journal.pone.0127972

Table 6. Python implementation of starvation and health factor calculations.

for cell in self.cellList:
if cell.type!= self.NECROTIC:
cellDict = CompuCell.getPyAttrib(cell)
pt = getCellCOMPoint3D(cell)
conc = glucoseField.get(pt)
if cell.type == self.PCANCER:
if conc < ip.GluD:
    cellDict[“Starv”]+=abs(self.MM(conc, ip.PUgMax, ip.GluK)\
    - self.MM(ip.GluD, ip.PUgMax, ip.GluK))
else:
    cellDict[“Health”]+=self.MM(conc, ip.PUgMax, ip.GluK)\
    - self.MM(ip.GluD, ip.PUgMax, ip.GluK)
if cell.type == self.QCANCER:
if conc < ip.GluD:
    cellDict[“Starv”]+=abs(self.MM(conc, ip.QUgMax, ip.GluK)\
    - self.MM(ip.GluD, ip.QUgMax, ip.GluK))
else:
    cellDict[“Health”]+=self.MM(conc, ip.QUgMax, ip.GluK)\
    - self.MM(ip.GluD, ip.QUgMax, ip.GluK)
if cell.type == self.PSTEM:
if conc < ip.GluD:
    cellDict[“Starv”]+=abs(self.MM(conc, ip.SUgMax, ip.GluK)\
else:
    cellDict[“Health”]+=self.MM(conc, ip.SUgMax, ip.GluK)\
    - self.MM(ip.GluD, ip.SUgMax, ip.GluK)
if cell.type == self.QSTEM:
if conc < ip.GluD:
    cellDict[“Starv”]+=abs(self.MM(conc, ip.QSUgMax, ip.GluK)\
    - self.MM(ip.GluD, ip.QSUgMax, ip.GluK))
else:
    cellDict[“Health”]+=self.MM(conc, ip.QSUgMax, ip.GluK)\\
    - self.MM(ip.GluD, ip.QSUgMax, ip.GluK)