1. biolab
  2. Untitled project
  3. orange-bioinformatics

Commits

Marko Toplak  committed 0d18fa2 Merge

Merge.

  • Participants
  • Parent commits 38e8e32, 29931e1
  • Branches default

Comments (0)

Files changed (3)

File orangecontrib/bio/widgets/OWGeneInfo.py

View file
  • Ignore whitespace
         self.cells = []
         self.row2geneinfo = {}
         self.data = None
-        self.currentLoaded = None, None
+
+        #: (# input genes, # matches genes)
+        self.matchedInfo = 0, 0
         self.selectionUpdateInProgress = False
 
         self.setBlocking(True)
         self.warning(1)
         org = self.organisms[min(self.organismIndex, len(self.organisms) - 1)]
         source_name, info_getter = self.infoSource()
-        info, currorg = self.currentLoaded
+
         self.error(0)
 
         self.updateDictyExpressLink(genes, show=org == "352472")
             self.itemsfuture = None
 
         self.geneinfo = geneinfo = list(zip(self.genes, geneinfo))
-
         self.cells = cells = []
         self.row2geneinfo = {}
         links = []
     def sendReport(self):
         from Orange.OrangeWidgets import OWReport
         genes, matched = self.matchedInfo
-        info, org = self.currentLoaded
-        self.reportRaw("<p>Input: %i genes of which %i (%.1f%%) matched NCBI synonyms<br>Organism: %s<br>Filter: %s</p>" % (genes, matched, 100.0 * matched / genes, obiTaxonomy.name(org), self.searchString))
-        self.reportSubsection("Gene list")
-        self.reportRaw(reportItemView(self.treeWidget))
-        
+
+        if self.organisms:
+            org = self.organisms[min(self.organismIndex,
+                                     len(self.organisms) - 1)]
+            org_name = obiTaxonomy.name(org)
+        else:
+            org = None
+            org_name = None
+        if self.data is not None:
+            self.reportRaw(
+                "<p>Input: %i genes of which %i (%.1f%%) matched NCBI synonyms"
+                "<br>"
+                "Organism: %s"
+                "<br>"
+                "Filter: %s"
+                "</p>" % (genes, matched, 100.0 * matched / genes, org_name,
+                          self.searchString)
+            )
+            self.reportSubsection("Gene list")
+            self.reportRaw(reportItemView(self.treeWidget))
+        else:
+            self.reportRaw("<p>No input</p>")
+
     def updateDictyExpressLink(self, genes, show=False):
         def fix(ddb):
             if ddb.startswith("DDB"): 

File orangecontrib/bio/widgets/OWSelectGenes.py

View file
  • Ignore whitespace
         self.gsview.setAlternatingRowColors(True)
         self.gsview.setRootIsDecorated(False)
         self.gsview.setSelectionMode(QTreeView.ExtendedSelection)
+        self.gsview.setSortingEnabled(True)
+        self.gsview.setUniformRowHeights(True)
         self.proxymodel = QSortFilterProxyModel(
             filterKeyColumn=1, sortCaseSensitivity=Qt.CaseInsensitive
         )
 
 def sets_to_model(gsets):
     model = QStandardItemModel()
-    model.setHorizontalHeaderLabels(["Category", "Name"])
+    model.setHorizontalHeaderLabels(["Category", "Name", "#"])
 
     for (hier, tid), sets in gsets:
         for gset in sets:
             name.setData(gset, Qt.UserRole)
             name.setEditable(False)
             name.setToolTip(tooltip)
-            model.appendRow([category, name])
+            count = QStandardItem()
+            count.setData(ngenes, Qt.DisplayRole)
+            count.setToolTip(tooltip)
+            model.appendRow([category, name, count])
 
     return model
 

File setup.py

View file
  • Ignore whitespace
 NAME = 'Orange-Bioinformatics'
 DOCUMENTATION_NAME = 'Orange Bioinformatics'
 
-VERSION = '2.5.22'
+VERSION = '2.5.23'
 
 DESCRIPTION = 'Orange Bioinformatics add-on for Orange data mining software package.'
 LONG_DESCRIPTION = open(os.path.join(os.path.dirname(__file__), 'README.rst')).read()