Exemplo n.º 1
0
pltParamList = ['trackNum', 'trackDurMed', 
                'disTot', 'speed',
                'straightness', 'gti',
                ]

baseDir = '/media/aman/data/flyWalk_data/climbingData/climbingData_20181201/csvDir/'
fig = 'fig5'
figList = ['fig2', 'fig3', 'fig4', 'fig5']
#dfLbls = ['paramVal','genotype']
#frmla = dfLbls[0]+'~'+dfLbls[1]
csvExt = ['*trackStats*.csv']
figDataFName = baseDir+'figDataFiles.txt'
figFoldersList = bfTrkStats.readFigFolderFile(figDataFName, figList)
csvDirs = bf.getDirList(baseDir)
currTime = bf.present_time()
print ("=============== Processing for all genotypes =============")
#grpLbls = ['result','timePoint','flyNumber', 'genotype']
#pMin = 0.05


#============================================================================================================

#for fig in figList:
#    statsFName = baseDir+fig+'_stats_perMin_'+currTime+'.csv'
#    figGenotypes = list(set([f.split(os.sep)[1].split('_')[-1] for f in figFoldersList[fig]]))
#    totalData  = {}
#    totalDataTmSrs = {}
#    pooledTotalData  = {}
#    pooledTotalDataTmSrs = {}
#    pltTotalData = {}
Exemplo n.º 2
0

def readFigFolderFile(figFolderFName, figFolderList):
    figFoldersDict = {}
    with open(figFolderFName, 'r') as f:
        lines = f.readlines()
    for figFold in figFolderList:
        figFoldersDict[figFold] = [line for line in lines if figFold in line]
    return figFoldersDict


#baseDir = '/media/pointgrey/data/flywalk/'
#baseDir = bf.getFolder(baseDir)
baseDir = '/media/aman/data/flyWalk_data/climbingData/climbingData_20181201/csvDir/'
fig = 'fig5'
statsFName = baseDir + fig + '_stats_Total5min_Sex_GTI_' + bf.present_time(
) + '.csv'

csvExt = ['*trackStats*.csv']
figDataFName = baseDir + 'figDataFiles.txt'
figFoldersList = readFigFolderFile(figDataFName, [fig])
figGenotypes = list(
    set([f.split(os.sep)[1].split('_')[-1] for f in figFoldersList[fig]]))

pMin = 0.05

print("=============== Processing for all genotypes =============")
csvDirs = bf.getDirList(baseDir)

totalData = {}
pooledTotalData = {}
for genotype in figGenotypes: