def validateAndReturnErrors(cls, choices): ''' Should validate the selected input parameters. If the parameters are not valid, an error text explaining the problem should be returned. The GUI then shows this text to the user (if not empty) and greys out the execute button (even if the text is empty). If all parameters are valid, the method should return None, which enables the execute button. ''' errorString = GeneralGuiTool._checkGSuiteFile(choices.gsuite) if errorString: return errorString gSuite = getGSuiteFromGalaxyTN(choices.gsuite) errorString = GeneralGuiTool._checkGSuiteRequirements( gSuite, allowedLocations=cls.GSUITE_ALLOWED_LOCATIONS, allowedFileFormats=cls.GSUITE_ALLOWED_FILE_TYPES, allowedTrackTypes=cls.GSUITE_ALLOWED_TRACK_TYPES) if errorString: return errorString if choices.genome: errorString = cls.validateUserBins(choices) if errorString: return errorString return None
def validateAndReturnErrors(cls, choices): ''' Should validate the selected input parameters. If the parameters are not valid, an error text explaining the problem should be returned. The GUI then shows this text to the user (if not empty) and greys out the execute button (even if the text is empty). If all parameters are valid, the method should return None, which enables the execute button. ''' from quick.multitrack.MultiTrackCommon import getGSuiteFromGalaxyTN errorString = GeneralGuiTool._checkGSuiteFile(choices.history) if errorString: return errorString gSuite = getGSuiteFromGalaxyTN(choices.history) errorString = cls._validateGenome(choices) if errorString: return errorString errorString = GeneralGuiTool._checkGSuiteRequirements( gSuite, allowedLocations=cls.GSUITE_ALLOWED_LOCATIONS) if errorString: return errorString errorString = GeneralGuiTool._checkGSuiteTrackListSize(gSuite, minSize=1) if errorString: return errorString
def validateAndReturnErrors(cls, choices): errorString = GeneralGuiTool._checkGSuiteFile(choices.gsuite) if errorString: return errorString gSuite = getGSuiteFromGalaxyTN(choices.gsuite) errorString = GeneralGuiTool._checkGSuiteRequirements( gSuite, allowedLocations=cls.GSUITE_ALLOWED_LOCATIONS, allowedFileFormats=cls.GSUITE_ALLOWED_FILE_FORMATS, allowedTrackTypes=cls.GSUITE_ALLOWED_TRACK_TYPES) if errorString: return errorString
def validateGSuite(cls, choices): errorString = cls._checkGSuiteFile(choices.gSuite) if errorString: return errorString gSuite = getGSuiteFromGalaxyTN(choices.gSuite) errorString = GeneralGuiTool._checkGSuiteRequirements( gSuite, allowedLocations=CommonClusteringFunctions.GSUITE_ALLOWED_LOCATIONS, allowedFileFormats=CommonClusteringFunctions.GSUITE_ALLOWED_FILE_FORMATS, allowedTrackTypes=CommonClusteringFunctions.GSUITE_ALLOWED_TRACK_TYPES) if errorString: return errorString errorString = GeneralGuiTool._checkGSuiteTrackListSize(gSuite, 2) if errorString: return errorString