def box_plot(self, iFile, xLabel): pp = PyPlot() inFile = open(iFile) head = inFile.readline() for line in inFile: line = line.strip() fields = line.split("\t") pp.filename = iFile + "." + fields[0] + ".pdf" group1 = [int(x) for x in fields[-8:-4]] group2 = [int(x) for x in fields[-4:]] pp.box_plot([group1, group2], [xLabel[0] + ":" + fields[0], xLabel[1] + ":" + fields[0]]) inFile.close()
def __legacy_box_plot(self, iFileList, filename, xLabel=0, yLabel=0): pp = PyPlot(filename) aList = [] for item in iFileList: L = list() for it in item: row = 0 inFile = open(it) for line in inFile: row += 1 inFile.close() L.append(row) aList.append(L) pp.box_plot(aList, xLabel)
def box_plot(self, iFile, xLabel): pp = PyPlot() inFile = open(iFile) head = inFile.readline() for line in inFile: line = line.strip() fields = line.split('\t') pp.filename = iFile + '.' + fields[0] + '.pdf' group1 = [int(x) for x in fields[-8:-4]] group2 = [int(x) for x in fields[-4:]] pp.box_plot( [group1, group2], [xLabel[0] + ':' + fields[0], xLabel[1] + ':' + fields[0]]) inFile.close()