Changeset 1466:bd6e601b8d25 in orange-bioinformatics


Ignore:
Timestamp:
07/25/11 10:34:45 (3 years ago)
Author:
lanz <lan.zagar@…>
Branch:
default
Convert:
ce74cde3600135d2578949af961eca81b21edf4b
Message:

Corrected indices bug and separated labels of additional samples.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • obiDifscale.py

    r1464 r1466  
    202202            attr_set[a.attributes['time']] = attr_set.get(a.attributes['time'], []) + [a.name] 
    203203        scores = AREA(self.data, sorted(attr_set.items())) 
    204         return zip(self.keys, map(itemgetter(1), scores)) 
     204        gene2ind = dict((g, i) for i,g in enumerate(ex['gene'].value for ex in self.data)) 
     205        return [(gene2ind[g], s) for g, s in scores] 
    205206 
    206207def FC(data, attr_set, control='t0', thr=2, auto=False, p_thr=0.2): 
     
    278279    tdata1 = obiGEO.transpose(data1) 
    279280    if data2: 
    280         labels2 = list(a.attributes['time'] for a in data2.domain.attributes) 
     281        labels2 = list('[%s]' % a.attributes['time'] for a in data2.domain.attributes) 
    281282        tdata2 = obiGEO.transpose(data2) 
    282283        tdata1, tdata2 = common_domain(tdata1, tdata2) 
Note: See TracChangeset for help on using the changeset viewer.