Changeset 1521:19233258515f in orange-bioinformatics


Ignore:
Timestamp:
12/07/11 16:51:37 (2 years ago)
Author:
markotoplak
Branch:
default
Convert:
db2b21099f3932d260e7c99f3c72c02b043f4700
Message:

OWPIPA: added Experiment field.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • widgets/OWPIPA.py

    r1480 r1521  
    4242    def __lt__(self, o1): 
    4343        col = self.par.sortColumn() 
    44         if col in [7,8,9]: #WARNING: hardcoded column numbers 
     44        if col in [8,9,10]: #WARNING: hardcoded column numbers 
    4545            return tfloat(self.text(col)) < tfloat(o1.text(col)) 
    4646        else: 
     
    160160         
    161161    def addCurrentSelection(self): 
    162         item = self.addSelection(SelectionByKey(self.selectionModel.selection(), name="New selection", key=(1, 2, 3, 9))) 
     162        item = self.addSelection(SelectionByKey(self.selectionModel.selection(), name="New selection", key=(1, 2, 3 ,10))) 
    163163        index = self._proxyModel.mapFromSource(item.index()) 
    164164        self._setListView.setCurrentIndex(index) 
     
    405405        self.currentSelection = None 
    406406         
    407         self.experimentsHeaderState = {"": False, "Name":False, "Species": False, "Strain": False, "Genotype": False, "Treatment": False, 
     407        self.experimentsHeaderState = {"": False, "Name":False, "Species": False, "Strain": False, "Experiment":False, "Genotype": False, "Treatment": False, 
    408408                                       "Growth": False, "Timepoint": False, "Replicate": False, "ID": False} 
    409409 
     
    428428#        self.controlArea.layout().addWidget(self.columnsSortingWidget) 
    429429        b.layout().addWidget(self.columnsSortingWidget) 
    430         self.columnsSortingWidget.setModel(QStringListModel(["Strain", "Genotype", "Timepoint", "Growth", "Species", "Id", "Name"])) 
    431         self.columnsSortingWidget.sortingOrder = ["Strain", "Genotype", "Timepoint"] 
     430        self.columnsSortingWidget.setModel(QStringListModel(["Strain", "Experiment", "Genotype", "Timepoint", "Growth", "Species", "Id", "Name"])) 
     431        self.columnsSortingWidget.sortingOrder = ["Strain", "Experiment", "Genotype", "Timepoint"] 
    432432        OWGUI.rubber(self.controlArea) 
    433433 
     
    455455 
    456456        OWGUI.lineEdit(self.mainArea, self, "searchString", "Search", callbackOnType=True, callback=self.SearchUpdate) 
    457         self.headerLabels = ["", "Name", "Species", "Strain", "Genotype", "Treatment", "Growth", "Timepoint", "Replicate", "ID", 
     457        self.headerLabels = ["", "Name", "Species", "Strain", "Experiment", "Genotype", "Treatment", "Growth", "Timepoint", "Replicate", "ID", 
    458458                             "Date RNA", "Adapter", "Who", "Date Rep", "Band", "Amount", "Experimenter","Polya", "Primer", "Shearing", "Unit"] 
    459459        self.experimentsWidget = QTreeWidget() 
     
    606606            pos += 1 
    607607            d = defaultdict(lambda: "?", annot) 
    608             elements.append(["", d["name"], d["species"], d["strain"], d["genotype"], d["treatment"], d["growth"], d["tp"], d["replicate"], chip] + \ 
     608            elements.append(["", d["name"], d["species"], d["strain"], d["Experiment"], d["genotype"], d["treatment"], d["growth"], d["tp"], d["replicate"], chip] + \ 
    609609                             [d[label.lower().replace(" ", "_")] for label in ["Date RNA", "Adapter", "Who", "Date Rep", "Band", "Amount", "Experimenter", "Polya", "Primer", "Shearing", "Unit"]]) 
    610610             
     
    636636 
    637637            for item in self.items: 
    638                 c = str(item.text(9)) 
     638                c = str(item.text(10)) 
    639639                item.setData(0, Qt.DisplayRole, QVariant(" " if self.dbc.inBuffer(fn(c)) == self.wantbufver(c) else "")) 
    640640 
     
    657657        ids = [] 
    658658        for item in self.experimentsWidget.selectedItems(): 
    659             ids += [ str(item.text(9)) ] 
     659            ids += [ str(item.text(10)) ] 
    660660 
    661661        transfn = None 
     
    666666                "Species": "species", "Name": "name", "Date RNA": "date_rna", "Adapter":"adapter", 
    667667                "Who": "who", "Date Rep": "date_rep", "Band": "band", "Amount": "amount", "Experimenter":"experimenter", 
    668                 "Polya": "polya", "Primer": "primer", "Shearing": "shearing", "Unit": "unit"} 
     668                "Polya": "polya", "Primer": "primer", "Shearing": "shearing", "Unit": "unit", "Experiment":"Experiment"} 
    669669         
    670670        hview = self.experimentsWidget.header() 
     
    709709    def handle_commit_button(self): 
    710710        self.currentSelection = SelectionByKey(self.experimentsWidget.selectionModel().selection(), 
    711                                                key=(1, 2, 3, 9)) 
     711                                               key=(1, 2, 3, 10)) 
    712712        self.commit_button.setDisabled(not len(self.currentSelection)) 
    713713 
Note: See TracChangeset for help on using the changeset viewer.