DataPipeline/Testing.py
def multiFolderTest():
    """Handling of multiple folders in a hierarchy with replicates"""
    p = Pipeline()
    conf = {'format':'databycolumn','groupbyname':1,'parsenamesindex':0, 'parsemethod':'numeric',
            'replicates':1, #'saveplots':1,
            'model1':'linear','variable1':'a','model2':'sigmoid','variable2':'tm'}
    p.createConfig('temp.conf',**conf)
    path = 'testfiles/multifolders'
    Utilities.createDirectory(path)
    phs = range(2,10)
    reps = range(1,4)   #replicates
    names = Utilities.createRandomStrings(3,6)
    today = str(datetime.date.today())
    for i in phs:
        #sigmoid dependence of the slopes on 'ph'
        #so we know we are getting the right results
        val = 1/(1+exp((i-4)/1.04))
        folder = os.path.join(path,'ph'+str(i))
        Utilities.createDirectory(folder)
        for r in reps:
            fname = os.path.join(folder,'r'+str(r)+'_'+today+'.txt')
            Utilities.createTempData(fname, names, val)
    p.addFolder(path)
    p.run()
    return
Handling of multiple folders in a hierarchy with replicates
Handling of multiple folders in a hierarchy with replicates
Handling of multiple folders in a hierarchy with replicates
def multiFolderTest():
    p = Pipeline()
    conf = {'format':'databycolumn','groupbyname':1,'parsenamesindex':0, 'parsemethod':'numeric',
            'replicates':1, 
            'model1':'linear','variable1':'a','model2':'sigmoid','variable2':'tm'}
    p.createConfig('temp.conf',**conf)
    path = 'testfiles/multifolders'
    Utilities.createDirectory(path)
    phs = range(2,10)
    reps = range(1,4)   
    names = Utilities.createRandomStrings(3,6)
    today = str(datetime.date.today())
    for i in phs:
        val = 1/(1+exp((i-4)/1.04))
        folder = os.path.join(path,'ph'+str(i))
        Utilities.createDirectory(folder)
        for r in reps:
            fname = os.path.join(folder,'r'+str(r)+'_'+today+'.txt')
            Utilities.createTempData(fname, names, val)
    p.addFolder(path)
    p.run()
    return
def multiFolderTest ( ) : p = Pipeline ( ) conf = { 'format' : 'databycolumn' , 'groupbyname' : 1 , 'parsenamesindex' : 0 , 'parsemethod' : 'numeric' , 'replicates' : 1 , 'model1' : 'linear' , 'variable1' : 'a' , 'model2' : 'sigmoid' , 'variable2' : 'tm' } p . createConfig ( 'temp.conf' , ** conf ) path = 'testfiles/multifolders' Utilities . createDirectory ( path ) phs = range ( 2 , 10 ) reps = range ( 1 , 4 ) names = Utilities . createRandomStrings ( 3 , 6 ) today = str ( datetime . date . today ( ) ) for i in phs : val = 1 / ( 1 + exp ( ( i - 4 ) / 1.04 ) ) folder = os . path . join ( path , 'ph' + str ( i ) ) Utilities . createDirectory ( folder ) for r in reps : fname = os . path . join ( folder , 'r' + str ( r ) + '_' + today + '.txt' ) Utilities . createTempData ( fname , names , val ) p . addFolder ( path ) p . run ( ) return
Handling of multiple folders in a hierarchy with replicates
Handling of multiple folders in a hierarchy with replicates
"""Handling of multiple folders in a hierarchy with replicates""" #'saveplots':1, #replicates #sigmoid dependence of the slopes on 'ph' #so we know we are getting the right results