コード例 #1
0
ファイル: u2py.py プロジェクト: r-barnes/sw_comparison
 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)
コード例 #2
0
ファイル: u2py.py プロジェクト: ggrekhov/ugene
 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 )
コード例 #3
0
ファイル: u2py.py プロジェクト: ggrekhov/ugene
 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__( )
コード例 #4
0
ファイル: u2py.py プロジェクト: r-barnes/sw_comparison
 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__()
コード例 #5
0
ファイル: u2py.py プロジェクト: ggrekhov/ugene
 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
コード例 #6
0
ファイル: u2py.py プロジェクト: r-barnes/sw_comparison
 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
コード例 #7
0
ファイル: u2py.py プロジェクト: r-barnes/sw_comparison
def initContext(workingDirectory):
    return u2py_internals.initContext(
        serializer.getUnixAbsPath(workingDirectory))
コード例 #8
0
ファイル: u2py.py プロジェクト: ggrekhov/ugene
def initContext( workingDirectory ) :
    return u2py_internals.initContext( serializer.getUnixAbsPath( workingDirectory ) )