Commits

Aleš Erjavec committed 4a6f881

Fixed organism initialization.

  • Participants
  • Parent commits 7f7a315

Comments (0)

Files changed (2)

orangecontrib/bio/obiTaxonomy.py

     """
     Retrieve the taxonomy database if not already downloaded.
     """
-
-    try:
-        orngServerFiles.info("Taxonomy", "ncbi_taxonomy.tar.gz")
-    except IOError:
-        orngServerFiles.download("Taxonomy", "ncbi_taxonomy.tar.gz",
-                                 callback=callback, verbose=verbose)
+    orngServerFiles.localpath_download("Taxonomy", "ncbi_taxonomy.tar.gz",
+                                       callback=callback, verbose=verbose)
 
 
 from . import obiGenomicsUpdate

orangecontrib/bio/widgets/OWGeneInfo.py

                                if attr.varType in [orange.VarTypes.String,
                                                    orange.VarTypes.Discrete]]
             self.geneAttrComboBox.addItems([attr.name for attr in self.attributes])
+
+            self.taxid = data_hints.get_hint(self.data, "taxid", self.taxid)
+            self.useAttr = data_hints.get_hint(self.data, "genesinrows",  self.useAttr)
+
             self.openContext("", data)
             self.geneAttr = min(self.geneAttr, len(self.attributes) - 1)
 
-            taxid = data_hints.get_hint(self.data, "taxid", "")
-            if taxid in self.organisms:
-                self.organismIndex = self.organisms.index(taxid)
-                self.taxid = taxid
+            if self.taxid in self.organisms:
+                self.organismIndex = self.organisms.index(self.taxid)
 
             self.useAttr = data_hints.get_hint(self.data, "genesinrows",  self.useAttr)