Changeset 1927:f3f90e6b14dc in orange-bioinformatics for orangecontrib/bio/obiGene.py


Ignore:
Timestamp:
12/03/13 14:33:20 (5 months ago)
Author:
Ales Erjavec <ales.erjavec@…>
Branch:
default
Message:

Optimize the case where the organism identifier is a known common taxid.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orangecontrib/bio/obiGene.py

    r1873 r1927  
    111111    @classmethod 
    112112    def organism_name_search(cls, org): 
     113        if org in cls.common_taxids(): 
     114            return org 
     115        elif org in NCBIGeneInfo.TAX_MAP: 
     116            return NCBIGeneInfo.TAX_MAP[org] 
     117 
    113118        taxids = obiTaxonomy.to_taxid(org, mapTo=cls.common_taxids()) 
    114119        if not taxids: 
Note: See TracChangeset for help on using the changeset viewer.