Esempio n. 1
0
    def getOutputDataFromDNATableFile(self, _strFileName):
        xsDataResultBest = XSDataResultBest()
        if os.path.exists(_strFileName):
            strDnaTablesXML = self.readProcessFile(_strFileName)
            # Fix for MXSUP-1751: Error when parsing broken XML
            try:
                xsDataDnaTables = dna_tables.parseString(strDnaTablesXML)
            except Exception as e:
                self.setFailure()
                self.error("Parsing of BEST XML file failed: %s" % e)
                
            # Loop through all the tables and fill in the relevant parts of xsDataResultBest
            if not self.isFailure():
                xsDataStringStrategyOption = self.getDataInput().getStrategyOption()
                if (xsDataStringStrategyOption is not None):
                    strStrategyOption = xsDataStringStrategyOption.getValue()
                    if (strStrategyOption.find("-DamPar") != -1):
                        xsDataResultBest = self.getDamParOutputFromDNATables(xsDataDnaTables)
                    elif (strStrategyOption.find("-Bonly") != -1):
                        xsDataResultBest = self.getBonlyOutputFromDNATables(xsDataDnaTables)
                    else:
                        xsDataResultBest = self.getDataCollectionOutputDataFromDNATables(xsDataDnaTables)
                else:
                    xsDataResultBest = self.getDataCollectionOutputDataFromDNATables(xsDataDnaTables)

        return xsDataResultBest
Esempio n. 2
0
    def getOutputDataFromDNATableFile(self, _strFileName):
        xsDataResultBest = XSDataResultBest()
        if os.path.exists(_strFileName):
            strDnaTablesXML = self.readProcessFile(_strFileName)
            # Fix for MXSUP-1751: Error when parsing broken XML
            try:
                xsDataDnaTables = dna_tables.parseString(strDnaTablesXML)
            except Exception as e:
                self.setFailure()
                self.error("Parsing of BEST XML file failed: %s" % e)

            # Loop through all the tables and fill in the relevant parts of xsDataResultBest
            if not self.isFailure():
                xsDataStringStrategyOption = self.getDataInput(
                ).getStrategyOption()
                if (xsDataStringStrategyOption is not None):
                    strStrategyOption = xsDataStringStrategyOption.getValue()
                    if (strStrategyOption.find("-DamPar") != -1):
                        xsDataResultBest = self.getDamParOutputFromDNATables(
                            xsDataDnaTables)
                    elif (strStrategyOption.find("-Bonly") != -1):
                        xsDataResultBest = self.getBonlyOutputFromDNATables(
                            xsDataDnaTables)
                    else:
                        xsDataResultBest = self.getDataCollectionOutputDataFromDNATables(
                            xsDataDnaTables)
                else:
                    xsDataResultBest = self.getDataCollectionOutputDataFromDNATables(
                        xsDataDnaTables)

        return xsDataResultBest
    def getOutputDataFromDNATableFile(self, _strFileName):
        strDnaTablesXML = self.readProcessFile(_strFileName)
        xsDataDnaTables = dna_tables.parseString(strDnaTablesXML)
        xsDataResultBest = XSDataResultBest()
        # Loop through all the tables and fill in the relevant parts of xsDataResultBest

        xsDataStringStrategyOption = self.getDataInput().getStrategyOption()
        if (xsDataStringStrategyOption is not None):
            strStrategyOption = xsDataStringStrategyOption.getValue()
            if (strStrategyOption.find("-DamPar") != -1 ):
                xsDataResultBest = self.getDamParOutputFromDNATables(xsDataDnaTables)
            elif (strStrategyOption.find("-Bonly") != -1 ):
                xsDataResultBest = self.getBonlyOutputFromDNATables(xsDataDnaTables)
            else:
                xsDataResultBest = self.getDataCollectionOutputDataFromDNATables(xsDataDnaTables)
        else:
            xsDataResultBest = self.getDataCollectionOutputDataFromDNATables(xsDataDnaTables)

        return xsDataResultBest
Esempio n. 4
0
    def getOutputDataFromDNATableFile(self, _strFileName):
        strDnaTablesXML = self.readProcessFile(_strFileName)
        xsDataDnaTables = dna_tables.parseString(strDnaTablesXML)
        xsDataResultBest = XSDataResultBest()
        # Loop through all the tables and fill in the relevant parts of xsDataResultBest

        xsDataStringStrategyOption = self.getDataInput().getStrategyOption()
        if (xsDataStringStrategyOption is not None):
            strStrategyOption = xsDataStringStrategyOption.getValue()
            if (strStrategyOption.find("-DamPar") != -1):
                xsDataResultBest = self.getDamParOutputFromDNATables(
                    xsDataDnaTables)
            elif (strStrategyOption.find("-Bonly") != -1):
                xsDataResultBest = self.getBonlyOutputFromDNATables(
                    xsDataDnaTables)
            else:
                xsDataResultBest = self.getDataCollectionOutputDataFromDNATables(
                    xsDataDnaTables)
        else:
            xsDataResultBest = self.getDataCollectionOutputDataFromDNATables(
                xsDataDnaTables)

        return xsDataResultBest