def mainB(): import numpy as N # import pylab as P import scipy as S import sys from PyQt4 import QtGui, QtCore from mpl_pyqt4_widget import MPL_Widget app = QtGui.QApplication(sys.argv) w = MPL_Widget(enableAutoScale=False, doublePlot=True, enableEdit=True) #seq = 'ANTHRACISAMES' seq = 'ANTHRACISSTERNE' #X = P.load('amesPredicted.csv', delimiter = ',') X = N.loadtxt('sternePredicted.csv', delimiter=',') Y = S.rand(len(X)) Y *= 10 randInt = [] for i in xrange(int(0.25 * len(X))): ind = N.random.random_integers(len(Y) - 1) Y[ind] = N.random.random_integers(10) * 10 Y /= Y.max() Y *= 100 # X = N.array(X, dtype = N.float)#conver to array with dtype set or it will default to string types # Y = N.array(Y, dtype = N.float) # print type(X), type(Y) pepFrag(seq, X, Y, w.canvas, plotSpec=False) w.show() sys.exit(app.exec_())
def mainB(): import numpy as N # import pylab as P import scipy as S import sys from PyQt4 import QtGui, QtCore from mpl_pyqt4_widget import MPL_Widget app = QtGui.QApplication(sys.argv) w = MPL_Widget(enableAutoScale = False, doublePlot = True, enableEdit = True) #seq = 'ANTHRACISAMES' seq = 'ANTHRACISSTERNE' #X = P.load('amesPredicted.csv', delimiter = ',') X = N.loadtxt('sternePredicted.csv', delimiter = ',') Y = S.rand(len(X)) Y*=10 randInt = [] for i in xrange(int(0.25*len(X))): ind = N.random.random_integers(len(Y)-1) Y[ind] = N.random.random_integers(10)*10 Y/=Y.max() Y*=100 # X = N.array(X, dtype = N.float)#conver to array with dtype set or it will default to string types # Y = N.array(Y, dtype = N.float) # print type(X), type(Y) pepFrag(seq, X, Y, w.canvas, plotSpec = False) w.show() sys.exit(app.exec_())
def mainA(): import numpy as N import pylab as P import sys from PyQt4 import QtGui, QtCore from mpl_pyqt4_widget import MPL_Widget import xtandem_parser_class as XTParser app = QtGui.QApplication(sys.argv) XT = XTParser.XT_RESULTS('../XTTest.xml') selInd = XT.dataDict['pep_eVal'].argsort() firstInd = selInd[0] secondInd = selInd[1] topInd = selInd[30:33] w = MPL_Widget(enableAutoScale=False, doublePlot=True, enableEdit=True) ind = 53 # for ind in topInd: # print XT.dataDict['pep_eVal'][ind] seq = XT.dataDict['pepID'][ind] X = XT.dataDict['xFrags'][ind] Y = XT.dataDict['yFrags'][ind] X = X.split() Y = Y.split() # print type(X), type(Y) X = N.array( X, dtype=N.float ) #conver to array with dtype set or it will default to string types Y = N.array(Y, dtype=N.float) # print type(X), type(Y) pepFrag(seq, X, Y, w.canvas) w.show() sys.exit(app.exec_())
def mainA(): import numpy as N import pylab as P import sys from PyQt4 import QtGui, QtCore from mpl_pyqt4_widget import MPL_Widget import xtandem_parser_class as XTParser app = QtGui.QApplication(sys.argv) XT = XTParser.XT_RESULTS('../XTTest.xml') selInd = XT.dataDict['pep_eVal'].argsort() firstInd = selInd[0] secondInd = selInd[1] topInd = selInd[30:33] w = MPL_Widget(enableAutoScale = False, doublePlot = True, enableEdit = True) ind = 53 # for ind in topInd: # print XT.dataDict['pep_eVal'][ind] seq = XT.dataDict['pepID'][ind] X = XT.dataDict['xFrags'][ind] Y = XT.dataDict['yFrags'][ind] X = X.split() Y = Y.split() # print type(X), type(Y) X = N.array(X, dtype = N.float)#conver to array with dtype set or it will default to string types Y = N.array(Y, dtype = N.float) # print type(X), type(Y) pepFrag(seq, X, Y, w.canvas) w.show() sys.exit(app.exec_())