Commits

Marko Toplak committed 9422c05

Orange.data.variable -> Orange.feature

Comments (0)

Files changed (3)

obiArrayExpress.py

          
     for header_name, quant, column in zip(header, quantification, matrix.T):
         if _is_continuous(column):
-            feature = Orange.data.variable.Continuous(header_name)
+            feature = Orange.feature.Continuous(header_name)
             column[numpy.where(1 - is_float(column))] = "?" # relace all non parsable floats with '?'
         else:
             values = set(column)
-            feature = Orange.data.variable.Discrete(header_name, values=sorted(values))
+            feature = Orange.feature.Discrete(header_name, values=sorted(values))
         feature.attributes["quantification"] = quant
         features.append(feature)
         
-    row_ref_feature = Orange.data.variable.String(row_ref)
+    row_ref_feature = Orange.feature.String(row_ref)
     domain = Orange.data.Domain(features, None)
-    domain.addmeta(Orange.data.new_meta_id(), row_ref_feature)
+    domain.addmeta(Orange.feature.Descriptor.new_meta_id(), row_ref_feature)
     
     table = Orange.data.Table(domain, [list(row) for row in matrix])
     
     
 if __name__ == "__main__":
     test()
-    
+    

widgets/OWGenotypeDistances.py

 
         def get_attr(attr_index, i):
             if attr_index is None:
-                attr = Orange.data.variable.Continuous(missing_name_gen.next())
+                attr = Orange.feature.Continuous(missing_name_gen.next())
                 attr.attributes.update(relevant_items[i])
                 return attr
             else:
         def for_print(rd):
             attrs = []
             for d in rd:
-                attr = Orange.data.variable.Continuous(inactive_name_gen.next())
+                attr = Orange.feature.Continuous(inactive_name_gen.next())
                 attr.attributes.update(d)
                 attrs.append(attr)
             return Orange.data.Domain(attrs, None)

widgets/prototypes/OWGeneAtlasTissueExpression.py

         """ Populate the 'Gene Attribute' box
         """
         vars = data.domain.variables + data.domain.get_metas().values()
-        vars = [var for var in vars if isinstance(var, (Orange.data.variable.String))]
+        vars = [var for var in vars if isinstance(var, (Orange.feature.String))]
         self.candidate_vars = vars
         self.gene_attr_cb.addItems([var.name for var in vars])
         # See if any var name contains 'gene'
     w.set_data(data)
     app.exec_()
     w.saveSettings()
-        
+