Lan Zagar avatar Lan Zagar committed bd6e601

Corrected indices bug and separated labels of additional samples.

Comments (0)

Files changed (1)

         for a in self.data.domain.attributes:
             attr_set[a.attributes['time']] = attr_set.get(a.attributes['time'], []) + [a.name]
         scores = AREA(self.data, sorted(attr_set.items()))
-        return zip(self.keys, map(itemgetter(1), scores))
+        gene2ind = dict((g, i) for i,g in enumerate(ex['gene'].value for ex in self.data))
+        return [(gene2ind[g], s) for g, s in scores]
 
 def FC(data, attr_set, control='t0', thr=2, auto=False, p_thr=0.2):
     """ Gene filtering based on the number of FC of all time points with the control series > thr """
     labels1 = list(a.attributes['time'] for a in data1.domain.attributes)
     tdata1 = obiGEO.transpose(data1)
     if data2:
-        labels2 = list(a.attributes['time'] for a in data2.domain.attributes)
+        labels2 = list('[%s]' % a.attributes['time'] for a in data2.domain.attributes)
         tdata2 = obiGEO.transpose(data2)
         tdata1, tdata2 = common_domain(tdata1, tdata2)
         classifier = signed_PCA(tdata1)
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.