# Running in multi-thread start = time.time() experimentFolders = monet.listDirectoriesInPath(path) Parallel(n_jobs=4)(delayed(monet.loadFolderAndWriteFactorialCSV)( experimentString=folder, path=path, aggregationDictionary=aggregationDictionary, ratiosDictionary=ratiosDictionary) for folder in experimentFolders) end = time.time() print(end - start) ############################################################################### # Load and Compile CSVs into one ############################################################################### outFilename = "A_" + filename + ".csv" monet.compileFactorialCSVFromFiles(path, outFilename) ############################################################################### # Load compiled CSV and analyze the output ############################################################################### path = "/Users/sanchez.hmsc/Desktop/ThresholdDependent/" centralFile = "50TX_1x_2018_09_01.csv" sensitivitySelector = 1 if (sensitivitySelector == 1): # 001 larval life decrease # 002 larval life increase title = "Larval Lifespan" testFileA = "TSA_001.csv" testFileB = "TSA_002.csv" if (sensitivitySelector == 2): # 010 adult life increase
# Factorial Experiment Example ############################################################################### dataType = float filename = 'WRYK' #path = "/Users/sanchez.hmsc/Desktop/" + filename + "/" path = "/Volumes/marshallShare/ThresholdResub/factorialSweep/" experiment = "WolbachiaRemediation/ANALYZED/" wildsList = [1, 1, 2, 2, 3, 3, 4, 5, 6, 1, 1, 2, 4, 4, 5, 7, 7, 8] homingList = [4, 5, 6, 7, 7, 8, 8, 9, 9, 2, 3, 3, 5, 6, 6, 8, 9, 9] aggregationDictionary = monet.generateAggregationDictionary( ["W", "H"], [[x - 1 for x in wildsList], [x - 1 for x in homingList]]) ratiosDictionary = {"numerator": [1], "denominator": [0, 1]} ############################################################################### # Export Individual CSVs for Factorial Slots ############################################################################### start = time.time() experimentFolders = sorted(monet.listDirectoriesInPath(path + experiment)) Parallel(n_jobs=4)(delayed(monet.loadFolderAndWriteFactorialCSV)( experimentString=folder, path=path + experiment, aggregationDictionary=aggregationDictionary, ratiosDictionary=ratiosDictionary) for folder in experimentFolders) end = time.time() print((end - start) / 60) ############################################################################### # Load and Compile CSVs into one ############################################################################### outFilename = filename + ".csv" monet.compileFactorialCSVFromFiles(path + experiment, outFilename)