Example #1
0
def startApp(dataFrame, datapath, filename, pulse, varLab, fsize=None, size=None):
    app = wx.App()
    screenSize = wx.DisplaySize()
    if size is None:
        size = 1.0*float(screenSize[0])/1600.0
        fsize = 1.0*float(screenSize[0])/1600.0
        print "detected screen resolution as " + str(screenSize[0]) + "; setting size=fsize="+str(round(size,2))+", these can be changed at bottom of masse.py if desired."
    vizLib.setRcs(scale=size*12, tickScale=0.5*size, axisLineWidth=1)
    axisFont = {'titlesize' : size*12*1.2,
                'labelsize' : size*12*1.25}
    matplotlib.rc('axes', **axisFont)

    app.frame = MasseFrame(dataFrame, datapath, filename, pulse=pulse, varLab=varLab, fsize=fsize, size=size)
    app.frame.Show()
    app.MainLoop()    
    barax.set_xticklabels([i[4:] for i in names], rotation='vertical', horizontalalignment='center', verticalalignment='top')

    barax.set_ylabel('fit pool size (P)')
    barax.tick_params(axis='y', direction='out')
    barax.tick_params(axis='x', direction='out')
    barax.xaxis.tick_bottom()
    barax.yaxis.tick_left()
    barax.legend((rects1[0], rects2[0]), (title1, title2))
    barax.set_title(figname.split('.')[0])
    bar.tight_layout()
    pylab.savefig(figname)
    return bar

##################Initialize Varibles###########################    
if __name__ == "__main__":
    vizLib.setRcs(scale=12)
    SmallSubunit = ['BSubS02', 'BSubS03', 'BSubS04', 'BSubS05', 'BSubS06', 'BSubS07', 'BSubS08', 'BSubS09', 'BSubS10',
                    'BSubS11', 'BSubS12', 'BSubS13', 'BSubS14', 'BSubS15', 'BSubS16', 'BSubS17', 'BSubS18', 'BSubS20']

    LargeSubunit = ['BSubL01', 'BSubL02', 'BSubL03', 'BSubL04', 'BSubL05', 'BSubL06', 'BSubL10', 'BSubL11',
                    'BSubL12', 'BSubL13', 'BSubL14', 'BSubL15', 'BSubL16', 'BSubL17', 'BSubL18', 'BSubL19', 'BSubL20', 'BSubL21',
                    'BSubL22', 'BSubL23', 'BSubL24', 'BSubL27', 'BSubL28', 'BSubL29', 'BSubL30', 'BSubL31a', 'BSubL32',
                    'BSubL33a', 'BSubL35', 'BSubL36']

    AllSubunits = LargeSubunit + SmallSubunit
    
    path = '/home/jhdavis/data/2013_05_28-MSUPulse/filtered/'

    reds = ['#fee5d9', '#fcbba1', '#fc9272', '#fb6a4a', '#de2d26', '#a50f15']
    blues = ['#eff3ff', '#c6dbef', '#93cae1', '#6baed6', '#3182bd', '#08519c']
    '''
        colors = [pylab.cm.jet(float(i)/float(len(filesToPlot))) for i in range(len(filesToPlot))]

    correctedDFsDict = qMS.correctListOfFiles(refSet, filesToPlot)
    correctedStats = qMS.multiStatsDictFromDF(correctedDFsDict, num, den, 
                                              namesList=None, normalization=normalization, 
                                              offset=offset, normProtein=normProtein)
    namesList = [[filesToPlot[i], plotNames[i]] for i in range(0, len(plotNames))]
    
    plotDataSetsStatsDictDict(correctedStats, yLabel, subunits=subunits, saveName=saveName,
                   yMax=yMax, median=median, namesList=namesList, colors=colors,
                   figSize=figSize, markerSize=markerSize, noFill=noFill, mew=mew,
                   legendLoc=legendLoc, legendCols=legendcols, title=title, legend=legend)

##################Initialize Varibles###########################    
if __name__ == "__main__":
    vizLib.setRcs(scale=15, legendScale=15)
    
    rootPath = '/home/jhdavis/data/2013_08_08-JStokesESITOFAnalysis/'    
    
    filesRefSet = qMS.sort_nicely([i for i in glob.glob(rootPath+'refSets/*.csv')])
    filesStdCurve = qMS.sort_nicely([i for i in glob.glob(rootPath+'stdCurve/*.csv')])
    filesWTGrad = qMS.sort_nicely([i for i in glob.glob(rootPath+'wtGradient/*.csv')])
    files1hrGrad = qMS.sort_nicely([i for i in glob.glob(rootPath+'1hrGradient/*.csv')])
    files6hrGrad = qMS.sort_nicely([i for i in glob.glob(rootPath+'6hrGradient/*.csv')])

    '''
    print [i.split('/')[-1] for i in filesRefSet]
    print [i.split('/')[-1] for i in filesStdCurve]
    print [i.split('/')[-1] for i in filesWTGrad]
    print [i.split('/')[-1] for i in files1hrGrad]
    print [i.split('/')[-1] for i in files6hrGrad]