Commits

mitar  committed 2cfa80d

Fixing some imports. Marking widgets as prototypes.

  • Participants
  • Parent commits 61aa6da

Comments (0)

Files changed (23)

File _bioinformatics/obiGO.py

         
         os.rename(filename + ".part", filename)
 
-from . from obiTaxonomy import pickled_cache
+from .obiTaxonomy import pickled_cache
 
 @pickled_cache(None, [("GO", "taxonomy.pickle"), ("Taxonomy", "ncbi_taxonomy.tar.gz")])
 def organism_name_search(name):

File _bioinformatics/obiGene.py

 
 import os, time
 
-from Orange.orng . import orngServerFiles
+from Orange.orng import orngServerFiles
 
 from . import obiTaxonomy
 

File _bioinformatics/obiGeneAtlas.py

     if name in dd:
         return dd[name]
     else:
-        import .obiTaxonomy as tax
+        from . import obiTaxonomy as tax
         ids = tax.to_taxid(name, mapTo=TAXID_TO_ORG.keys())
         if ids:
             return ids.pop()

File _bioinformatics/obiGeneSets.py

 import orange
 from Orange.orng import orngServerFiles
 
-from . import obiGeneSets, obiGO, obiKEGG, obiTaxonomy
+from . import obiGO, obiKEGG, obiTaxonomy
 
 sfdomain = "gene_sets"
 
             self.update(input)
 
     def update(self, input):
+        from . import obiGeneSets
         if isinstance(input, obiGeneSets.GeneSets):
             super(GeneSets, self).update(input)
         elif hasattr(input, "items"):
 
     def split_by_hierarchy(self):
         """ Splits gene sets by hierarchies. """
+        from . import obiGeneSets
         hd = dict((h,obiGeneSets.GeneSets()) for h in  self.hierarchies())
         for gs in self:
             hd[gs.hierarchy].add(gs)
 
 def goGeneSets(org):
     """Returns gene sets from GO."""
+    from . import obiGeneSets
 
     ontology = obiGO.Ontology()
     annotations = obiGO.Annotations(org, ontology=ontology)
     """
     Returns gene sets from KEGG pathways.
     """
-    from . import obiKEGG2 as obiKEGG
+    from . import obiKEGG2 as obiKEGG, obiGeneSets
     
     kegg = obiKEGG.KEGGOrganism(org)
 
     
     For now the description is skipped.
     """
+
+    from . import obiGeneSets
+
     def hline(s):
         tabs = [tab.strip() for tab in s.split("\t")]
         return obiGeneSets.GeneSet(id=tabs[0], description=tabs[1],
     Collection can either be a tuple (hierarchy, orgranism), where
     hierarchy is a tuple also.
     """
+    from . import obiGeneSets
     result = obiGeneSets.GeneSets()
 
     for collection in args:

File _bioinformatics/widgets/OWDisplayProfiles.py

 <priority>1030</priority>
 """
 
-from Orange.OrangeWidgets.OWGUI
+from Orange.OrangeWidgets import OWGUI
 from Orange.OrangeWidgets.OWGraph import *
 from Orange.OrangeWidgets.OWToolbars import ZoomSelectToolbar
 from Orange.OrangeWidgets.OWTools import *

File _bioinformatics/widgets/OWKEGGPathwayBrowser.py

 import webbrowser
 
 import orange
-from Orange.orng import orngMisc
+from Orange.orng import orngMisc, orngServerFiles
 from Orange.orng.orngDataCaching import data_hints
 from Orange.OrangeWidgets import OWGUI
 from Orange.OrangeWidgets.OWWidget import *
 
-from .. import obiKEGG, orngServerFiles
+from .. import obiKEGG
 from .. import obiTaxonomy
 from .. import obiKEGG2 as obiKEGG
 from .. import obiGeneSets

File _bioinformatics/widgets/prototypes/OWANOVA.py

 <icon>icons/ChipANOVA.png</icon>
 <priority>1070</priority>
 <contact>Peter Juvan (peter.juvan@fri.uni-lj.si)</contact>
+<prototype>1</prototype>
 """
 
 from __future__ import absolute_import

File _bioinformatics/widgets/prototypes/OWApproxProfiles.py

 <icon>icons/ApproximateProfiles.png</icon>
 <priority>310</priority>
 <contact>Peter Juvan (peter.juvan@fri.uni-lj.si)</contact>
+<prototype>1</prototype>
 """
 
 from __future__ import absolute_import

File _bioinformatics/widgets/prototypes/OWDataDistance.py

 <icon>icons/ChipDistance.png</icon>
 <priority>1160</priority>
 <contact>Peter Juvan (peter.juvan@fri.uni-lj.si)</contact>
+<prototype>1</prototype>
 """
 
 from __future__ import absolute_import

