예제 #1
0
    def P_CONTINUATION_WITH_EIGEN(self, *args):
        """
        [str(p), float(min), float(max), int(points), *float(y-value)]
        """
        self.setStatus('CONTINUING')
        args = args[0]
        print('Args', args)

        pscan = pysces.PITCONScanUtils(self.model)
        if len(args) == 4:
            pscan.runContinuation(
                args[0].strip(),
                float(args[1].strip()),
                float(args[2].strip()),
                int(args[3].strip()),
            )
        elif len(args) == 5:
            pscan.runContinuation(
                args[0].strip(),
                float(args[1].strip()),
                float(args[2].strip()),
                int(args[3].strip()),
                float(args[4].strip()),
            )
        pscan.analyseData(analysis='eigen')
        self.RESULT = (
            pscan.res_idx,
            pscan.res_metab,
            pscan.res_flux,
            pscan.getArrayListAsArray(pscan.res_eigen),
        )
        del pscan
        return True
예제 #2
0
    def P_CONTINUATION2D_WITH_EIGEN_USER(self, *args):
        """
        [str(p), float(min), float(max), int(points), float(y-value), str(userNx)]
        """
        self.setStatus('CONTINUING')
        args = args[0]
        print('Args', args)
        userout = []
        for a in range(len(args)):
            args[a] = args[a].strip()
            if a > 4:
                userout.append(args[a])

        pscan = pysces.PITCONScanUtils(self.model)
        if len(userout) > 0:
            pscan.setUserOuput(*userout)
        pscan.runContinuation(args[0], float(args[1]), float(args[2]),
                              int(args[3]), float(args[4]))
        pscan.analyseData(analysis='all')
        self.RESULT = (
            pscan.res_idx,
            pscan.res_metab,
            pscan.res_flux,
            pscan.getArrayListAsArray(pscan.res_eigen),
            pscan.res_user,
        )
        del pscan
        return True
예제 #3
0
    def P_CONTINUATION_WITH_EIGEN_USER(self, *args):
        """
        [str(p), float(min), float(max), int(points), float(y-value)]
        """
        self.setStatus('CONTINUING')
        args = args[0]
        print 'Args', args

        pscan = pysces.PITCONScanUtils(self.model)
        #TODO HARD CODED FOR NOW BUT NEEDS GENERALISATION
        pscan.setUserOuput('ecR1_A','ecR2_A')
        if len(args) == 4:
            pscan.runContinuation(args[0].strip(),float(args[1].strip()), float(args[2].strip()), int(args[3].strip()))
        elif len(args) == 5:
            pscan.runContinuation(args[0].strip(), float(args[1].strip()), float(args[2].strip()), int(args[3].strip()), float(args[4].strip()))
        pscan.analyseData(analysis='eigen')
        self.RESULT = (pscan.res_idx, pscan.res_metab, pscan.res_flux, pscan.getArrayListAsArray(pscan.res_eigen), pscan.res_user)
        del pscan
        return True