Changeset 1715:87468c6e6443 in orange-bioinformatics for _bioinformatics/obiGene.py


Ignore:
Timestamp:
08/30/12 15:19:40 (20 months ago)
Author:
markotoplak
Branch:
default
Message:

Removed use of the old obiKEGG module. Hacked a REST version for gene aliases in obiKEGG2.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • _bioinformatics/obiGene.py

    r1703 r1715  
    643643        self.filename() # test if valid filename can be built 
    644644 
     645from Orange.utils import ConsoleProgressBar 
     646 
    645647class MatcherAliasesKEGG(MatcherAliasesPickled): 
    646648 
    647649    def _organism_name(self, organism): 
    648         from . import obiKEGG  
    649         return obiKEGG.organism_name_search(organism) 
     650        from . import obiKEGG2 
     651        return obiKEGG2.organism_name_search(organism) 
    650652 
    651653    def create_aliases(self): 
    652654        organism = self._organism_name(self.organism) 
    653         from . import obiKEGG 
    654         org = obiKEGG.KEGGOrganism(self.organism, genematcher=GMDirect()) 
    655         genes = org.genes 
    656         osets = [ set([name]) | set(b.alt_names) for  
    657                 name,b in genes.items() ] 
     655        from . import obiKEGG2 
     656        org = obiKEGG2.KEGGOrganism(self.organism, genematcher=GMDirect()) 
     657        osets = org._gm_gene_aliases() 
    658658        return osets 
    659659 
    660660    def create_aliases_version(self): 
    661         from . import obiKEGG 
    662         return obiKEGG.KEGGOrganism.organism_version(self.organism) + ".1" 
     661        from . import obiKEGG2 
     662        return obiKEGG2.KEGGOrganism.organism_version(self.organism) + ".1" 
    663663 
    664664    def filename(self): 
    665         return "kegg_" + self._organism_name(self.organism)  
     665        return "kegg_2_" + self._organism_name(self.organism)  
    666666 
    667667    def __init__(self, organism, ignore_case=True): 
Note: See TracChangeset for help on using the changeset viewer.