def makeColourProfile(self): """Make a colour profile based on ksig information""" working_data = np_array(self.kmerSigs, copy=True) Center(working_data,verbose=0) p = PCA(working_data) components = p.pc() # now make the colour profile based on PC1 self.kmerVals = np_array([float(i) for i in components[:,0]]) # normalise to fit between 0 and 1 self.kmerVals -= np_min(self.kmerVals) self.kmerVals /= np_max(self.kmerVals) if(False): plt.figure(1) plt.subplot(111) plt.plot(components[:,0], components[:,1], 'r.') plt.show()