def addWriter(self, writerName, outputPath): """ Add to the computational scheme a new write element of the supplied type, set its output file path and get the element's name """ absPath = serializer.getUnixAbsPath(outputPath) return super(Scheme, self).addWriter(unicode(writerName), absPath)
def addWriter( self, writerName, outputPath ) : """ Add to the computational scheme a new write element of the supplied type, set its output file path and get the element's name """ absPath = serializer.getUnixAbsPath( outputPath ) return super( Scheme, self ).addWriter( unicode( writerName ), absPath )
def __init__( self, *args ) : argCount = len( args ) if 1 == argCount : schemeFilePath = serializer.getUnixAbsPath( args[0] ) super( Scheme, self ).__init__( unicode( schemeFilePath ) ) elif 1 < argCount : algorithmName = args[0] inputData = self._serializer.bioListToString( args[1], True ) outputData = self._serializer.createTmpFileAndGetItsPath( ) if 3 == argCount : outputData = serializer.getUnixAbsPath( args[2] ) elif 3 < argCount : raise TypeError( 'expected 3 or less arguments' ) super( Scheme, self ).__init__( unicode( algorithmName ), unicode( inputData ), unicode( outputData ) ) else : super( Scheme, self ).__init__( )
def __init__(self, *args): argCount = len(args) if 1 == argCount: schemeFilePath = serializer.getUnixAbsPath(args[0]) super(Scheme, self).__init__(unicode(schemeFilePath)) elif 1 < argCount: algorithmName = args[0] inputData = self._serializer.bioListToString(args[1], True) outputData = self._serializer.createTmpFileAndGetItsPath() if 3 == argCount: outputData = serializer.getUnixAbsPath(args[2]) elif 3 < argCount: raise TypeError('expected 3 or less arguments') super(Scheme, self).__init__(unicode(algorithmName), unicode(inputData), unicode(outputData)) else: super(Scheme, self).__init__()
def launchSas( *args ) : """ Create and run the Single Algorithm Scheme synchronously by the Workflow Designer """ tempSerializer = serializer.Serializer( ) argumentCount = len( args ) if not 2 <= argumentCount <= 3 : raise RuntimeError( 'expected 2 or 3 arguments' ) algorithmName = args[0] outputString = unicode( '' ) if 2 == argumentCount : outputString = tempSerializer.createTmpFileAndGetItsPath( ) elif 3 == argumentCount : outputString = serializer.getUnixAbsPath( args[2] ) inputString = tempSerializer.bioListToString( args[1], True ) resultList = u2py_internals.Scheme.launchSas( unicode( algorithmName ), inputString, outputString ) if 2 == argumentCount : resultList = tempSerializer.stringListToBioList( resultList ) tempSerializer.cleanUp( ) return resultList
def launchSas(*args): """ Create and run the Single Algorithm Scheme synchronously by the Workflow Designer """ tempSerializer = serializer.Serializer() argumentCount = len(args) if not 2 <= argumentCount <= 3: raise RuntimeError('expected 2 or 3 arguments') algorithmName = args[0] outputString = unicode('') if 2 == argumentCount: outputString = tempSerializer.createTmpFileAndGetItsPath() elif 3 == argumentCount: outputString = serializer.getUnixAbsPath(args[2]) inputString = tempSerializer.bioListToString(args[1], True) resultList = u2py_internals.Scheme.launchSas(unicode(algorithmName), inputString, outputString) if 2 == argumentCount: resultList = tempSerializer.stringListToBioList(resultList) tempSerializer.cleanUp() return resultList
def initContext(workingDirectory): return u2py_internals.initContext( serializer.getUnixAbsPath(workingDirectory))
def initContext( workingDirectory ) : return u2py_internals.initContext( serializer.getUnixAbsPath( workingDirectory ) )