Changeset 1740:0ef1058694a2 in orange-bioinformatics


Ignore:
Timestamp:
04/09/13 13:22:33 (13 months ago)
Author:
Ales Erjavec <ales.erjavec@…>
Branch:
default
Message:

Try guessing the gene attribute name.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • _bioinformatics/widgets/OWKEGGPathwayBrowser.py

    r1739 r1740  
    1414from functools import partial 
    1515from collections import defaultdict 
    16 from operator import add 
     16from operator import add, itemgetter 
    1717 
    1818from PyQt4.QtGui import ( 
     
    503503                                     self.geneAttrCandidates]) 
    504504 
     505        names_lower = [v.name.lower() for v in self.geneAttrCandidates] 
     506 
     507        scores = [(name == "gene", "gene" in name) 
     508                  for name in names_lower] 
     509        imax, _ = max(enumerate(scores), key=itemgetter(1)) 
     510        self.geneAttrIndex = imax 
     511 
    505512    def UpdateListView(self): 
    506513        self.bestPValueItem = None 
Note: See TracChangeset for help on using the changeset viewer.