Changeset 1878:8b1e95b04793 in orange-bioinformatics


Ignore:
Timestamp:
10/09/13 15:36:14 (6 months ago)
Author:
Ales Erjavec <ales.erjavec@…>
Branch:
default
Parents:
1877:2a17616eb737 (diff), 1870:8993be909b62 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merged biolab/orange-bioinformatics into default

Files:
4 edited

Legend:

Unmodified
Added
Removed
  • orangecontrib/bio/widgets/OWHeatMap.py

    r1874 r1878  
    625625    def handleNewSignals(self): 
    626626        self.send('Examples', None) 
    627         self.error(0) 
    628627        if self.data: 
    629             if self.data.domain.has_discrete_attributes():  
    630                 self.error(0, "Data contains discrete attributes") 
    631             elif len(self.data.domain.features) == 1: 
    632                 self.error(0, "Cannot construct heatmap with only a single feature") 
    633             else: 
    634                 self.update_heatmaps() 
     628            self.update_heatmaps() 
    635629        else: 
    636630            self.clear() 
     
    12451239        if self.sorted_data: 
    12461240            if self.selected_rows: 
    1247                 examples = [self.sorted_data[i] for i in self.selected_rows] 
     1241                #bug if merge is used does not return enough genes 
     1242                #examples = [self.sorted_data[i] for i in self.selected_rows] 
     1243 
     1244                #uses Merge parameter, but does not work correctly for data with multiple classes 
     1245                examples = [self.sorted_data[i*self.Merge+j] for i in self.selected_rows for j in range(self.Merge) if i*self.Merge+j < len(self.sorted_data)] 
     1246 
    12481247                data = orange.ExampleTable(examples) 
    12491248            else: 
  • orangecontrib/bio/widgets/OWSetEnrichment.py

    r1877 r1878  
    8383    contextHandlers = {"":DomainContextHandler("", ["speciesIndex", "genesinrows", "geneattr", "categoriesCheckState"])} 
    8484 
     85    def refreshHierarchy(self): 
     86        self.setHierarchy(*self.getHierarchy(taxid=self.taxid_list[self.speciesIndex])) 
     87 
    8588    def __init__(self, parent=None, signalManager=None, name="Gene Set Enrichment Analysis", **kwargs): 
    8689        OWWidget.__init__(self, parent, signalManager, name, **kwargs) 
     
    114117        self.speciesComboBox = OWGUI.comboBox(self.controlArea, self, 
    115118                      "speciesIndex", "Species", 
    116                       callback=lambda: self.data and self.updateAnnotations(), 
     119                      callback=lambda: (self.refreshHierarchy(), self.data and self.updateAnnotations()), 
    117120                      debuggingEnabled=0) 
    118121 
     
    261264 
    262265            self.openContext("", data) 
    263  
    264 #            print self.speciesIndex 
    265  
    266             self.setHierarchy(*self.getHierarchy(taxid=self.taxid_list[self.speciesIndex])) 
     266         
     267            self.refreshHierarchy() 
    267268 
    268269            self.loadedGenematcher = "None" 
     
    304305                fill(value, item, full_cat, org=org) 
    305306 
     307        self.groupsWidget.clear() 
    306308        fill(hierarchy[1], self.groupsWidget, org=hierarchy[0]) 
    307309        fill(hierarchy_noorg[1], self.groupsWidget, org=hierarchy_noorg[0]) 
     
    332334        self.categoriesCheckState = self.getHierarchyCheckState() 
    333335        categories = self.selectedCategories() 
     336         
    334337        if not set(categories) <= set(self.currentAnnotatedCategories): 
    335338            self.updateAnnotations() 
    336339        else: 
    337340            self.filterAnnotationsChartView() 
     341         
    338342 
    339343    def updateGeneMatcherSettings(self): 
     
    483487                item.setData(3, Qt.DisplayRole, QVariant(refFmt % (len(rmapped), 100.0*len(rmapped)/len(referenceGenes)))) 
    484488                item.setData(4, Qt.DisplayRole, QVariant("%0.6f" % p_val)) if p_val > 0.001 else item.setData(4, Qt.DisplayRole, QVariant("%0.2e" % p_val)) 
    485                 item.setData(4, 42, QVariant(p_val)) 
    486                 #stoplec 4 - zelim sort po p_val 
     489                item.setData(4, 42, QVariant(p_val)) #sorting 
    487490                item.setData(4, Qt.ToolTipRole, QVariant("%0.10f" % p_val)) 
    488491                item.setData(5, Qt.DisplayRole, QVariant(enrichment)) 
     
    520523            return 
    521524        categories = set(" ".join(cat) for cat, taxid in self.selectedCategories()) 
     525 
     526        #compute FDR after selection categories 
     527     
    522528        filterString = str(self.filterLineEdit.text()).lower() 
    523529        itemsHidden = [] 
     
    603609    app = QApplication(sys.argv) 
    604610    w = OWSetEnrichment() 
    605     w.updateHierarchy() 
    606611    data = orange.ExampleTable("yeast-class-RPR.tab") 
     612    #data = orange.ExampleTable("/home/marko/Downloads/tmp.tab") 
    607613#    data = orange.ExampleTable("../human") 
    608614#    print cProfile.runctx("w.setData(data)", globals(), locals()) 
  • setup.py

    r1868 r1878  
    6060    exclude = ('*.tests', '*.tests.*', 'tests.*', 'tests'), 
    6161) 
    62   
     62 
    6363PACKAGE_DATA = { 
    6464} 
     65 
     66# Backwards compatibility stub. Should be removed by the 2.7 release. 
     67PY_MODULES = ["_bioinformatics"] 
    6568 
    6669SETUP_REQUIRES = ( 
     
    104107ENTRY_POINTS = { 
    105108    'orange.addons': ( 
    106         'bio = _bioinformatics', 
     109        'bio = orangecontrib.bio', 
    107110    ), 
    108111    'orange.widgets': ( 
    109         'Bioinformatics = _bioinformatics.widgets', 
     112        'Bioinformatics = orangecontrib.bio.widgets', 
    110113        # This should be unneeded, because module given should load (register) 
    111114        # all wanted widgets and prototypes should just have a flag, but for now ... 
    112         'Prototypes = _bioinformatics.widgets.prototypes', 
     115        'Prototypes = orangecontrib.bio.widgets.prototypes', 
    113116    ), 
    114117    'orange.canvas.help': ( 
    115         'intersphinx = _bioinformatics.widgets:intersphinx' 
     118        'intersphinx = orangecontrib.bio.widgets:intersphinx' 
    116119    ) 
    117120} 
     
    132135        packages = PACKAGES, 
    133136        package_data = PACKAGE_DATA, 
     137        py_modules = PY_MODULES, 
    134138        setup_requires = SETUP_REQUIRES, 
    135139        install_requires = INSTALL_REQUIRES, 
  • setup.py

    r1877 r1878  
    1616DOCUMENTATION_NAME = 'Orange Bioinformatics' 
    1717 
    18 VERSION = '2.5a10' 
     18VERSION = '2.5a13' 
    1919 
    2020DESCRIPTION = 'Orange Bioinformatics add-on for Orange data mining software package.' 
Note: See TracChangeset for help on using the changeset viewer.