File _bioinformatics/widgets/prototypes/OWDataFiles.py

 <icon>icons/ChipDataFiles.png</icon>
 <priority>1050</priority>
 <contact>Peter Juvan (peter.juvan@fri.uni-lj.si)</contact>
+<prototype>1</prototype>
 """
 
 import os, os.path

File _bioinformatics/widgets/prototypes/OWDataFilesSave.py

 <icon>icons/DataFilesSave.png</icon>
 <priority>1055</priority>
 <contact>Peter Juvan (peter.juvan@fri.uni-lj.si)</contact>
+<prototype>1</prototype>
 """
 
 from __future__ import absolute_import

File _bioinformatics/widgets/prototypes/OWDataFilesSelector.py

 <icon>icons/DataFilesSelector.png</icon>
 <priority>1060</priority>
 <contact>Peter Juvan (peter.juvan@fri.uni-lj.si)</contact>
+<prototype>1</prototype>
 """
 
 from __future__ import absolute_import

File _bioinformatics/widgets/prototypes/OWDifferentiationScale.py

-"""<name>Differentiation Scale</name>
+"""
+<name>Differentiation Scale</name>
 <description></description>
+<prototype>1</prototype>
 """
 
 from __future__ import absolute_import

File _bioinformatics/widgets/prototypes/OWDisplayMotifs.py

 <description>None.</description>
 <contact>Tomaz Curk</contact>
 <icon>icons\GenomeMap.png</icon>
+<prototype>1</prototype>
 """
 
 from collections import defaultdict

File _bioinformatics/widgets/prototypes/OWEpistasisAnalysis.py

 <description>Epistasis analysis on microaray data</description>
 <icon>icons/EpistasisAnalysis.png</icon>
 <priority>1200</priority>
+<prototype>1</prototype>
 """
 
 from __future__ import absolute_import

File _bioinformatics/widgets/prototypes/OWExampleSelector.py

 <icon>icons/SelectGenes.png</icon>
 <priority>1070</priority>
 <contact>Peter Juvan (peter.juvan@fri.uni-lj.si)</contact>
+<prototype>1</prototype>
 """
 
 from __future__ import absolute_import

File _bioinformatics/widgets/prototypes/OWGeneAtlasTissueExpression.py

 """
 <name>Gene Atlas Tissue Expression</name>
 <description></description>
+<prototype>1</prototype>
 """
 
 from __future__ import absolute_import

File _bioinformatics/widgets/prototypes/OWHypTest.py

 <icon>icons/ChipANOVA.png</icon>
 <priority>1071</priority>
 <contact>Peter Juvan (peter.juvan@fri.uni-lj.si)</contact>
+<prototype>1</prototype>
 """
 
 from __future__ import absolute_import

File _bioinformatics/widgets/prototypes/OWImputeProfiles.py

 <icon>icons/ImputeProfiles.png</icon>
 <priority>1065</priority>
 <contact>Peter Juvan (peter.juvan@fri.uni-lj.si)</contact>
+<prototype>1</prototype>
 """
 
 import math

File _bioinformatics/widgets/prototypes/OWNormalization.py

 """
 <name>Normalization</name>
 <description>Gene Expression data normalization</description>
+<prototype>1</prototype>
 """
 
 from __future__ import absolute_import

File _bioinformatics/widgets/prototypes/OWNormalize.py

-## Automatically adapted for numpy.oldnumeric Oct 04, 2007 by 
-
 """
 <name>Normalize Expression Array Data</name>
 <description>Normalization of expression array data.</description>
 <icon>icons/Normalize.png</icon>
 <priority>1150</priority>
 <author>Peter Juvan (peter.juvan@fri.uni-lj.si)</author>
+<prototype>1</prototype>
 """
 
+from __future__ import absolute_import
+
 """
 TODO: settingsList
 """
 
-from __future__ import absolute_import
-
 import string, math
 import types
 

File _bioinformatics/widgets/prototypes/OWProcessChipData.py

 <icon>icons/ProcessChipData.png</icon>
 <priority>1060</priority>
 <contact>Peter Juvan (peter.juvan@fri.uni-lj.si)</contact>
+<prototype>1</prototype>
 """
 
 from __future__ import absolute_import
         'bioinformatics = _bioinformatics',
     ),
     'orange.widgets': (
-        'bioinformatics = _bioinformatics.widgets',
+        'Bioinformatics = _bioinformatics.widgets',
+        # This should be unneeded, because module given should load (register)
+        # all wanted widgets and prototypes should just have a flag, but for now ...
+        'Prototypes = _bioinformatics.widgets.prototypes',
     ),
 }