Changeset 1711:643d37885055 in orangebioinformatics for _bioinformatics/obiGsea.py
 Timestamp:
 08/17/12 15:36:10 (20 months ago)
 Branch:
 default
 rebase_source:
 89e6b1f907eeaa5970e4e1b4ce03b3fc8ef6995e
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

_bioinformatics/obiGsea.py
r1706 r1711 47 47 """ 48 48 ordered = [ (i,a) for i,a in enumerate(lcor) ] #original pos + correlation 49 ordered.sort( lambda x,y: cmp(y[1],x[1])) #sort by correlation, descending49 ordered.sort(key=lambda x: x[1]) #sort by correlation, descending 50 50 ordered = nth(ordered, 0) #contains positions in the original list 51 51 return ordered … … 77 77 notInA = (1. / (len(lcor)len(subset))) 78 78 #base for addition if gene is in the subset 79 cors = [ abs(lcor[i])**p for i in subset ] 79 80 cors = [ abs(lcor[i])**p for i in subset ] #belowe in numpy 80 81 sumcors = sum(cors) 81 82
Note: See TracChangeset
for help on using the changeset viewer.