Changeset 1208:ef5461b069d1 in orange-bioinformatics


Ignore:
Timestamp:
09/14/10 12:34:59 (4 years ago)
Author:
markotoplak
Branch:
default
Convert:
41b2fab91daec1fff31522e150965e62257144ea
Message:

PIPA: added option to obtain raw data

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • obiDicty.py

    r1200 r1208  
    576576            yield [ list(v) for v in zip(legend, res[0])[1:] ] 
    577577 
    578     def chips(self, ids, reload=False, bufver="0"): 
     578    def chips(self, ids, raw=False, reload=False, bufver="0"): 
    579579        """ 
    580580        Download chips using new shorter format. 
     
    594594            return ['gene_id', 'value'], antss 
    595595 
    596         antss = self.downloadMulti("download_expression", ids, data=self.add_auth({"ids":"$MULTI$"}), chunk=10, separatefn=separatefn, bufferkey=bufferkeypipa, bufreload=reload, bufver=bufver) 
     596        download_command = "download_expression" if not raw else "download_raw_expression" 
     597        antss = self.downloadMulti(download_command, ids, data=self.add_auth({"ids":"$MULTI$"}), chunk=10, separatefn=separatefn, bufferkey=bufferkeypipa, bufreload=reload, bufver=bufver) 
    597598        for a,legend in antss: 
    598599            yield a 
     
    603604 
    604605    def get_data(self, exclude_constant_labels=False, average=median,  
    605         ids=None, callback=None, bufver="0", transform=None, allowed_labels=None, map_map35=False, map_lengths=False): 
     606        ids=None, callback=None, bufver="0", transform=None, raw=False, allowed_labels=None, map_map35=False, map_lengths=False): 
    606607        """ 
    607608        Get data in a single example table with labels of individual attributes 
     
    617618                example table, remove it 
    618619            format: if short, use short format for chip download 
     620            raw: raw expressions 
    619621 
    620622        Defaults: Median averaging. 
     
    657659        chipfn = None 
    658660 
    659         chipfn = lambda x: self.chips(x, bufver=bufver) 
     661        chipfn = lambda x: self.chips(x, bufver=bufver, raw=raw) 
    660662        
    661663        if verbose: 
  • widgets/OWPIPA.py

    r1194 r1208  
    55<priority>30</priority> 
    66""" 
     7 
     8#FIXME Availability is not valid for raw expressions. 
    79 
    810from OWWidget import * 
     
    385387class OWPIPA(OWWidget): 
    386388    settingsList = [ "platform", "selectedExperiments", "server", "buffertime", "excludeconstant", "username", "password","joinreplicates", 
    387                      "selectionSetsWidget.selections", "columnsSortingWidget.sortingOrder", "currentSelection", "log2", "experimentsHeaderState", "lenandmap35"] 
     389                     "selectionSetsWidget.selections", "columnsSortingWidget.sortingOrder", "currentSelection", "log2", "raw", "experimentsHeaderState", "lenandmap35"] 
    388390    def __init__(self, parent=None, signalManager=None, name="PIPA database"): 
    389391        OWWidget.__init__(self, parent, signalManager, name) 
     
    394396        self.password = "" 
    395397        self.log2 = False 
     398        self.raw = False 
    396399 
    397400        self.selectedExperiments = [] 
     
    435438        OWGUI.checkBox(self.controlArea, self, "joinreplicates", "Average replicates (use median)" ) 
    436439        OWGUI.checkBox(self.controlArea, self, "log2", "Logarithmic (base 2) transformation" ) 
     440        OWGUI.checkBox(self.controlArea, self, "raw", "Download Raw Expressions" ) 
    437441        OWGUI.checkBox(self.controlArea, self, "lenandmap35", "Add length and mapability info" ) 
    438442 
     
    653657            allowed_labels.append("id") 
    654658         
    655         table = self.dbc.get_data(ids=ids, callback=pb.advance, exclude_constant_labels=self.excludeconstant, bufver=self.wantbufver, transform=transfn, allowed_labels=allowed_labels, map_map35=self.lenandmap35, map_lengths=self.lenandmap35) 
     659        table = self.dbc.get_data(ids=ids, callback=pb.advance, exclude_constant_labels=self.excludeconstant, bufver=self.wantbufver, transform=transfn, allowed_labels=allowed_labels, map_map35=self.lenandmap35, map_lengths=self.lenandmap35, raw=self.raw) 
     660 
    656661 
    657662        if self.joinreplicates: 
Note: See TracChangeset for help on using the changeset viewer.