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


Marko Toplak  committed bd2ced9

Widget rename: Gene selection -> Differential expression

  • Participants
  • Parent commits 8870b3c
  • Branches default

Comments (0)

Files changed (2)

File _bioinformatics/obiGeneSetSig.py

View file
         gene_sets = select_genesets(nm, self.gene_sets, self.min_size, self.max_size, self.min_part)
         #build a new domain
+        print "WHOLE"
         newfeatures = self.build_features(data, gene_sets)
         newdomain = Orange.data.Domain(newfeatures, data.domain.class_var)
                 cvi = self.cv(data)
             data_cv = [ [] for _ in range(len(data)) ]
             for f in set(cvi):
+                print "FOLD", f
                 learn = data.select(cvi, f, negate=True)
                 test = data.select(cvi, f)
                 lf = self.build_features(learn, gene_sets)
                 for ex, pos in \
                     zip(trans_test, [ i for i,n in enumerate(cvi) if n == f ]):
                     data_cv[pos] = ex.native(0)
+            print data_cv[0]
             return Orange.data.Table(newdomain, data_cv)
     def build_features(self, data, gene_sets):
-    return sortedinds[:bg] #FIXED - one too many was taken
+    return sortedinds[:bg]
 class CORGs(ParametrizedTransformation):
         ind_names = dict( (a,b) for b,a in name_ind.items() )
         selected_genes = sorted(set([to_geneset[ind_names[i]] for i in indices]))
         def t(ex, w, corg=selected_genes): #copy od the data
             nm2, name_ind2, genes2 = self._match_instance(ex, corg, None)
             exvalues = [ vou(ex, gn, name_ind2) for gn in genes2 ]
     ass = LLR(data, matcher=matcher, gene_sets=gsets, class_values=choosen_cv, min_part=0.0, normalize=True)
     #ass = LLR_slow(data, matcher=matcher, gene_sets=gsets, class_values=choosen_cv, min_part=0.0)
+    ass = CORGs(data, matcher=matcher, gene_sets=gsets, class_values=choosen_cv, min_part=0.0, cv=True)
     ar = to_old_dic(ass.domain, data[:5])

File _bioinformatics/widgets/OWFeatureSelection.py

View file
-<name>Gene Selection</name>
+<name>Differential expression</name>
 <description>Gene differential expression scoring and selection.</description>
         if self.data is not None  and \
                 not (self.attribute_targets or self.class_targets):
             # If both attr. labels and classes are missing, show an error
-            self.error(1, "Cannot compute gene scores! Gene Selection widget "
+            self.error(1, "Cannot compute gene scores! Differential expression widget "
                           "requires a data-set with a discrete class variable "
                           "or attribute labels!")
             self.data = None