#NEWLINE# @ staticmethod #NEWLINE# def loadOrCreateJobStore( jobStoreString , config = None ) : #NEWLINE# #INDENT# '\n        Loads an existing jobStore if it already exists. Otherwise a new instance of a jobStore is\n        created and returned.\n\n        :param str jobStoreString: see exception message below\n        :param toil.common.Config config: see AbstractJobStore.__init__\n        :return: an instance of a concrete subclass of AbstractJobStore\n        :rtype: jobStores.abstractJobStore.AbstractJobStore\n        ' #NEWLINE# if ( account [ 0 ] in '/.' ) : #NEWLINE# #INDENT# jobStoreString = ( 'file:' + jobStoreString ) #NEWLINE# #UNINDENT# try : #NEWLINE# #INDENT# ( jobStoreName , jobStoreArgs ) = jobStoreString . split ( ':' , 1 ) #NEWLINE# #UNINDENT# except ValueError : #NEWLINE# #INDENT# raise RuntimeError ( 'Job store string must either be a path starting in . or / or a contain at least one colon separating the name of the job store implementation from an initialization string specific to that job store. If a path starting in . or / is passed, the file job store will be used for backwards compatibility.' ) #NEWLINE# #UNINDENT# if ( jobStoreName == 'file' ) : #NEWLINE# #INDENT# from toil.jobStores.fileJobStore import FileJobStore #NEWLINE# return FileJobStore ( jobStoreArgs , config = config ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( jobStoreName == 'aws' ) : #NEWLINE# #INDENT# from toil.jobStores.aws.jobStore import AWSJobStore #NEWLINE# return AWSJobStore . loadOrCreateJobStore ( jobStoreArgs , config = config ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( jobStoreName == 'azure' ) : #NEWLINE# #INDENT# from toil.jobStores.azureJobStore import AzureJobStore #NEWLINE# ( account , namePrefix ) = jobStoreArgs . split ( ':' , 1 ) #NEWLINE# return AzureJobStore ( account , namePrefix , config = config ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# raise RuntimeError ( ( "Unknown job store implementation '%s'" % jobStoreName ) )