def dtest_config_error(self): configFile = self.getErrorInputFile("pcssConfigMissingFile.txt") configSpecFile = "testConfig/testConfigSpec.txt" obj = configobj.ConfigObj(configFile, configspec=configSpecFile) with self.assertRaises(pcssErrors.PcssGlobalException) as pge: pcssTools.SvmApplicationFeatureRunner(obj) self.handleTestException(pge)
def test_svm_application_features_ump(self): self.pcssConfig['fasta_file'] = self.getLargeFastaFile() self.pcssConfig['svm_model_file'] = os.path.join( self.pcssConfig['user_pcss_directory'], "data", "benchmark", "userCustomModelFile") self.pcssConfig['svm_benchmark_file'] = os.path.join( self.pcssConfig['user_pcss_directory'], "data", "benchmark", "userCustomBenchmarkFile") self.runner = pcssTools.SvmApplicationFeatureRunner(self.pcssConfig) self.runner.internalConfig[ 'model_table_file'] = self.getFullModelTableFile() self.clearErrorFiles() self.runner.execute() self.assertFalse(os.path.exists(self.runner.pdh.getPcssErrorFile())) self.assertFalse(os.path.exists( self.runner.pdh.getInternalErrorFile())) self.compareToExpectedOutput( self.runner.pdh.getFullOutputFile( self.runner.internalConfig["annotation_output_file"]), "svmApplication", False, True)
import pcssTools import pcssCluster import configobj import sys import os configFileName = sys.argv[1] #tempPcssConfig = configobj.ConfigObj(configFileName) #configSpec = tempPcssConfig["user_config_spec_file"] pcssConfig = configobj.ConfigObj(configFileName) runner = pcssTools.SvmApplicationFeatureRunner(pcssConfig) runner.execute()
def dtest_svm_application_feature_internal_error(self): self.runner = pcssTools.SvmApplicationFeatureRunner(self.pcssConfig) self.throwInternalException() self.checkErrorThrown("internalError")
def dtest_svm_application_feature_pcss_error(self): self.runner = pcssTools.SvmApplicationFeatureRunner(self.pcssConfig) self.throwPcssException() self.checkErrorThrown("pcssError")