def max_ent(self, string): ''' score function for motifs that are found by maxent (splice acceptors and donors. like all score functions, returns nmers, locations, scores ''' # print "Pre-score Subprocess state for {}: {}".format(self.type,self.p.poll()) nmers, locations = util.generate_nmers(string, self.bounds) scores = self.call_max_ent(nmers) # print "Post-score Subprocess state for {}: {}".format(self.type, self.p.poll()) # print "\tDid we get scores? {}".format(len(scores) > 0) return {'nmers': nmers, 'locations': locations, 'scores': scores}
def generate_nmers(self, bounds): return util.generate_nmers(self.seq, bounds)