Changeset 1422:2b381e58061b in orange-bioinformatics


Ignore:
Timestamp:
06/21/11 15:38:12 (3 years ago)
Author:
markotoplak
Branch:
default
Convert:
ba7e04251147a4ff21df5d30bdafecfe5e7b643d
Message:

obiGO: GetEnrichedTerms uses all aspects by default.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • obiGO.py

    r1351 r1422  
    717717 
    718718    def GetEnrichedTerms(self, genes, reference=None, evidenceCodes=None,  
    719                          slimsOnly=False, aspect="P", prob=obiProb.Binomial(), 
     719                         slimsOnly=False, aspect=None, prob=obiProb.Binomial(), 
    720720                         useFDR=True, progressCallback=None): 
    721721        """ Return a dictionary of enriched terms, with tuples of 
     
    728728        :param evidenceCodes: List of evidence codes to consider. 
    729729        :param slimsOnly: If `True` return only slim terms 
    730         :param aspect:  
     730        :param aspect: Which aspects to use. Use all by default. "P", "F", "C" 
     731            or a set containing these elements. 
    731732        """ 
    732733        revGenesDict = self.GetGeneNamesTranslator(genes) 
     
    737738        else: 
    738739            reference = self.geneNames 
    739         aspects_set = set([aspect]) if type(aspect) == str else aspect 
     740 
     741        if aspect == None: 
     742            aspects_set = set(["P", "C", "F"]) 
     743        else: 
     744            aspects_set = set([aspect]) if isinstance(aspect, basestring) else aspect 
     745 
    740746        evidenceCodes = set(evidenceCodes or evidenceDict.keys()) 
    741747        annotations = [ann for gene in genes for ann in self.geneAnnotations[gene] \ 
Note: See TracChangeset for help on using the changeset viewer.